COMMAND | USAGE |
---|---|
TO COMPILE JAVA PROGRAMS,IT DISPLAYS ALL OPTIONS RELATED TO COMPILATION javac Welcome.java |
|
java | TO RUN JAVA PROGRAMS,IT DISPLAYS ALL OPTIONS RELATED TO RUN THE PROGRAMS java Welcome java com.ram.Welcome(when we have .class file in the package) |
javac -d | COMPILE THE PROGRAMS AND PLACED IN PACKAGE javac –d destinationpath sourcepath javac –d . Welcome.java (Package folder will create in current directory) javac –d C:\myfolder\java\bin C:\myfolder\java\src\Welcome.java |
javap | TO KNOW THE DETAILS OF ANY CLASS,IT DISPLAYS ALL THE METHODS IN THAT CLASS AND implemented interfaces,extended classes also javap Welcome |
javadoc | CREATE DOCUMENTATION TO THE JAVA CLASSES javadoc Welcome.java |
jar | TO CREATE JAR FILES,WAR FILES,EAR FILES AND ALSO EXTRACT THESE FILES jar –cvf filename.jar(create) jar –cvf myjar.jar jar –cvf mywar.war jar –xvf myjar.jar(extract) jar –xvf mywar.war |
set | TO SET THE ENVIRONMENT VARIABLES LIKE ”CLASSPATH”, “PATH” AND “JAVA_HOME” set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_01; set PATH=C:\Program Files\Java\jdk1.7.0_01\bin; set CLASSPATH=servlet-api.jar; set CLASSPATH=servlet-api.jar;ojdbc14.jar; (CLASSPATH for more jars at a time) set CLASSPATH=%CLASSPATH%;hibernate3.jar; (set CLASSPATH to already existed CLASSPATH variable) |
TO KNOW THE VALUES LIKE ”CLASSPATH” , “PATH” AND “JAVA_HOME” ENVIRONMENT VARIABLES echo %CLASSPATH% echo %PATH% echo %JAVA_HOME% |
Sunday, 23 June 2013
REGULAR JAVA COMMANDS USED IN DOS COMMAND PROMPT
Subscribe to:
Posts (Atom)