jAlbum / SystemConsole


This window is mainly a tool to assist developers. It provides more detailed error information and allows developers to try out and play with scripts that they later on use in their jAlbum skins. Note logging errors to the the system console can be controlled by setting the logging level in Preferences/General or by skin developers sending their own diagnostic messages directly to the console

The window is split into two panels:

  • The upper panel allows scripts to be entered and evaluated. Press CTRL+E (⌘+E on Mac) to evaluate an expression. (Evaluates selected text if selection is active)
  • The lower panel prints results. It captures debug prints sent to System.out and System.err

jAlbum has two scripting engines under the hood that enables developers to extend jAlbum's functionality in various ways. You can either script in a Java-like scripting language called BeanShell or use JavaScript. (jAlbum 12.3 and up. Other languages can be added by adding the .jar file for the relevant language to jAlbum's "lib" or "ext" folder.)

Scripts are executed when skins are loaded (onload scripts), when album making starts (init scripts) and during album making (scriptlets inside the template pages of skins). Scripts are also executed whenever the user selects an external tool (see Tools->External tools)

You have access to the basic jAlbum implicit objects such as engine and window

Sample expressions (Java/BeanShell):

4*(3+2); // Basic calculations 
engine.getSkin(); // Use of implicit object
for (AlbumObject ao : selectedObjects) System.out.println(ao); // Iterate over selected objects
window.messageBox("You can interact with any Java object");

There are some code snippets that can be used here

Read more on extending jAlbum in our Developer center.