Truncated class file error
Hello JavaProgrammingForums, I need a little help.
A few weeks ago one of my applets got a Truncated class file error, I have no idea how it got there and how to fix it, any help?
Thanks -Koâk
This is the error btw:
Code :
Exception in thread "Thread-4" java.lang.ClassFormatError: Truncated class file
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$000(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)
at Class68_Sub21.method1199(Class68_Sub21.java:450)
at Class68_Sub21.method1198(Class68_Sub21.java:380)
at Class68_Sub21.method1192(Class68_Sub21.java:88)
at Class14.method268(Class14.java:109)
at Class14.method270(Class14.java:137)
at Class68_Sub27.method1221(Class68_Sub27.java:170)
at Class68_Sub28_Sub1.method1235(Class68_Sub28_Sub1.java:235)
at Class68_Sub13_Sub34.method872(Class68_Sub13_Sub34.java:157)
at client.method15(client.java:1993)
at Applet_Sub1.method25(Applet_Sub1.java:435)
at Applet_Sub1.run(Applet_Sub1.java:158)
at java.lang.Thread.run(Unknown Source)
Re: Truncated class file error
Hello Koâk.
Do you get this error when running the applet locally?
If not, I think this could be due to the class files being uploaded via FTP in ascii format instead of binary format.
Re: Truncated class file error
Quote:
Originally Posted by
JavaPF
Hello Koâk.
Do you get this error when running the applet locally?
If not, I think this could be due to the class files being uploaded via FTP in ascii format instead of binary format.
No I'm running it locally :confused:
Re: Truncated class file error
Hmm... Are you running this applet from within your IDE or web browser?
Could you post your code for me to look at please?
Re: Truncated class file error
Quote:
Originally Posted by
JavaPF
Hmm... Are you running this applet from within your IDE or web browser?
Could you post your code for me to look at please?
Running from a .bat
the code is 273 files big :rolleyes: