Running jAlbum from the command line

Revision as of 7 November 2014 14:28 by sannanordgren (Comments | Contribs)

The jAlbum application can also be controlled from the command line. It accepts the same parameters as you are able to set through the graphical user interface.

Issue java -jar JAlbum.jar -help in the same directory as the jAlbum application is installed in and jAlbum will list all allowed parameters. Here is a list of the currently allowed parameters and their defaults:

-alwaysUploadPages true
-appendImages false
-classicReaders true
-closeupDirectory slides
-cols 6
-copyOriginals false
-directoriesFirst true
-exifImageDescription false
-exifUserComment true
-ftpForceUTF8 false
-ftpPort 21
-highQualityScaling false
-highQualityThumbs true
-ignorePattern \..*
-imageLinking LinkScaled
-imageOrdering OrderByDate
-imageSize 800x800
-includeDirectories true
-indexPageName index
-iptcCaption true
-jpegComment false
-metaData true
-outputDirectory album
-pageExtension .html
-passiveMode true
-programDirectory C:\Dev\Java\jAlbum
-progressiveMode false
-qualityPercent 70
-remoteDirectory album
-resourceDirectory res
-reverseOrder false
-rows 4
-sameDirectory false
-savePassword true
-secureFtp false
-skin XP
-skinsDirectory C:\Dev\Java\jAlbum\skins
-slideDirectory slides
-slides true
-style Plain.css
-subdirs true
-textEncoding ISO-8859-1
-textFileComment true
-thumbSize 120x120
-thumbnailDirectory thumbs
-updatedDirsOnly false
-urlEncode false
-user.<user variable> <value>
-webRoot http://
-writeUTF8 false

User defined variables are passed as -user.yourVariable "Value". Similar applies to skin defined variables (having a -skin. prefix). Command line mode is great for automated album generation and updates. Webmasters can make scripts that call the jAlbum application regularly to update server albums etc.


Variables and their parameters are case sensitive, so remember to write -projectFile, not -projectfile or -ProjectFile for instance.


Here is an example that updates an album out of files in D:\Nature and grabs other settings from the nature.jap project file:

java -Xmx400M -jar JAlbum.jar -directory D:\Nature -sameDirectory -projectFile nature.jap -appendImages

(The -Xmx400M flag allows jAlbum to grab up to 400MB of RAM if needed. The default of 64MB is not enough)

Here's another example that uploads the same project to a web server (v6):

java -jar JAlbum.jar -directory D:\Nature -sameDirectory -projectFile nature.jap -smartUpload

Here is an example that makes jAlbum enter "server mode" by running the "Server mode" Tool. When in "server mode", jAlbum monitors changes under the image directory. As soon as a change is detected (new image added for instance) a "Make album" operation is triggered. jAlbum then resumes to monitor the image directory.

java -Xmx400M -jar JAlbum.jar -projectFile nature.jap -runTool "tools/Server mode.bsh"

Here is finally how to launch jAlbum in windowed mode from a command line and having it load an album project:

java -Xmx400M -jar JAlbum.jar jalbum-settings.jap"

Linux/UNIX users: To run jAlbum from the command line in a plain server system (with no access to the X windowing system) add the -Djava.awt.headless=true command line switch.