BeanShell

Last updated
BeanShell
Paradigm Object-oriented, scripting
Designed by JCP
First appeared1999;25 years ago (1999)
Stable release
2.1.1 [1] / 2 December 2022;14 months ago (2 December 2022)
Typing discipline Dynamic, strong
Implementation language Java
Platform JVM
OS Cross-platform
License 2012: Apache-2.0 [lower-alpha 1] [2] [3]
2001: SPL-1.0 or LGPL-2.1-only [lower-alpha 2] [4]
1999: LGPL-2.1-only [lower-alpha 3] [5]
Website github.com/beanshell/beanshell
Influenced by
Java, JavaScript, Perl

BeanShell is a small, free, embeddable Java source interpreter with object scripting language features, written in Java. It runs in the Java Runtime Environment (JRE), dynamically executes standard Java syntax and extends it with common scripting conveniences such as loose types, commands, and method closures, like those in Perl and JavaScript.

Contents

Features

While BeanShell allows its users to define functions that can be called from within a script, its underpinning philosophy has been to not pollute its syntax with too many extensions and "syntactic sugar", thereby ensuring that code written for a Java compiler can usually be executed interpretively by BeanShell without any changes and, almost just as much, vice versa. This makes BeanShell a popular testing and debugging tool for the Java virtual machine (JVM) platform.

BeanShell supports scripted objects as simple method closures like those in Perl and JavaScript.

BeanShell is an open source project and has been incorporated into many applications, such as Apache OpenOffice, Apache Ant, WebLogic Server Application Server, Apache JMeter, jEdit, ImageJ, JUMP GIS, Apache Taverna, and many others. BeanShell provides an easy to integrate application programming interface (API). It can also be run in command-line mode or within its own graphical environment.

History

The first versions of BeanShell (0.96, 1.0) were released by Patrick Niemeyer in 1999, followed by a series of versions. BeanShell 1.3.0 was released in August 2003. Version 2.0b1 was released in September 2003, culminating with version 2.0b4 in May 2005, which as of January 2015 is the newest release posted on the official webpage. [6]

BeanShell has been included in the Linux distribution Debian since 1999. [7]

BeanShell was undergoing standardization through the Java Community Process (JCP) under JSR 274. [8]

Following the JCP approval of the BeanShell JSR Review Ballot in June 2005, no visible activity was taking place around BeanShell. [9] The JSR 274 status is "Dormant".

Since Java 9, Java instead includes JShell, a different read–eval–print loop (REPL) shell based on Java syntax, indicating that BeanShell will not be continued. [10]

A fork of BeanShell, BeanShell2, was created in May 2007 on the now-defunct Google Code Web site. [11] The beanshell2 project has made a number of fixes and enhancements to BeanShell and multiple releases. As of January 2020, the latest version of BeanShell2 is v2.1.9, released March 2018. [12] This fork was merged back into the original tree in 2018, [13] retaining all the independent changes from both, and the official project has been hosted at GitHub. [14]

In December 2012, following a proposal to accept BeanShell as an Apache Incubator project, [15] BeanShell was licensed to The Apache Software Foundation and migrated to the Apache Extras, [16] changing the license to Apache License 2.0. The project was not accepted but instead projected to become part of the Apache Commons at a future time.

Due to changes in the developers' personal circumstances, the BeanShell community did not, however, complete the move to Apache, [17] but remained at Apache Extras. The project has since released BeanShell 2.0b5, [16] which is used by Apache OpenOffice and Apache Taverna.

A Windows automated installer, BeanShell Double-Click, [18] was created in 2013. It includes desktop integration features.

See also

Notes

  1. Apache-2.0: Since 2.0b5
  2. SPL-1.0 or LGPL-2.1-only: From 1.1alpha5 to 2.0b4
  3. LGPL-2.1-only: 1.0 to 1.1alpha3

Related Research Articles

<span class="mw-page-title-main">Java virtual machine</span> Virtual machine that runs Java programs

A Java virtual machine (JVM) is a virtual machine that enables a computer to run Java programs as well as programs written in other languages that are also compiled to Java bytecode. The JVM is detailed by a specification that formally describes what is required in a JVM implementation. Having a specification ensures interoperability of Java programs across different implementations so that program authors using the Java Development Kit (JDK) need not worry about idiosyncrasies of the underlying hardware platform.

