{"id":13608266,"url":"https://github.com/beanshell/beanshell","last_synced_at":"2025-04-12T14:32:28.975Z","repository":{"id":38421812,"uuid":"43010103","full_name":"beanshell/beanshell","owner":"beanshell","description":"Beanshell scripting language","archived":false,"fork":false,"pushed_at":"2024-08-17T22:28:41.000Z","size":16099,"stargazers_count":856,"open_issues_count":99,"forks_count":183,"subscribers_count":47,"default_branch":"master","last_synced_at":"2024-11-07T13:40:43.764Z","etag":null,"topics":["beanshell","beanshell-scripting-language","java","java-interpreter","java-shell","scripting-language"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/beanshell.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-09-23T15:36:06.000Z","updated_at":"2024-11-01T19:38:33.000Z","dependencies_parsed_at":"2024-11-07T13:40:21.168Z","dependency_job_id":"7d6c54ac-ed6d-4cad-8c99-9cbcece534ed","html_url":"https://github.com/beanshell/beanshell","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanshell%2Fbeanshell","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanshell%2Fbeanshell/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanshell%2Fbeanshell/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beanshell%2Fbeanshell/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beanshell","download_url":"https://codeload.github.com/beanshell/beanshell/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248581325,"owners_count":21128147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["beanshell","beanshell-scripting-language","java","java-interpreter","java-shell","scripting-language"],"created_at":"2024-08-01T19:01:25.735Z","updated_at":"2025-04-12T14:32:27.510Z","avatar_url":"https://github.com/beanshell.png","language":"Java","readme":"# BeanShell - Simple Java Scripting\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)\n[![Build workflow](https://github.com/beanshell/beanshell/actions/workflows/maven.yml/badge.svg?branch=master)](https://github.com/beanshell/beanshell/actions/workflows/maven.yml) [![codecov](https://codecov.io/gh/beanshell/beanshell/branch/master/graph/badge.svg)](https://codecov.io/gh/beanshell/beanshell)\n[![coverity](https://scan.coverity.com/projects/16379/badge.svg)](https://scan.coverity.com/projects/beanshell-beanshell)\n[![Known Vulnerabilities](https://snyk.io/test/github/beanshell/beanshell/badge.svg)](https://snyk.io/test/github/beanshell/beanshell)\n\nThe **official** and **active** project home for BeanShell.\n\n## NOTICE: Pending new release\nThe only recommended version is a manual build of the master branch. Support for legacy releases reached end-of-life; only issues and pull requests against master will be accepted.\n\nThe next release will be BeanShell 3.0, as the [development roadmap](https://github.com/beanshell/beanshell#development-road-map) outlines. It [was decided](https://github.com/beanshell/beanshell/issues/81) that the next release would be a production-ready major version with all outstanding issues resolved to encourage community involvement and testing.\n\nMost of the outstanding issues were [imported from Sourceforge](https://github.com/beanshell/beanshell/labels/auto-migrated%20sourceforge), where they were reported many years ago and are now orphaned without owners. The majority has already been resolved on master. **An earnest call goes out for assistance in processing these issues to verify whether they are still valid, reproducible, or already resolved.**\n\nNew language enhancements remain open for [comments and discussion](https://github.com/beanshell/beanshell/labels/discussion).\n\nItems identified as [out of scope for 3.0](https://github.com/beanshell/beanshell/labels/out%20of%20scope%20v3.0) are scheduled for the next release.\n * `StrictJava` compliance, unit tests, and outstanding issues\n * Updated [documentation](http://beanshell.org/manual/contents.html). The [discussions](https://github.com/beanshell/beanshell/labels/discussion) double as future documentation.\n\n## Introduction\nBeanShell is a small, free, embeddable Java source interpreter written in Java with object scripting language features. BeanShell executes standard Java syntax dynamically and extends it with common scripting conveniences such as loose types, commands, and method closures like those in Perl and JavaScript.\n\nYou can use BeanShell interactively for Java experimentation and debugging as well as to extend your applications in new ways. Scripting Java lends itself to various applications, including rapid prototyping, user scripting extension, rules engines, configuration, testing, dynamic deployment, embedded systems, and Java education.\n\nBeanShell is small and embeddable, so you can call BeanShell from your Java applications to execute Java code dynamically at run-time or to provide extensibility in your applications. Alternatively, you can use standalone BeanShell scripts to work with Java objects and APIs to manipulate Java applications dynamically. Since BeanShell is written in Java and runs in the same VM as your application, you can freely pass references to \"live\" objects into scripts and return them as results.\n\n## License\n\nStarting with version 2.0b5, BeanShell is licensed under the\n[Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0). See [LICENSE](LICENSE) for details and the [NOTICE](NOTICE) file for required attributions.\n\n## Download\n\n### Source code\nThe development branch is the master, and it is currently recommended that you use that version. To build, pull the project, and run the maven command.\n\n```shell\n$ mvn install\n```\n\nBeanShell requires at least JDK 8 but will also work with LTS versions; Java 11, Java 17, and Java 21.\n\nThe source code releases can be downloaded from [GitHub releases](https://github.com/beanshell/beanshell/releases)\n\nLatest release: **not supported** (use the recommended development snapshot)\n\n - [BeanShell 2.1.1](https://github.com/beanshell/beanshell/releases/tag/2.1.1) - [bsh-2.1.1-src.zip](https://github.com/beanshell/beanshell/releases/download/2.1.1/bsh-2.1.1-src.zip)\n\n\n### Maven\n\nBeanshell 3.0.0 currently only has a SNAPSHOT release published to [Sonatype](https://oss.sonatype.org/content/repositories/snapshots/org/beanshell/bsh/). To use Beanshell with Maven, add this to your `pom.xml`:\n\n```xml\n    \u003cdependencies\u003e\n       \u003cdependency\u003e\n         \u003cgroupId\u003eorg.beanshell\u003c/groupId\u003e\n         \u003cartifactId\u003ebsh\u003c/artifactId\u003e\n         \u003cversion\u003e3.0.0-SNAPSHOT\u003c/version\u003e\n       \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n```\n\n### JAR binary\n\nYou can also download the `bsh.jar` binary from the releases page or the link below:\n\n- [bsh-2.1.1.jar](https://github.com/beanshell/beanshell/releases/download/2.1.1/bsh-2.1.1.jar)\n\nIf you want to execute the Beanshell [User Interface](https://github.com/beanshell/beanshell/wiki/Desktop), either double-click the JAR file, or run it with:\n\n```shell\n$ java -jar bsh-2.1.1.jar\n```\n\nFor a BeanShell interactive shell, you can either use the `java` command:\n\n```shell\n$ java -cp bsh-2.1.1.jar bsh.Interpreter\n```\n\nor the supplied helper scripts `bsh` or `bsh.bat`, available under the scripts folder.\n\n\nYou will need [Java](http://java.com/) 5 or later installed.\n\n## Build\n\n```shell\n$ mvn clean install\n```\n\n## Contribute\n\nYou are encouraged to raise a Github [Pull Request](https://github.com/beanshell/beanshell/pulls) with any suggested improvements and fixes!\n\nYou can also raise an [issue](https://github.com/beanshell/beanshell/issues) for any questions or bugs. Remember, your stack trace might be particularly useful for others!\n\nPlease note only issues and pull requests made against the master branch will be considered.\n\n## Documentation\n\nFor full documentation, see the [BeanShell wiki](https://github.com/beanshell/beanshell/wiki) and the [FAQ](https://github.com/beanshell/beanshell/wiki/FAQ) for frequently asked questions.\n\nThe old documentation available at [http://beanshell.org](http://www.beanshell.org/docs.html) may also be useful.\n\n### Summary of features\n\n - Dynamic execution of the entire Java syntax, Java code fragments, loosely typed Java, and additional scripting conveniences.\n - Transparent access to all Java objects and APIs.\n - Runs in four modes: Command Line, Console, Applet, and Remote Session Server.\n - Works in security-constrained environments without a classloader or bytecode generation for most features.\n - The interpreter is small, ~400K jar file.\n - Pure Java.\n - It's Free!!!\n\n### Java evaluation features\n\n- Dynamically evaluate full Java source classes, isolated Java methods, statements, and expressions.\n\n### Scripting features\n\n- Optionally typed variables.\n- Scripted methods with optionally typed arguments and return values\n- Scripted objects (method closures)\n- Scripted interfaces and event handlers.\n- Convenience syntax for working with JavaBean? Properties, hashtables, and primitive wrapper types.\n- Auto-allocation of variables to emulate Java properties files.\n- Extensible set of utility and shell-like commands\n- Dynamic classpath management, including fine-grained class reloading\n- Dynamic command loading and user command path\n- Sophisticated namespace and callstack management\n- Detailed error reporting\n\n### BeanShell Uses\n\n- Interactive Java - try out object features, APIs, and GUI widgets - \"hands-on\".\n- Scripting extension for applications - Allow your applications to be extended via scripts in an intuitive and simple way.\n- Macro Languages - Generate scripts as macros and execute them live in your VM easily.\n- Education - Teach Java in a hands-on, live environment\n- Expression evaluator for scientific, financial apps, and rules engines - evaluate complex expressions with conditions and loops.\n- Remote debugging - Embed a live, remotely accessible shell/command line in your application with just a few lines of code.\n- Use BeanShell declaratively to replace properties files and replace startup config files with real scripts that perform complex initialization and setup with the full Java syntax at their disposal.\n\n## Development road map\n\nThe current development effort focuses on releasing BeanShell 3.0. The following road map serves as a guide to gauge progress to the next release.\n\n - [x] Merge fork BeanShell2\n - [x] Support for Java 9/10 with illegal access denied\n - [x] Implement varargs\n - [x] Implement try with resources\n - [x] Implement multi-catch\n - [x] Implement interfaces: constants, static, and default methods\n - [x] Implement generics parsing\n - [x] Implement final modifier\n - [x] Implement BigInteger/BigDecimal and number coercion\n - [x] Make all current unit tests pass\n - [x] Increase unit tests code coverage 70%\n - [ ] Resolve all outstanding issues and process pull requests\n - [ ] Apply uniform code style and Javadocs\n - [ ] Consider feedback from [community discussions](/beanshell/beanshell/labels/discussion)\n\n## Projects using BeanShell\n\nProjects that we know of that are using BeanShell. Is your project not listed here? Let us know by submitting an [issue](/beanshell/beanshell/issues).\n\n * [Apache Ant](https://ant.apache.org/manual/Tasks/script.html)\n * [Apache Camel](http://camel.apache.org/beanshell.html)\n * [Apache Maven](https://maven.apache.org/plugin-tools/maven-plugin-plugin/examples/beanshell-mojo.html)\n * [Apache OpenOffice](http://www.openoffice.org/framework/scripting/scriptingf1/developer-guide.html)\n * [Apache Taverna](https://taverna.incubator.apache.org/introduction/services-in-taverna)\n * [Apache jMeter](https://jmeter.apache.org/usermanual/component_reference.html#BeanShell_Sampler)\n * [CA DevTest](https://docops.ca.com/devtest-solutions/8-0-2/en/using/using-ca-application-test/using-the-workstation-and-console-with-ca-application-test/advanced-features/using-beanshell-in-devtest/using-beanshell-scripting-language)\n * [Cisco Prime Network](https://www.cisco.com/c/en/us/td/docs/net_mgmt/prime/network/5-0/customization/guide/CiscoPrimeNetwork-5-0-CustomizationGuide/appendix-commandbuilder.html)\n * [ImageJ](https://imagej.net/BeanShell_Scripting)\n * [JDE for Emacs](https://www.emacswiki.org/emacs/JavaDevelopmentEnvironment)\n * [Joget](https://dev.joget.org/community/display/KBv6/Bean+Shell+Programming+Guide)\n * [LibreOffice](https://help.libreoffice.org/Common/Scripting_LibreOffice)\n * [LifeRay](https://dev.liferay.com/discover/portal/-/knowledge_base/7-0/using-liferays-script-engine)\n * [Mentawai](http://old.mentaframework.org/configuration.jsp?loc=en)\n * [Micro-Manager](https://micro-manager.org/wiki/Script_Panel_GUI)\n * [NetBeans](http://plugins.netbeans.org/plugin/40982/beanshell)\n * [OpenJUMP](http://ojwiki.soldin.de/index.php?title=Scripting_with_BeanShell)\n * [OpenKM](https://www.openkm.com/wiki/index.php/Scripting_-_OpenKM_6.2)\n * [Spring](https://docs.spring.io/spring-framework/docs/3.2.x/spring-framework-reference/html/dynamic-language.html)\n * [TestNG](https://testng.org/doc/documentation-main.html#beanshell)\n * [jAlbum](https://jalbum.net/help/en/Scripting)\n * [jEdit](http://www.jedit.org/users-guide/beanshell-intro.html)\n * [Jupyter Notebooks](https://github.com/opeongo/jupyter_beanshell)\n\n## History\n\n### 2015: Move to github.com\n\nOn 2015-09-23, the BeanShell repository moved from https://code.google.com/a/apache-extras.org/p/beanshell/ to its new home on https://github.com/beanshell/beanshell/ as Google Code has been discontinued.\n\nThe project adopted an open, collaborative approach using [GitHub pull requests](https://github.com/beanshell/beanshell/pulls) and has since grown its committer base beyond the original Apache Extra team.\n\nhttp://beanshell.org/ remains available for older versions.\n\n### 2012: Move to apache-extras.org\n\nBeanShell was [proposed as an incubator project](https://wiki.apache.org/incubator/BeanShellProposal) to\nmove to [Apache Software Foundation](http://www.apache.org/). In preparation for this, the codebase\nfor BeanShell 2.0b4 was donated to ASF by a code grant, and the license changed to\n[Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\nThe source code was moved to http://apache-extras.org/ - a project home hosted by Google Code that was only informally associated with Apache Software Foundation. Many BeanShell committers were Apache committers; thus, Apache Extras seemed a natural home.\n\nHowever, the project did not move into the [Apache incubator](http://incubator.apache.org/) and remained at apache-extras.org as an independent project.\n\nIn March 2015, Google announced it would discontinue Google Code, which provided the hosting for Apache Extras.\n\n### 2007: Community fork beanshell2\n\nThe community forked BeanShell in May 2007, creating the [BeanShell2](https://code.google.com/archive/p/beanshell2/) project hosted on google code. The new fork saw crucial fixes and updates with several releases between 2011 and 2014.\n\nThe project moved to [GitHub](/pejobo/beanshell2) in June 2016 after Google Code was discontinued, and it is independently maintained.\n\nIn August 2017, BeanShell decided to merge all the changes from the BeanShell2 fork back upstream, ensuring that no effort was lost during this period.\n\n### 2005: JSR 274: The BeanShell Scripting Language\n\nIn 2005, JSR 274 was accepted for officially defining the language but was never completed.\nThe current status is dormant, as voted by the JCP in June 2011.\n\n[JSR 274: The BeanShell Scripting Language](https://jcp.org/en/jsr/detail?id=274)\n\n### 1999: beanshell.org\n\nBeanShell was originally developed by Patrick Niemeyer at http://beanshell.org/ - distributed as\nBeanShell (2.0b4 and earlier) were distributed under\nGNU Lesser General Public License (LGPL) and Sun Public License (SPL).\n\nIn 2000, the project was hosted [on sourceforge](https://sourceforge.net/projects/beanshell/), which quickly saw interest in the new Java scripting language grow.\n","funding_links":[],"categories":["Uncategorized","Java","JVM语言"],"sub_categories":["Uncategorized"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeanshell%2Fbeanshell","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeanshell%2Fbeanshell","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeanshell%2Fbeanshell/lists"}