You run .class files, not .java files and you don't need the extension
Joined: Dec 26, 2008
i see... that's very noob of me. really sorry about it.
i have another question. i have around seven external libraries which means i have to add in a long list of jar into the command line..
is there a solution to that? like combining them all into a single jar? how do i do that?
Joined: Aug 05, 2005
If you're using Java 1.5 or later you can put all the jars into a directory and then use a wild card in your classpath
java -cp <path to myjardirectory>\* Noose_Machine
Note that the wild card is * and not *.jar
Alternatively, when you start writing more complex applications, you can combine all your class files into a jar file and then specify a list of all the required jars in the manifest file for your jar file. You then run your program with the java -jar command. There are plenty examples of this on these forums