By: Emiley J.
If you are familiar with C then Java should be very familiar to you in terms of syntax. If you are a C++ programmer the Java will be easier still since Java is also purely an Object Oriented Programming without some of the features like Pointers in C++.
To start programming your first Java program, you need to have some pre-requisites installed on your computer. As with any other programming language, you first need to install the SDK (Software Developer Kit) in this case it is JDK (Java Developers Kit). Now choosing which JDK to download maybe a little tricky if you are new to Java. So it will be advisable to read the How Java is Organised? before you proceed.
You have two options to get started with Java.
- If you want to do it manually, you will need to download a J2SE from Sun website and install on your computer. (The J2SE has many versions and it is better to check at the Sun website to get the latest JDK.)
- The J2SE download is usually an executable file which will install automatically like any windows software.
- Once the installation is successful, open a command line (DOS Window) and type 'Java' and 'Enter'. (If you see 'Bad command' then probably your PATH settings are wrong. In which add the installation path to the PATH variable from your 'computer properties' environment variables section.)
- Open a Notepad, write your first sample program (you will find many java samples here) and save it as .java file (the name of the file should be same as the name of the CLASS in the program)
- from the command window, change current directory to where you saved your .java file and compile the program ( Use 'javac' command followed by the name of the file to compile)
- Once it is compiled a .class file will be created in the same folder. Then run the program using 'Java' command (Use 'Java' command followed by the name of the class)
- As with any other programming language, Java too has many free IDE (Integrated Development Environments) You can choose any of them. Most of them comes bundled with the required JDKs.
- One of the widely used Java development tool is the Sun Studio. You can download it from the Sun website.
- Or you can download and use the net beans
1. Hi, I'm trying to learn Java on my own right now. I have a book I am reading and I get the idea of h
View Tutorial By: Aliaksandra at 2014-09-25 03:56:26
2. Hi friends i am the beginner ..
please guide me ..
View Tutorial By: Jigar at 2013-05-20 11:04:03
3. please sent the java code for course plan automation system
View Tutorial By: vijayakumar.r.r at 2009-08-27 01:39:22
Most Viewed Articles (in Java )
Latest Articles (in Java)
Comment on this tutorial
- Data Science
- Cloud Computing
- Java Beans
- Mac OS X
- Office 365
- Tech Reviews