So lets start, in this tutorial i will explain how to do an hello window that will appear in a CMD window...
1st Step:
Go to your desktop, Left click and make a new .txt file...
Name it to Hello.java
After Editing the name, double tap it, a window will open...
Type on in the following code:
Code:
public class Hello {
public static void main(String[] args) {
system.out.println("Hello");
}
}
Then, Save the file and Close it...
2nd Step:
Go to your desktop again, and make a new .txt file, name it to Compile.bat, Left click the file, and press "Edit", Then type the following on it:
Code:
@echo off
title Compile
javac*.java
pause
Now... Save and close it.
3rd Step:
Double tap your compile.bat file, wait some seconds, and there wil appear: Press any key to continue... when it appears, press any key like it says and it will close, a new file will appear on your desktop named of: "hello.class"
Now... Create a new .txt file in your desktop and name it to Run.bat Left Click it, press Edit and type there the following:
Code:
@echo off
title Hello
java Hello
pause
Save and close it...
AND YOUR FIRST JAVA SCRIPT IS DONE!
Now to run it double tap the run.bat... and done!
Explanation
"system.out.println[B]("Hello")" Will show whatever you want, any message you want in your hello java program... In this case, it will show Hello, If you want to add another thing, just remove the ("Hello") and add ("whatever you want here")...
"title Compile" You can change the title to whatever you want: title Whatever you want here...
I HOPE YOU UNDERSTAND!
Remember to use the THANKS BUTTON instead of just saying thanks in a reply!
Have Fun!