Setting the CLASSPATH for Java Applications
There are two ways to set the CLASSPATH of a Java application:
The first method is recommended because it does not
modify the desktop.
Note: Regardless of the method you choose, the Arguments property
of the Windows application adapter must contain the class name (without
the extension). Also keep in mind that the paths set on Studio and on
Runtime must
be identical.
This is the recommended method because it does not modify the desktop. A Java application uses a Windows Application adapter. To set the path argument in Studio, perform the following steps:
Open the Properties window for the Windows Application adapter.
Do one of the following in the Arguments property:
If CLASSPATH is not already set as an environment variable or if you want to override the CLASSPATH environment variable, type -classpath "the location of the Java application" class name (without an extension)
If CLASSPATH is already set as an environment variable, type only the class name (without an extension) .
You only need to add the CLASSPATH for a particular application once and you can add multiple applications at the same time. To set the environment variable for the CLASSPATH of a Java application, begin by opening the Windows Control Panel. Then follow these steps, which reflect Windows 7.
In Control Panel, select System and Security > System. Then click Advanced system settings. The System Properties dialog opens.
Click Environment Variables. The Environment Variables window is displayed.
Click New in the System variables area. The New System Variable window is displayed.
Enter classpath in the Variable name field. It is case sensitive.
Enter the location of the Java applications in the Variable value field. If you are listing more than one, separate each with a semicolon (;).
Click OK. The new variables and values appear in the System variables area.
Add the class name to the Windows Adapter Arguments property as if it were already set as an environment variable..
Restart Studio and Runtime.
Related information
Privacy | Trademarks | Terms of Use | Feedback
Updated: 01 July 2024
© 2016 - 2024 Pegasystems Inc. Cambridge, MA All rights reserved.