Will, In order to run your project from the command like you need to use the "javac" command with your terminal (linux/unix/os x) or cmd prompt (win):
javac Hello.java It will compile your file into a .class file. Once this is done then you need to run the "java" command on your file without the extension: java Hello This will run your application and you will see any output in the terminal. A .jar file or .zip file of you project is what you should turn in as homework. A .jar is just a zip format to pack up your project - it is not meant to run when you click on it. Link: http://www.javapassion.com/handsonlabs/javaprogenv/index.html#Exercise_2 Hope this helps. Caleb On Sat, Nov 21, 2009 at 10:05 AM, will phan <[email protected]> wrote: > Hi everyone ! > > I've just started with this course and now I have a problem. > I have a Hello project and then build it to Hello.jar. When I double click > on this Hello.jar nothing happens. How can I execute it directly !? (not > convert to .exe) > > Hope somebody can show it to me ! Many thks > > -- > To post to this group, send email to > [email protected] > To unsubscribe from this group, send email to > [email protected]<javaprogrammingwithpassion%[email protected]> > For more options, visit this group at > http://groups.google.com/group/javaprogrammingwithpassion?hl=en -- To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en
