Steps to run JAVA code using command prompt:
- pc
- right click
- properties
- advance system settings
- environment variable
- system variable
- path
- C:\Program Files\Java\jdk1.8.0_144\bin
- click three times 'ok'.
- go to command promt (start+r+cmd)
- type javac -version
- start notepad hello.java
- yes
- type code
- javac hello.java
- java hello
- done😊
/////////////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
a.java
class a
{
public static void main(String a[])
{
System.out.println("hello world");
}
}
{
public static void main(String a[])
{
System.out.println("hello world");
}
}
///////////////////////////////////////////
compile it using javac a.java
run it using java a
then you will get output.
(my intension is to use windows like fedora.....)
Thank you so much............
Comments
Post a Comment