Results 1 to 4 of 4
Thread: Weird compile error
- 07-04-2012, 12:33 AM #1
Member
- Join Date
- Jun 2012
- Posts
- 12
- Rep Power
- 0
Weird compile error
My program previously worked, but now when i press "run file" in jcreator, i get:
Exception in thread "Thread-0" java.lang.ClassFormatError: Truncated class file
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader. java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java :615)
at java.security.SecureClassLoader.defineClass(Secure ClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader .java:283)
at java.net.URLClassLoader.access$000(URLClassLoader. java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java: 197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 47)
at ThinkingClass.run(ThinkingClass.java:20)
at java.lang.Thread.run(Thread.java:662)
Why?
- 07-04-2012, 03:29 AM #2
Senior Member
- Join Date
- Jun 2007
- Location
- Bali, Indonesia
- Posts
- 696
- Rep Power
- 6
Re: Weird compile error
Your class files might have been corrupted. Have you tried to recompile all your classes?
Website: Learn Java by Examples
- 07-04-2012, 04:40 AM #3
Member
- Join Date
- Jun 2012
- Posts
- 12
- Rep Power
- 0
Re: Weird compile error
Many times. Out of habit, I recompile before every time I run. Or in this case, TRY to run.
- 07-04-2012, 02:35 PM #4
Member
- Join Date
- Jun 2012
- Posts
- 12
- Rep Power
- 0
Re: Weird compile error
New detail: I have 4 classes. MasterClass, ProgramExitter, ThinkingClass, and Setup. MasterClass sets up a thread for each of the others. ProgramExitter and Setup both make their own JFrame. When I run the MasterClass, the JFrame for ProgramExitter pops up. But the one for Setup does not.
Similar Threads
-
BlueJ help! weird error text meesed up
By linux1man in forum Other IDEsReplies: 6Last Post: 02-07-2013, 03:54 PM -
Weird error(connecting to a ServerSocket)
By Pojahn_M in forum NetworkingReplies: 5Last Post: 02-12-2012, 03:18 AM -
Weird Error With Methods
By skaterboy987 in forum New To JavaReplies: 15Last Post: 10-17-2011, 03:45 AM -
[SOLVED] Simple Calculator Applet Weird Error
By sari in forum New To JavaReplies: 5Last Post: 01-28-2009, 04:57 AM -
Weird Error?
By sciguy77 in forum New To JavaReplies: 4Last Post: 01-20-2009, 02:32 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks