Java Development Kit (JDK)

Capture

Java Development Kit (JDK)

To create Java applications you must have JDK provided free of charge by Sun Microsystems and can be downloaded at www.java.sun.com. Once installed, the JDK includes several important programs which are javac.exe as a Java compiler and a Java interpreter java.exe.

java
JAVA PROGRAMMING ENVIRONMENT

The steps to create a Java application is as follows:

Write a Java program can use a text editor that has been provided by each of the Operating System that is used for example in the Microsoft Windows notepad or better yet use JCreator to Netbeans, or BlueJ. In the example I use BlueJ, Example program below:
1public class Contoh1{
2public static void main(String args[]){ System.out.print("Halo semua...");
3System.out.println("saya sedang belajar Java di FajarYusuf.Com ...!"); System.out.println("Nggak susah belajarnya...");
4}
5}

Save with the exact same file name (his capital letter) the class name and add the extension java at the end of the file, ie Contoh1.java, then compile the text file with this command at the location of the folder where the file is stored.

The above command will generate bytecode with Contoh1.class name. How to run with the command java bytecode and its bytecode files without being followed by the extension class. 

For those using BlueJ will be as below:

GIF
coding results
Artikel Terkait:
Disqus Comments