The jar file is executed under Linux through the SH script.

Source: Internet
Author: User

    1. Public class HelloWorld {
    2. public static void Main (string[] args) {
    3. System.out.println ("Hello World!");
    4. }
    5. }
    1. #!/bin/ksh
    2. echo "--------helloWorld------->>"
    3. Java_home= "/usr/jdk/jdk1.6.0_34"
    4. Java_options= "-hotspot-xms128m-xmx512m"
    5. Class_path=.;. /lib;
    6. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.