Home

 

Running Java applications external to Application Developer

After you have exported the Java application as a JAR file, you can run the Java application on any installed JRE on your system (at least as long as there are no version conflicts).

Note: Ensure that the JRE is set in the Windows environment variable called PATH. You can add the JRE to the path with the following command in the Windows Command Prompt:

set path=%path%;{JREInstallDirectory}\bin
set path=%path%;C:\IBM\SDP75Beta\jdk\bin

To run a Java application external to Application Developer on a Windows system, do these steps:

Open a Command Prompt and navigate to the directory to which you have exported the JAR file, for example C:\.

Enter the following command to run the ITSO Bank application:

java -jar ITSOBankApplication.jar

This results in the main method of BankClient being executed, and the results are shown in Figure | -36.



Figure 8-36 Output from running ITSOBankApplication.jar in Command Prompt

ibm.com/redbooks