Java command-line options

The following table describes the Java command-line options (for Java SE and Jakarta EE).

Java or Jakarta EE option Description

-appserver weblogic | websphere

Specifies the application server to process JSP files.

Equivalent property name:
com.fortify.sca.AppServer

-appserver-home <dir>

Specifies the application server’s home.

  • For Oracle® WebLogic®, this is the path to the directory that contains the server/lib directory.
  • For IBM® WebSphere®, this is the path to the directory that contains the JspBatchCompiler script.

Equivalent property name:
com.fortify.sca.AppServerHome

-appserver-version <version>

Specifies the version of the application server.

Equivalent property name:
com.fortify.sca.AppServerVersion

-cp <paths> |
-classpath <paths>

Specifies the class path used to analyze Java source code. The format is the same as javac: a semicolon- or colon-separated list of directories. You can use OpenText SAST file specifiers as shown in the following example:

-cp "build/classes:lib/*.jar"

For information about file specifiers, see Specifying files and directories.

Equivalent property name:
com.fortify.sca.JavaClasspath

-extdirs <dirs>

Similar to the javac extdirs option, accepts a semicolon- or colon-separated list of directories. Any JAR files found in these directories are included implicitly on the class path.

Equivalent property name:
com.fortify.sca.JavaExtdirs

-java-build-dir <dirs>

Specifies one or more directories that contain compiled Java sources.

-source <version>
-jdk <version>

Indicates the Java™ Development Kit (JDK) version for which the Java code is written. For supported versions, see Supported languages. The default is version 11.

Equivalent property name:
com.fortify.sca.JdkVersion

-custom-jdk-dir

Specifies a directory that contains a JDK. Use this option to specify a version that is not included in the OpenText SAST installation (<sast_install_dir>/Core/bootcp/). For supported versions, see Supported languages.

Equivalent property name:
com.fortify.sca.CustomJdkDir

-show-unresolved-symbols

Displays any unresolved types, fields, and functions referenced in translated Java source files at the end of the translation. It lists only field and function references for which the receiver type is a resolved Java type. Displays each class, field, and function with the source information of the first translated occurrence in the code. This information is also written in the log file.

Equivalent property name:
com.fortify.sca.ShowUnresolvedSymbols

-sourcepath <dirs>

Specifies a semicolon- or colon-separated list of directories that contain source code that is not included in the scan but is used for name resolution. The source path is similar to class path, except it uses source files instead of class files for resolution. Only source files that are referenced by the target file list are translated.

Equivalent property name:
com.fortify.sca.JavaSourcePath

See also

Java and Kotlin properties