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.

If you have problems running jAlbum from the Windows command line, ensure that the command starts with the path to jAlbum’s bundled Java. For example, if you are in the jAlbum program directory, you can enter the following on the command line to get a list of all allowed parameters:

jre64\bin\java -jar JAlbum.jar -?

No matter where you are in the directory structure, you can enter the following on the command line to get a list of the parameters:

"C:\Program Files\jAlbum\jre64\bin\java" -jar "C:\Program Files\jAlbum\JAlbum.jar" -?

macOS users should use Terminal and enter:

/Applications/ -help

Select Tools->Open directories->"Program directory" to find the right directory.

Here is a list of the currently allowed parameters and their Mac OS defaults (Windows use ISO-8859-1 instead of UTF-8 text encoding):

-acceleratedScaling true (Settings » Images » Advanced » Attempt to use hardware accelerated scaling)
-accountProfileName (Upload » Account » profile name)
-albumAddress (Upload » Location : Settings » General » Address)
-albumHeight 420 (Share » Embed album » Album height)
-albumWidth 560 (Share » Embed album » Album width)
-appendImages (Make Test)
-classicReaders false (Used by old Java versions of jAlbum)
-closeupDirectory slides (Settings » Advanced » Naming » Close up directory)
-closeupPrefix (Settings » Advanced » Naming » Close up prefix)
-cols 6 (Settings » Pages » Thumbnail layout » Columns)
-connected false 
-copyOriginals true (Settings » Pages » Image linking » Copy originals if needed)
-cpuCores 4 (Preferences » General » No of threads)
-creator (Settings » Images » General » Copyright embedding » Creator)
-creditText credit1 (Settings » Pages » Credit links » Text)
-dateFormat (Settings » Advanced » General » Date format)
-DdebugVariants=true (combined with forceProcessing=true will print variant size on to images)
-directoriesFirst true (Settings » Pages » Image ordering » directories first)
-directory (Settings » General » Image directory)
-directoryChaining NO_CHAINING (Settings » Advanced » General » Chain directories)
-disableColorSubsampling false (Settings » Images » Advanced » Disable color sampling)
-displayVersion 24 (No setting, generated value)
-excludeBacklinks false (Settings » Pages » Credit links » Exclude credit links)
-excludeByDefault false (Settings » Advanced » General » Exclude new images by default)
-exifImageDescription false (Settings » Advanced » Metadata » Comment sources » EXIF Image desc.)
-exifUserComment false (Settings » Advanced » Metadata » Comment sources » EXIF user)
-folderThumbSize 400x400 (Settings » Images » Image bounds » Folders)
-forceJPEGImages false(Settings » Images » Advanced » Force JPEG images)
-forceJPEGThumbs false (Settings » Images » Advanced » Force JPEG thumbnails)
-forceProcessing false (Settings » Images » Advanced » Force processing of small images)
-ftpForceUTF8 false 
-ftpPassword (Upload/Manage step 1 » Password)
-ftpPort 21 ( (Upload/Manage step 1 » Advanced)
-ftpServer ( (Upload/Manage step 1 » Server name)
-ftpUser ( (Upload/Manage step 1 » User name)
-generateJSON false (Settings » Advanced » Metadata » Generate JSON data)
-hiDPIImages false (Settings » Images » General » HiDPI images)
-hiDPIThumbs false (Settings » Images » General » HiDPI thumbnails)
-highQualityThumbs true (Setting removed from version 18)
-homepageAddress (Settings » Pages » Link to home page » Address (URL))
-homepageLinkText (Settings » Pages » Link to home page » Text)
-ignorePattern \..* (Settings » Advanced » General » Ignore pattern)
-imageBackgroundColor #ffffff (Settings » Images » Advanced » Background color for translucent images)
-imageLinking LinkScaled (Settings » Pages » Image linking from thumbnails » Link to…)
-imageOrdering OrderByDate (Settings » Pages » Image Ordering » )
-imageSize 640x480 (Settings » Images » General » Image bounds » Images)
-imageVariants [] (Settings » Images » Variants » Images)
-includeDirectories true (Settings » Advanced » General » Include subdirectories in index pages)
-includePattern (No setting - symmetry for ignore pattern?)
-indexPageName index (Settings » Advanced » Naming » Index page name)
-internalVersion current version xx.xx.xx (No setting, generated value)
-iptcCaption true (Settings » Advanced » Metadata » Comment sources » IPTC caption)
-jAlbumVersion 28.1.6 (current version xx.xx)
-jpegComment false (Settings » Advanced » Metadata » Comment sources » JPEG)
-keepMetaData false (Settings » Advanced » Metadata » Include photographic data in generated images)
-keepXmpData true (Settings » Advanced » Metadata » Include XMP metadata in generated images)
-makeThumbs true (Set by the skin)
-mediaRSS true (Settings » Advanced » Metadata » Generate media RSS feed)
-metaData true (Settings » Advanced » Metadata » Include photographic data in generated pages)
-myjalbum false (??)
-notes (Settings » Advanced » Notes » Text field)
-notifyNotes true (Settings » Advanced » Notes » Notify on project load)
-outputDirectory album (Settings » General » Output directory)
-outputFormat JPEG (Settings » Images » Advanced » Output format)
-overrideExistingCopyright false (Settings » Images » General » Copyright embedding » Override existing)
-pageExtension .html (Settings » Advanced » Naming » Page extension)
-pageNamer (Settings » Advanced » Naming » Index page name)
-passiveMode true (Upload/Manage step 1 » Advanced » Passive mode)
-processFolderThumbs false (Settings » Images » General » Image bounds » Process folder thumbnails)
-programDirectory /Applications/ (Location of jAlbum application on the OS file system)
-projectFile (path to the project settings file)
-protocol ftp (Upload step 1 » Current Account » Type)
-qualityPercent 85 (Settings » Images » General » JPEG quality)
-qualityPercentWebP 60 (Settings » Images » General » WEBP quality)
-readXmp true (Settings » Advanced » Metadata » Comment sources » XMP)
-remoteDirectory VALUE_UNSET (Upload » Selected location)
-resourceDirectory res (No setting)
-reverseOrder false (Settings » Pages » Image ordering » Reverse)
-rights (Settings » Images » General » Copyright embedding » Copyright)
-rightsURL (Settings » Images » General » Copyright embedding » Copyright URL)
-rows 4 (Settings » Pages » Thumbnail layout » rows)
-runTool (Path to an external tool to be run)
-scalingMethod ScaleSmooth (Settings » Images » General » Scaling method » Smooth)
-searchEngineFriendlyNames false (for backward compatibility)
-sharpenPercent 25 (Settings » Images » General » Sharpen)
-skin Tiger (Name of skin to use)
-skinsDirectory /Applications/
-slideDirectory slides (Settings » Advanced » Naming » Slide directory)
-slides true (Settings » Pages » Image linking from thumbnails » Make slide pages)
-smartUpload (Make album)
-smoothScalingType STANDARD (Settings » Images » General » Scaling method » Custom)
-style Linen.css (Skin and Style » Style)
-subdirs true (Settings » Advanced » General » Process subdirectories)
-superimposeFilmIcon true (Settings » Images » Advanced » Superimpose play icon on video thumbnails)
-textEncoding UTF-8 (Settings » Advanced » General » Encoding)
-textFileComment true (Settings » Advanced » Metadata » Comment sources » Jalbum (text file))
-themeImageProcessor (??Skin??)
-themeImageSize (Set by the skin)
-thumbnailDirectory thumbs (Settings » Advanced » Naming » Thumbnail directory)
-thumbnailPrefix (Settings » Advanced » Naming » Thumbnail prefix)
-thumbSize 124x124 (Settings » Images » Image bounds » Thumbnails)
-thumbVariants [] (Settings » Images » Variants » Thumbnails)
-titleSource IPTCObjectName (Settings » Advanced » Metadata » Title source)
-uic followed by user identification code allows license activation from command line
-updatedDirsOnly false (Settings » Advanced » General » Process only updated subdirectories)
-uploadAll (Upload step 2 » Upload » Upload all)
-urlEncode true (backward compatibility)
-useCustomVideoSettings false (Settings » Videos » Use custom settings)
-user.<your variable> <value>
-useThumbForFolderIcon true (Settings » Advanced » General » Use thumbnail for folder icon)
-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= (Settings » Videos » Advanced)
-videoQuality 50 (Settings » Videos » Quality)
-videoResolution p720 (Settings » Videos » Resolution)
-visibleOnProfilePage true (Upload » Privacy » Visible on profile page)
-webPassword (Upload » Privacy » Password)
-webSafeNames true (backward compatibility)
-widgetInjection true (Settings » Advanced » Metadata » Include jAlbum widget support)
-writeUTF8 true (Settings » Advanced » General » Write UTF-8)

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

You can match the parameters above to their GUI settings by referencing them in GUI Settings and album-settings.jap

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 

On a Mac it would be something like this (on one line

-directory /Users/userName/My\ Albums/ProjectName 
-sameDirectory jalbum-settings.jap

Here's another example that uploads the same project to a web server (v6). Note to ‘make and upload’ the album you first need to ‘make it’, as in the example above, and then run the command again with -smartUpload appended:

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 a 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.