הודעת שגיאה בjava

agvanya

New member
הודעת שגיאה בjava

הידרתי את התוכנית הבאה (גאווה):
public class FirstProgram { public static void main(String [] args) { System.out.println(); } }​
וכאשר הפעלתי את הקובץ FirstProgram.exe קיבלתי הודעת שגיאה
Exception in thread "main"​
מה אני אמור לעשות, כדי שהתוכנית תפעל?
 

mz70

New member
The question is how did you

get this exe file in the first place? In Java you will run a java file and not an exe file.
 

agvanya

New member
אז ככה...

את הקובץ FirstProgram.java הפכתי לקובץ FirstProgram.class אני לא זוכר בעזרת איזה תוכנה ואת הקובץ FirstProgram.class הפכתי לקובץ FirstProgram.exe על ידי התוכנה שהורדתי מ- http://www.excelsior-usa.com/jet.html
 

mz70

New member
But why are you trying to run

the exe file insted of the class file??? When you are using juva you run the compiled classes and not exe files. If you downloaded the Jsdk or any Java compiler you just have to use those tools to run the class. With plain Jsdk you will just run the command java and the name of the file from the command promt.
 
למעלה