- Public class HelloWorld {
- public static void Main (string[] args) {
- System.out.println ("Hello World!");
- }
- }
- #!/bin/ksh
- echo "--------helloWorld------->>"
- Java_home= "/usr/jdk/jdk1.6.0_34"
- Java_options= "-hotspot-xms128m-xmx512m"
- Class_path=.;. /lib;
- Java-jar Helloworld.jar
Note:
The class that runs the main method is specified in the MANIFEST.MF in the jar package:
Main-class:com.test.developersybasetest
If additional jar packages are required, specify by the following parameters:
Class-path:./lib/jconnect2.jar
Note: A space is required after Class-path: a space is required between multiple jar packages, and a single line of characters cannot be too many, and a space is required before the jar package when swapping lines.
The class that runs the main method is specified in the MANIFEST.MF in the jar package:
Main-class:com.test.developersybasetest
If additional jar packages are required, specify by the following parameters: (Note: Class-path: After a space is required, a space is required between multiple jar packages, and a line character cannot be too many, and a space is required before the jar package when swapping lines.) )
Class-path:./lib/jconnect2.jar
The jar file is executed under Linux through the SH script.