I've written a Java App that utilizes a frame component (rather than an
applet) as my container. The frame is created in one class and I add a
panel created in another class to it.
I.e.:
-public class Dice creates a JFrame to which I add a DicePanel.
-public class DicePanel is an extension of the JPanel class, and
includes all of my listeners, etc.
I know you'd launch a normal Java app (by normal, I mean w/o any
components) by typing into an MS-DOS prompt "java [classfile]", but
when I do this w/ my Dice class, it doesn't work. The project compiles
and runs correctly in the IDE (Netbeans 3.6), but not through DOS.
Anyone know how to do this?
FYI, my end-goal is to create an MS-DOS shortcut to run the
application.
Thanks a lot.
This is most likely a classpath problem then. under m$ windoze when
you instantiate a java class from under the dos-box, and that class uses
gui awt/swing classes, it is smart enough to create and initialize the
proper widgets in the windoze gui.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
I should also mention that both classes are part of the same package.
This is the error message I get when I try to run the class:
Exception in thread "main" java.lang.NoClassDefFoundError: Die (wrong
name: RiggedDie/Die)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Not sure if that helps. Thanks a lot.