This question is not answered. Helpful answers available: 2. Correct answers available: 1.

Permlink Replies: 1 - Pages: 1 - Last Post: 6 Nov 22, 23:41 Last Post By: ctwist Threads: [ Previous | Next ]

Posts: 471
Registered: 27-Sep-2003
Latest BeanShell
Posted: 6 Nov 22, 15:04
  Click to reply to this thread Reply
If a decision to abandon BeanShell soon has already been made, then this message is irrelevant. However, if BeanShell support will continue in the short term, this is relevant.

BeanShell 2.1 is not recommended, according to posts in the BeanShell forum. They recommend to pull the latest snapshot. is really old and misleading; I don't understand why they don't update it.

To see what has changed, go to Some of the completed changes are important, e.g. "Java 16 and strongly encapsulated Java internals". It seems that the major problem that prevents a new release is incomplete testing of changes that were imported from the old SourceForge repository.

I decided to try installing the latest BeanShell build. I have never used Maven, but this was an excuse to force myself to try it. It looks complicated, but it was quite easy.

I assume that you don't want to go through the process of generating the latest BeanShell, so I have attached it.

This is how I did it:

1) Install the latest version of BeanShell

(Refer to my next message for detailed instructions.)

I renamed this to bsh-2.2.2.jar and replaced this file in jalbum\lib.

2) Test jAlbum

I opened jAlbum successfully.

I opened my project and it failed:
Exception in thread "Skin onload thread" java.lang.NoClassDefFoundError: bsh/BshScriptEngine
	at se.datadosen.jalbum.AlbumBean.pushVars(
	at se.datadosen.jalbum.ASTEvaluator.enterScope(
	at se.datadosen.jalbum.ASTEvaluator.setScope(
	at se.datadosen.jalbum.ASTEvaluator.<init>(
	at se.datadosen.jalbum.AlbumBean.prepareMakeAlbum(
	at se.datadosen.jalbum.AlbumBean.init(
	at se.datadosen.jalbum.JAlbumFrame.executeScript(
	at se.datadosen.jalbum.JMainSettingsPanel$5$
Caused by: java.lang.ClassNotFoundException: bsh.BshScriptEngine
	... 8 more Read timed out

I opened the two jar files, and saw that BshScriptEngine.class has been moved to the "engine" subfolder. This explains the exception.

Anyway, this should be a more reliable version of BeanShell. I hope there is interest in pursuing it. If not, I have only wasted 2 hours of my life when I could have been raking leaves.

Posts: 471
Registered: 27-Sep-2003
Re: Latest BeanShell
Posted: 6 Nov 22, 15:08   in response to: ctwist in response to: ctwist
  Click to reply to this thread Reply
This is how I created the latest BeanShell version:

1) Install Maven:
An intro to Maven is at . You don't need to read this; just follow my instructions.

Go to

Download the binary zip archive:

Extract this. It creates folder apache-maven-3.8.6. For convenience, I left this in the Downloads folder; you may choose to move it elsewhere.

Add apache-maven-3.8.6\bin to the Windows path:
  • Open "Settings"
  • Search for "Path"
  • Select "Edit the system environment variables". This opens "Environment variables".
  • Click on "Environment Variables ...".
  • In "System variables", find JAVA_HOME. This can be set to a JRE or a JDK. Maven requires this to be a JDK. Set it to "C:\Program Files\jalbum\jre64".
  • In "System variables", click on "Path".
  • Click on "Edit..."
  • Click on "New..."
  • Enter "C:\Users\your username\Downloads\apache-maven-3.8.6\bin"
  • Click on "OK", "OK".
  • Exit
  • Open a Command Prompt
  • Enter: mvn -v
This shows the Maven details.

2) Create the BeanShell jar file
  • Go to
  • Click on "Code". Download ZIP. This creates
  • Unzip this file. This creates a folder beanshell-master.
  • Open "Command Prompt"
  • > cd C:\Users\your username\Downloads\beanshell-master
  • > mvn install
This creates beanshell-master\target\bsh-3.0.0-SNAPSHOT.jar.
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums