The first step in Java Programming is Installing the Latest Version of JDK(Java Development Kit) and Environment variable setup.Without this we can't do anything.
After Installing the JDK in the 'C' or some directory.The next step is to setup the Environment variables.
What is the Pupose of setting Environment Variables?
While a code has to executed,we simply run it from bin directory rather than that its lot more easier to setup a environment variable and it extends our usability that we can place java file anywhere in the computer and can be executed using command prompt.
How to Setup Environment Variable?
Assumed that jdk is installed in C directory.
1.Right-click on 'My Computer' and select 'Properties'.
2.Click on the 'Environment variables' button under the 'Advanced' tab.
3.Click on New and make variable name as "Path" and value as
"C:\ProgramFiles\Java\jdk1.8.0_05\bin"
I hope you are done with the inital setup of java Environment in your system.
How Java code can be compiled and executed?
Java code can be executed in two ways.
1.By using the command prompt.
javac javafilename.java(To compile to byte code)
java classfilename(To execute the class file)
2.Using a Integrated Devolpment Environment.
There are two fabulous IDE's.
Netbeans- https://netbeans.org/index.html
Eclipse -http://www.eclipse.org/.
I myself recommend you to stick with IDE because it allows various error correction mechanisms too.
I wish to conclude this post that,these are basic things to be done to work with java. So next we are going to write a Simple program and after that we are
going to discuss about the essential things to be master in java.
(It may really bored one who already known this,I am writing for absolute beginners too so i am including these ideas but after some posts it'll be really interesting
for the programmers too)
After Installing the JDK in the 'C' or some directory.The next step is to setup the Environment variables.
What is the Pupose of setting Environment Variables?
While a code has to executed,we simply run it from bin directory rather than that its lot more easier to setup a environment variable and it extends our usability that we can place java file anywhere in the computer and can be executed using command prompt.
How to Setup Environment Variable?
Assumed that jdk is installed in C directory.
1.Right-click on 'My Computer' and select 'Properties'.
2.Click on the 'Environment variables' button under the 'Advanced' tab.
3.Click on New and make variable name as "Path" and value as
"C:\ProgramFiles\Java\jdk1.8.0_05\bin"
I hope you are done with the inital setup of java Environment in your system.
How Java code can be compiled and executed?
Java code can be executed in two ways.
1.By using the command prompt.
javac javafilename.java(To compile to byte code)
java classfilename(To execute the class file)
2.Using a Integrated Devolpment Environment.
There are two fabulous IDE's.
Netbeans- https://netbeans.org/index.html
Eclipse -http://www.eclipse.org/.
I myself recommend you to stick with IDE because it allows various error correction mechanisms too.
I wish to conclude this post that,these are basic things to be done to work with java. So next we are going to write a Simple program and after that we are
going to discuss about the essential things to be master in java.
(It may really bored one who already known this,I am writing for absolute beginners too so i am including these ideas but after some posts it'll be really interesting
for the programmers too)
No comments:
Post a Comment