1.javac
c:\ javac classname.java
A Java Compiler javac is a computer program or set of programs which translate java source code into java byte code.
Usage: javac <options> <source files>
where possible options include:
sed
on processors
o run; bypasses default discovery process
implicitly referenced files
2. java
c:\ java classname
Java interpreter translate the Java bytecode into the code that can be understood by the Operating System.
Usage: java [-options] class [args...]
(to execute a class)
or java [-options] -jar jarfile [args...]
(to execute a jar file)
where options include:
The default VM is client.
A ; separated list of directories, JAR archives, and ZIP archives to search for class files.
set a system property
enable verbose output
require the specified version to run
include/exclude user private JREs in the version search
enable assertions
disable assertions
enable system assertions
disable system assertions
load native agent library <libname>, e.g. -agentlib:hprof
see also, -agentlib:jdwp=help and -agentlib:hprof=help
load native agent library by full pathname
load Java programming language agent, see java.lang.instrument
show splash screen with specified image
3.javap
c:\ javap
This command provides the accessibility of the class members and other features given below .
Usage: javap <options> <classes>...
where options include:
and members (default)
by the bootstrap class loader
If verifying, print reasons for failure
4. apt (command of bin directory)
c:\apt
This command gives the information about the class path .
Usage: apt <apt and javac options> <source files>
where apt options include:
on processor factories
on processor factories
d class files
default discovery process
See javac -help for information on javac options.
5 .javah
c:\javah
This command include the header files that contains the methods .we need to implement some native methods. You must be wondering about what's native methods.
On the other hand, native methods are the only way to use any system features not provided by the Java Virtual Machine.
Usage: javah [options] <classes>
where [options] include:
<classes> are specified with their fully qualified names (forinstance, java.lang.Object).
6 . Javadoc
c:\javadoc classname.java
Javadoc is a program that is already included in JDK. We can use Javadoc to run over the source code to produce documentation of our classes in the HTML .
javadoc: error - No packages or classes specified.
usage: javadoc [options] [packagenames] [sourcefiles] [@files]
Provided by Standard doclet:
7 . jdb
c:\jdb -help
Java debugger helps in finding and the fixing of bugs in Java language programs. The Java debugger is denoted as jdb.
Usage: jdb <options> <class> <arguments>
where options include:
options forwarded to debuggee process:
For command help type 'help' at jdb prompt
8 .Applet viewer
C:\ appletviewer classname.html
Applet viewer is a command line program to run Java applets. It is included in the SDK. It helps you to test an applet before you run it in a browser.
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.
Ask Questions? Discuss: Various Commands that are used in java are given below
Post your Comment