In the Java programming language, all source code is first written in plain text files ending with the .java extension. Those source files are then compiled into .class files by the javac compiler.
A .class file does not contain code that is native to your processor; it instead contains bytecodes — the machine language of the Java Virtual Machine (Java VM).
The java launcher tool then runs your application with an instance of the Java Virtual Machine.
Because the Java VM is available on many different operating systems, the same .class files are capable of running on Microsoft Windows, Solaris OS, Linux, or Mac OS.
Downloading and Installing JDK (Java Development Kit)
- The first thing you need to do is open internet browser. Once you have open browser type the urlhttp://www.oracle.com/technetwork/java/javase/downloads/index.html
- It will open Java SE downloads page. Java SE stands for java standard edition.For software developement you need to downoad JDK (Java SE Development Kit).
- Now click on Java Icon it will open new page. Accept licence agreement and click on option according to your OS for example : for Windows 32bit user, download jdk-8u31-windows-i586.exe and for Windows 64bit user download jdk-8u31-windows-x64.exe.
- Once you download it, double click the executive file. Follow steps of wizards, once all done Java compiler is downloaded on your system.
Setting Path variable
- Open Windows explorer. Double Click on C:drive than Program Files, you will find Java Folder. Open It you will find two folder something like jdk1.8.0_25 and jre1.8.0_31.
- Double Click jdk1.8.0_25 folder and open bin folder copy the path from address bar that will something like C:\Program Files\Java\jdk1.8.0_25\bin.
- Open Control Panel ⇒ System ⇒ Advanced system settings
- In System Properties window click on Enviornment Variables...
- In Enviorment variables window, under System Variables, select path variable then click Edit.. button.
- Now Edit System Variable window will open, in the Variable value text field go to end, type semicolon; and then paste the path we have copied. Click Ok.
- Open cmd (commmand prompt) type javac if your screen should look like this java compiler is successfully installed.
No comments:
Post a Comment