beginner to java - how to run outside jcreator/netbeans ?
Hi,
Im new to Java, started this year in university. I was just wondering, after making this card game, how can i get it to run outside the program im using to create it (jcreator or netbeans). I heard I had to make it a jar file, tried it still didnt work.
Any help is greatly appreciated,
[311 byte] By [
Altimimia] at [2007-10-2 6:25:30]

look in the javadocs under tools for java.exe. that's the jvm that actually runs your java application.
if the .class file that contains the main method you want to run is in package foo.bar and named Bat.java, you'll open a command shell, navigate to the parent directory of the foo directory, and run it like this:
java -classpath .;path-to-jar1.jar;path-to-jar2.jar foo.bar.Bat
Note the "dot" at the start of the CLASSPATH. You have to add each 3rd party JAR individually, of course.
%
> Hi,
> Im new to Java, started this year in university. I
> was just wondering, after making this card game, how
> can i get it to run outside the program im using to
> create it (jcreator or netbeans). I heard I had to
> make it a jar file, tried it still didnt work.
> Any help is greatly appreciated,
--that's the reason why I dont suggest to use any IDE when starting to learn in Java.
In order run programs manually you need to know
Where on your disk is your class file.
What the package line (if exists) at the top of the .java file says
if you subtract one from the other, this is your class path.
assuming MyClass.class is found at c:\a\b\c\MyClass.class
and the package line says
package b.c;
then you would do
java-classpath c:\ab.c.MyClass