List of Java Commands

 

 

 

Some Useful Java Commands

1. javac

javac fileName.java –> used to compile java code.

javac  *.java  –> used to compile all java file.

javac -classpath “classpath_location” <filename.java> –> set classpath and compile java code.

2. java
java  filename –> used to run java program.

java -jar Jarfilename.jar –>used to run jar file.

3. javap

javap <package_name.classname> –> used to view the structure of compiled class(.class file).

4. jar

jar cfm <JarFileName> manifest.txt <fileName>.class –> used to create jar file.
jar -tvf “location of jarFile and Name” –> used to view the content of jar file.

5. javadoc

javadoc <filename.java> -d <destinaton_foldername> –> used to create java document.

6. appletviewer

appletviewer  appletName.java –> to run java applet program