Results 1 to 4 of 4
  1. #1
    DFTBA is offline Member
    Join Date
    Jun 2012
    Posts
    12
    Rep Power
    0

    Default 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?

  2. #2
    wsaryada is offline Senior Member
    Join Date
    Jun 2007
    Location
    Bali, Indonesia
    Posts
    758
    Rep Power
    8

    Default Re: Weird compile error

    Your class files might have been corrupted. Have you tried to recompile all your classes?

  3. #3
    DFTBA is offline Member
    Join Date
    Jun 2012
    Posts
    12
    Rep Power
    0

    Default Re: Weird compile error

    Many times. Out of habit, I recompile before every time I run. Or in this case, TRY to run.

  4. #4
    DFTBA is offline Member
    Join Date
    Jun 2012
    Posts
    12
    Rep Power
    0

    Default 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

  1. BlueJ help! weird error text meesed up
    By linux1man in forum Other IDEs
    Replies: 6
    Last Post: 02-07-2013, 03:54 PM
  2. Weird error(connecting to a ServerSocket)
    By Pojahn_M in forum Networking
    Replies: 5
    Last Post: 02-12-2012, 03:18 AM
  3. Weird Error With Methods
    By skaterboy987 in forum New To Java
    Replies: 15
    Last Post: 10-17-2011, 03:45 AM
  4. [SOLVED] Simple Calculator Applet Weird Error
    By sari in forum New To Java
    Replies: 5
    Last Post: 01-28-2009, 04:57 AM
  5. Weird Error?
    By sciguy77 in forum New To Java
    Replies: 4
    Last Post: 01-20-2009, 02:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •