ok.. my english is not so good.. maybe I was not able to express me well...
lets do a step by step:
( I suppose you have the JDK installed, so you can use the 'Javac' and 'Java' commands from your command prompt. )
1) Create your class ( Magamar ): Create a file named 'Magamar.java' ( maybe in c:\javaproject, so it will be c:\javaproject\Magamar.java )
2) Edit the file and put the code into it:
public class Magamar
//this is the main method
public static void main (String args)
//this prints whatever is below.
3) open the command prompt ( windows ) or console ( linux ) and use 'cd c:\javaproject' ( you must be in the same folder as your Magamar.java file )
4) Execute the 'javac' command:
#> javac Magamar.java
( you may notice it will create a file called Magamar.class in the same directory )
5) run your program ( use 'java' command )
#> java -cp . Magamar
- it will call the java 'interpreter' ( its the java virtual machine btw ) telling to execute the Magamar.class file
You must see the 'Hello World' string on console.
Are you using some IDE to develop? or are you developing on 'notepad' or some text editor?