CLASSPATH=path
export CLASSPATH
javac -classpath $CLASSPATH path/to/filename.java
java net.the24hourshow.GuessGame.GameLauncher
javac -d ../classes -classpath ../classes/net/the24hourshow/GuessGame net/the24hourshow/GuessGame/*.java
[dsartain@localhost GuessGame]$ java -classpath "." net.the24hourshow.GuessGame.GameLauncher.class
Exception in thread "main" java.lang.NoClassDefFoundError: net.the24hourshow.GuessGame.GameLauncher.class
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Caused by: java.lang.ClassNotFoundException: net.the24hourshow.GuessGame.GameLauncher.class not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
at java.net.URLClassLoader.findClass(libgcj.so.7rh)
at gnu.gcj.runtime.SystemClassLoader.findClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at java.lang.ClassLoader.loadClass(libgcj.so.7rh)
at gnu.java.lang.MainThread.run(libgcj.so.7rh)
Code above receives this error:
----------
1. ERROR in net/the24hourshow/GuessGame/GameLauncher.java (at line 2)
import GuessGame.*; //imports subpackage
^^^^^^^^^
The import GuessGame cannot be resolved
----------
2. ERROR in net/the24hourshow/GuessGame/GameLauncher.java (at line 3)
import GuessGame.GuessGame2; //imports subpackage.class
^^^^^^^^^
The import GuessGame cannot be resolved
1. ERROR in net/the24hourshow/GuessGame/GuessGame2.java (at line 3)
import GuessGame.*; //imports subpackage
^^^^^^^^^
The import GuessGame cannot be resolved
----------
2. ERROR in net/the24hourshow/GuessGame/GuessGame2.java (at line 4)
import GuessGame.Player; //imports subpackage.class
^^^^^^^^^
The import GuessGame cannot be resolved
----------
1. ERROR in net/the24hourshow/GuessGame/GuessGame.java (at line 4)
import Player.*;
^^^^^^
The import Player cannot be resolved
----------
----------
1. ERROR in GameLauncher.java (at line 9)
GuessGame game = new GuessGame();
^^^^^^^^^
GuessGame cannot be resolved to a type
----------
2. ERROR in GameLauncher.java (at line 9)
GuessGame game = new GuessGame();
^^^^^^^^^
GuessGame cannot be resolved to a type
----------
2 problems (2 errors)
1. ERROR in GuessGame.java (at line 5)
Player p1;
^^^^^^
Player cannot be resolved to a type
----------
2. ERROR in GuessGame.java (at line 6)
Player p2;
^^^^^^
Player cannot be resolved to a type
----------
3. ERROR in GuessGame.java (at line 7)
Player p3;
^^^^^^
Player cannot be resolved to a type
----------
/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin:/opt/SDK/jdk/bin:/opt/SDK/jdk/jre/bin
No compatible Java SE Runtime Environment (JRE) was found on this system.
The NetBeans(TM) 5.5 Preview installer requires at least JRE
version 5.0. Download and install a compatible JRE and try again or
restart the installer using the -is:javahome command line parameter to
specify the location of the JRE.