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 WebLogic, this is the path to the directory that contains the server/lib directory.
  • For 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 <dirs> |
-classpath <dirs>

Specifies the class path to use for analyzing Java source code. The format is the same as javac: a semicolon- or colon-separated list of directories. You can use Fortify Static Code Analyzer 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 JDK version for which the Java code is written. See the Fortify Software System Requirements document for supported versions. The default is version11.

Equivalent Property Name:
com.fortify.sca.JdkVersion

-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