Running jAlbum from the command line

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. Select Tools->Open directories->"Program directory" to find the right directory.

Here is a list of the currently allowed parameters and their defaults:

-acceleratedScaling true
-albumHeight 420
-albumWidth 560
-appendImages false
-chainDirectories false
-classicReaders false
-closeupDirectory slides
-cols 6
-connected false
-copyOriginals true
-cpuCores 4
-creditText credit8
-directoriesFirst true
-displayVersion 15.1 (Currently installed version)
-excludeBacklinks false
-excludeByDefault false
-exifImageDescription false
-exifUserComment false
-forceJPEGWriting false
-ftpForceUTF8 false
-ftpPort 21
-hiDPIImages false
-hiDPIThumbs false
-highQualityThumbs true
-highThumbnailCompressionQuality false
-hiResDirectory hi-res
-ignorePattern \..*
-imageBackgroundColor #ffffff
-imageLinking LinkScaled
-imageOrdering OrderByDate
-imageSize 640x480
-includeDirectories true
-includeHiResImages true
-indexPageName index
-internalVersion 15.1b1
-iptcCaption true
-jpegComment false
-keepMetaData false
-keepXmpData true
-makeThumbs true
-mediaRSS true
-metaData true
-myjalbum false
-outputDirectory album
-overrideExistingCopyright false
-pageExtension .html
-passiveMode true
-programDirectory /Applications/ or for Windows C:\Dev\Java\jAlbum
-progressiveMode false
-protocol ftp
-qualityPercent 85
-readXmp true
-remoteDirectory album
-remoteFS info.cqs.remotefs.RemoteFSBean@15975490
-resourceDirectory res
-reverseOrder false
-rows 4
-scalingMethod ScaleSmooth
-searchEngineFriendlyNames false
-sharpenPercent 25
-skin Tiger
-skinsDirectory /Applications/ or for Windows  C:\Dev\Java\jAlbum\skins
-slideDirectory slides
-slides true
-smoothScalingType STANDARD
-style Linen.css
-subdirs true
-superimposeFilmIcon true
-suppressIEWarnings true
-textEncoding UTF-8
-textFileComment true
-thumbnailDirectory thumbs
-thumbSize 124x124
-titleSource IPTCObjectName
-updatedDirsOnly false
-urlEncode true
-useCustomVideoSettings false
-user.<your variable> <value>
-useThumbForFolderIcon true
-videoParameters -y=,-i=$inputPath,-vf=hqdn3d\=1.5:1.5:6:6\,scale\=min(iw\\\,trunc(iw*min($videoWidth/iw\\\,$videoHeight/ih)*0.5)*2):min(ih\\\,trunc(ih*min($videoWidth/iw\\\,$videoHeight/ih)*0.5)*2)\,unsharp\=3:3:1.0:3:3:0.0\,$normalizeOrientation,-ss=$clipStart,-t=$clipLength,-threads=0,-b:a=96k,-ac=2,-ar=44100,-vcodec=libx264,-crf=$videoQuality,-metadata:s:v:0=rotate\=0,-movflags=faststart,-pix_fmt=yuv420p,$outputPath=
-videoQuality 50
-videoResolution p480
-visibleOnProfilePage true
-webSafeNames true
-widgetInjection true
-writeUTF8 true

Required arguments are -directory and (-outputDirectory or -sameDirectory).

-appendImages Is no longer included with the -help list of commands, it is shown for older versions of jAlbum. It is the equivalent of using ‘Make changes’, it does not reprocess images and overrides jAlbum’s default of doing a ‘smart make’ (or make all if jAlbum is older than 8.1!), updating only those files that need reprocessing. Use with care!

-includeHiResImages is the equivalent to ‘Link to hi-res* via scaled images’ which is only available for jAlbum versions prior to 15.

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.

Passing parameters is accomplished by using the -D switch before the -jar parameter, for example

java -Duser.language=en -jar JAlbum.jar

You can see what parameters can be used by looking in the list of properties in the help/about menu


Note, in the following examples the commands are shown on separate lines for clarity and readability on smaller screens, the commands must actually be entered as a single command line.

Here is an example that updates an album out of files in D:\Nature and grabs other settings from the nature.jap project file. The -Xmx400M flag allows jAlbum to grab up to 4000MB of RAM if the default amount is not enough.

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

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

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

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 

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.