- Richard Feynman -
Category:Java tools
From Juneday education
Java comes with a range of tools for different purposes. We will introduce most of them below.
Contents
Java Compiler
The Java [compiler] transforms programs written in the Java programming language in to Java bytecode, which can be executed in the JVM.
If you download the Java Development Kit from Oracle, the Java compiler is called javac.
javac
Examples on how to use java:
- If you want to compile a file called Hello.java you write:
-
javac Hello.java
-
- If you want to compile a file called Hello.java and GoodBye.java you write:
-
javac Hello.java GoodBye.java
-
- If you want to compile a file called Hello.java and GoodBye.java which are found in a packge called com.example you write:
-
javac com/example/Hello.java com/example/GoodBye.java
-
Java runtime environment
If you download the Java Development Kit or the Java Runtime Environment from Oracle, the Java runtime environment is called java.
java
Examples on how to use java:
- If you want to run(or execute) a class file called Hello.java which is found in a packge called com.example you write:
-
java com.example.Hello
- This invokes the Java runtime environment and loads the class com.example.Hello, which in turn is started via its main method.
-
Other tools
javah
javap
This category currently contains no pages or media.