How to create and execute jar file using CMD(command prompt)

  •  Creating java file
Open note pad and write simple java  program and save as with .java extension.

ex: java code:
class HelloWorld {

    public static void main(String[] args) {
        System.out.println("Hello, World!!"); 
    }
}

save the text file with extension as .java

  • Creating class file

compiling java program through command prompt

Class file will be created in the same folder after successful compilation of java file

  • Create a manifest txt file with class names
ex:

NOTE: Space should be provided as highlighted in yellow

  • Command to convert java program to jar file


  • Execute jar file from Command prompt






 

Comments

Popular posts from this blog

Lr Advance Param Function In Loadrunner With Example

web_set_max_html_param_len

Error -27492: "HttpSendRequest" failed, Windows error code=12057 (certificate revoked) and retry limit (0) exceeded for URL="