   [java] after javac complier java file, the program doesn't sho
  I use prompt to run javac.exe.After javac complier file, the program shut up immediately nothing happen, no program pop-up.how can i solve this?   
  Actually, if I understood correctly, that is the expected behavior when the source code contains no error.Javac just compiles your .java files to binary in order to be able to run them in the virtual machine.  When the file is compiled the result is stored in a class file and the compiler silently finishes.To run the program you've just compiled you must use the java.exe (without the 'c') application followed by the class name.  For example:> javac Test.java> java TestHello, World>;  javac only compiles the code, it doesn't run the program.use java ClassName to run the application (Where ClassName is the name of the class containing your main method)   ;Quote:Original post by summakyActually, if I understood correctly, that is the expected behavior when the source code contains no error.Javac just compiles your .java files to binary in order to be able to run them in the virtual machine.  When the file is compiled the result is stored in a class file and the compiler silently finishes.To run the program you've just compiled you must use the java.exe (without the 'c') application followed by the class name.  For example:> javac Test.java> java TestHello, World>well, it still doesn't workI used javac and i got class file (a.classfile)then i type "java a"no erro but the program immediate close (same condition as javac)i don't understand.there are no need to put javac.exe, java,exe in the same folder of a.classfile,right?what I make the mistake?;Quote:Original post by SimonForsmanjavac only compiles the code, it doesn't run the program.use java ClassName to run the application (Where ClassName is the name of the class containing your main method)i used java to run the className but it is not work   ;Quote:Original post by fantasymeQuote:Original post by SimonForsmanjavac only compiles the code, it doesn't run the program.use java ClassName to run the application (Where ClassName is the name of the class containing your main method)i used java to run the className but it is not workRead this.   ;Quote:Original post by fantasymeQuote:Original post by SimonForsmanjavac only compiles the code, it doesn't run the program.use java ClassName to run the application (Where ClassName is the name of the class containing your main method)i used java to run the className but it is not workmake sure the filename is the same as the classname aswell, capitalization matters.(I really don't think your class is named "a")also , do you run it from the commandline or from the run prompt ?(If you run it from the run promt the commandwindow will close immediatly as the program finnishes and you won't have time to see what it actually did)   