![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Hobbyist Programmer
|
stupid tutorials
Why isnt this code working. I took it straight out of my tutorial book, it compiles perfect but when i attempt to run it throws a crapload of errors:
java.lang.NoClassDefFoundError: Compare/SimpleFrame (wrong name: SimpleFrame)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
Exception in thread "main"SimpleFrame.java [php] import javax.swing.JFrame; public class SimpleFrame extends JFrame { public SimpleFrame() { super("Frame Title"); setSize(300, 100); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); } public static void main(String[] arguments) { SimpleFrame sf = new SimpleFrame(); } } [/php] thx for any help, i started learning java a few days ago, just started gui's.
__________________
Hoes telling me to calm down but I'm like fuck that shit!
|
|
|
|
|
|
#2 |
|
Professional Programmer
|
It runs for me..
|
|
|
|
|
|
#3 |
|
Professional Programmer
|
try running it from a different editor or something
|
|
|
|
|
|
#4 |
|
Expert Programmer
|
just so you know u might want to learn something a little easier than gui's first. GUI's are pretty advanced and if you don't understand the basics it will be a lot harder.
|
|
|
|
|
|
#5 |
|
Professional Programmer
|
Yeap, works here to , check if you are using java 1.5
__________________
Don't take life too seriously, it's not permanent ! |
|
|
|
|
|
#6 |
|
Hobbyist Programmer
|
yep turns out my java was not up-to-date
thx.
__________________
Hoes telling me to calm down but I'm like fuck that shit!
|
|
|
|
|
|
#7 |
|
Professional Programmer
![]() Join Date: Sep 2005
Posts: 419
Rep Power: 4
![]() |
>yep turns out my java was not up-to-date
Stupid tutorials. ![]()
__________________
Even if the voices aren't real, they have some pretty good ideas. |
|
|
|
|
|
#8 |
|
Expert Programmer
|
again just so you know GUI's are very advanced. You might want to start with something a little easier.
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|