Jakarta Enterprise Beans is one of several Java APIs for modular construction of enterprise software. EJB is a server-side software component that encapsulates business logic of an application. An EJB web container provides a runtime environment for web related software components, including computer security, Java servlet lifecycle management, transaction processing, and other web services. The EJB specification is a subset of the Java EE specification.

<span class="mw-page-title-main">Java Community Process</span>

The Java Community Process (JCP), established in 1998, is a formalized mechanism that allows interested parties to develop standard technical specifications for Java technology. Anyone can become a JCP Member by filling a form available at the JCP website. JCP membership for organizations and commercial entities requires annual fees – but is free for individuals.

<span class="mw-page-title-main">NetBeans</span> Integrated development environment software for software development

NetBeans is an integrated development environment (IDE) for Java. NetBeans allows applications to be developed from a set of modular software components called modules. NetBeans runs on Windows, macOS, Linux and Solaris. In addition to Java development, it has extensions for other languages like PHP, C, C++, HTML5, and JavaScript. Applications based on NetBeans, including the NetBeans IDE, can be extended by third party developers.

<span class="mw-page-title-main">Apache Groovy</span> Programming language

Apache Groovy is a Java-syntax-compatible object-oriented programming language for the Java platform. It is both a static and dynamic language with features similar to those of Python, Ruby, and Smalltalk. It can be used as both a programming language and a scripting language for the Java Platform, is compiled to Java virtual machine (JVM) bytecode, and interoperates seamlessly with other Java code and libraries. Groovy uses a curly-bracket syntax similar to Java's. Groovy supports closures, multiline strings, and expressions embedded in strings. Much of Groovy's power lies in its AST transformations, triggered through annotations.

In computer-based language recognition, ANTLR, or ANother Tool for Language Recognition, is a parser generator that uses a LL(*) algorithm for parsing. ANTLR is the successor to the Purdue Compiler Construction Tool Set (PCCTS), first developed in 1989, and is under active development. Its maintainer is Professor Terence Parr of the University of San Francisco.

JRuby is an implementation of the Ruby programming language atop the Java Virtual Machine, written largely in Java. It is free software released under a three-way EPL/GPL/LGPL license. JRuby is tightly integrated with Java to allow the embedding of the interpreter into any Java application with full two-way access between the Java and the Ruby code.

<span class="mw-page-title-main">XWiki</span> Wiki engine

XWiki is a free wiki software platform written in Java with a design emphasis on extensibility. XWiki is an enterprise wiki. It includes WYSIWYG editing, OpenDocument based document import/export, semantic annotations and tagging, and advanced permissions management.

<span class="mw-page-title-main">PMD (software)</span>

PMD is an open source static source code analyzer that reports on issues found within application code. PMD includes built-in rule sets and supports the ability to write custom rules. PMD does not report compilation errors, as it only can process well-formed source files. Rather, PMD is designed to detect inefficient code or bad programming habits, which can reduce the performance and maintainability of the program if they accumulate. It can analyze files written in Java, JavaScript, Apex and Visualforce, PLSQL, Apache Velocity, XML, and XSL.

Railo Server, commonly referred to as Railo, is open source software which implements the general-purpose CFML server-side scripting language, often used to create dynamic websites, web applications and intranet systems. CFML is a dynamic language supporting multiple programming paradigms and runs on the Java virtual machine (JVM).

<span class="mw-page-title-main">GlassFish</span> Application server project

GlassFish is an open-source Jakarta EE platform application server project started by Sun Microsystems, then sponsored by Oracle Corporation, and now living at the Eclipse Foundation and supported by OmniFish, Fujitsu and Payara. The supported version under Oracle was called Oracle GlassFish Server. GlassFish is free software and was initially dual-licensed under two free software licences: the Common Development and Distribution License (CDDL) and the GNU General Public License (GPL) with the Classpath exception. After having been transferred to Eclipse, GlassFish remained dual-licensed, but the CDDL license was replaced by the Eclipse Public License (EPL).

<span class="mw-page-title-main">Java (software platform)</span> Set of computer software and specifications

