Lesson 2
Follow these instructions to run your java code using cmd.
***Use this link to install java into your machine.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
***Use this link to install java into your machine.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
- Use the "Notepad" as your text pad.There are so many text pads like "Sublime Text2", "Notepad ++ ". Normally we use Notepad. Type our code in Notepad & save it as "First.java". Select file type as "All". Save it on the Desktop.
2. Open "cmd". Then find the location where java is installed. Go to the jdk version and open
bin file. You should copy that path. You can see like this path.
C:\Program Files\Java\jdk1.8.0_40\bin
Paste your path with below commands.
3. Type these commandson cmd.
path=C:\Program Files\Java\jdk1.8.0_40\bin
cd Desktop
javac First.java
java First
4. Now you can see this on cmd.
My First Java Code
Welcome to the Java World
I think now you ready to go our next step.
This is very useful.Awesome!
ReplyDeletethank you bro.
Delete