Running IGV directly via the java command is complex and generally not recommended for most users. Use the provided launcher scripts instead. If you must run it manually, use the following patterns depending on your environment.
Using system Java (Java 11+ required)
java --module-path=lib -Xmx4g @igv.args --module=org.igv/org.igv.ui.Main
Using bundled JDK (e.g., JDK 21)
If using the JDK included in the IGV package, substitute the java command with the path to the bundled binary:
./jdk-21/bin/java --module-path=lib -Xmx4g @igv.args --module=org.igv/org.igv.ui.Main
Using the java_arguments file with direct command
To ensure your custom memory and scaling settings in java_arguments are applied when running the direct command, use the @ syntax to point to the file.
Linux & Mac:
java --module-path=lib @igv.args @"$HOME/.igv/java_arguments" --module=org.igv/org.igv.ui.Main
Windows:
java --module-path=lib @igv.args @"%USERPROFILE%/.igv/java_arguments" --module=org.igv/org.igv.ui.Main
java --module-path=lib @igv.args @"$HOME/.igv/java_arguments" --module=org.igv/org.igv.ui.Main