Java is a set of computer software and specifications that provides a software platform for developing application software and deploying it in a cross-platform computing environment. Java is used in a wide variety of computing platforms from embedded devices and mobile phones to enterprise servers and supercomputers. Java applets, which are less common than standalone Java applications, were commonly run in secure, sandboxed environments to provide many features of native applications through being embedded in HTML pages.

OpenJPA is an open source implementation of the Java Persistence API specification. It is an object-relational mapping (ORM) solution for the Java language, which simplifies storing objects in databases. It is open-source software distributed under the Apache License 2.0.

JSDoc is a markup language used to annotate JavaScript source code files. Using comments containing JSDoc, programmers can add documentation describing the application programming interface of the code they're creating. This is then processed, by various tools, to produce documentation in accessible formats like HTML and Rich Text Format. The JSDoc specification is released under CC BY-SA 3.0, while its companion documentation generator and parser library is free software under the Apache License 2.0.

The Dynamic Language Runtime (DLR) from Microsoft runs on top of the Common Language Runtime (CLR) and provides computer language services for dynamic languages. These services include:

DataNucleus is an open source project which provides software products around data management in Java. The DataNucleus project started in 2008.

<span class="mw-page-title-main">Jenkins (software)</span> Open source automation server

Jenkins is an open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration, and continuous delivery. It is a server-based system that runs in servlet containers such as Apache Tomcat. It supports version control tools, including AccuRev, CVS, Subversion, Git, Mercurial, Perforce, ClearCase, and RTC, and can execute Apache Ant, Apache Maven, and sbt based projects as well as arbitrary shell scripts and Windows batch commands.

Nashorn is a JavaScript engine developed in the Java programming language originally by Oracle and later by the OpenJDK Community. It relies on the support for dynamically typed languages on the Java Platform Nashorn has been included with Java 8 through JDK 14.

Kotlin is a cross-platform, statically typed, general-purpose high-level programming language with type inference. Kotlin is designed to interoperate fully with Java, and the JVM version of Kotlin's standard library depends on the Java Class Library, but type inference allows its syntax to be more concise. Kotlin mainly targets the JVM, but also compiles to JavaScript or native code via LLVM. Language development costs are borne by JetBrains, while the Kotlin Foundation protects the Kotlin trademark.

References

  1. "Release 2.1.1". 2 December 2022. Retrieved 7 December 2022.
  2. Niemeyer, Pat. "BeanShell Software License". beanshell.org. Retrieved January 13, 2016.
  3. "BeanShell". github.com. Retrieved January 13, 2016.
  4. "CHANGES.md". GitHub .
  5. "License.txt in 1.0". GitHub .
  6. "BeanShell Downloads". beanshell.org. 2009-01-28. Retrieved 28 January 2015.
  7. "Source Package: bsh (2.0b4-12)". Debian. Retrieved 28 January 2015.
  8. The Java Community Process(SM) Program - JSRs: Java Specification Requests - detail JSR# 274. Jcp.org. Retrieved on 2013-07-21.
  9. "The Java Community Process(SM) Program - JSRs: Java Specification Requests - results". jcp.org.
  10. "JEP 222: jshell: The Java Shell (Read-Eval-Print Loop)". openjdk.java.net. Retrieved 2015-09-03.
  11. beanshell2 - fork of BeanShell - Google Project Hosting. Code.google.com (2011-11-21). Retrieved on 2013-07-21.
  12. Jodeleit, Peter. "README.md". GitHub . Retrieved 23 January 2020.
  13. "Fork to investigate possible merge · Issue #46 · beanshell/Beanshell". GitHub .
  14. https://github.com/beanshell/beanshell GitHub - beanshell/beanshell: Beanshell, a scripting language for the Java Virtual Machine. Retrieved on 2018-03-06.
  15. Tripodi, S; Bazley, S (2012). "BeanShell proposal". Incubator Wiki. Apache Software Foundation.
  16. 1 2 "beanshell/beanshell". January 27, 2021 via GitHub.
  17. Tripodi, Simone (2015-01-08). "Beanshell under Apache?". Apache Taverna developer mailing list. Apache Software Foundation. Retrieved 28 January 2015.
  18. BeanShell Double-Click | Free Development software downloads at. Sourceforge.net. Retrieved on 2013-07-21.