Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Hi all

Reply
Thread Tools

Hi all

 
 
--jubs-->
Guest
Posts: n/a
 
      12-05-2005
Hi all, I just joined this group... hope I can be of any much help..

I have this problem with applets, when I run it on the appletviewer is
doesn't show any error but when I deploy the html to a server and acess
it from a browser it shows ClassFormatError : Truncated classfile. I
googled for it and some sites say its a bug in java 1.4 & 1.5. I tried
almost everything and Iam exhausted... .Other sites say I should
recompile and then deploy (doesn't work). One thig though my applet has
a lot of threads and inner classes. Does this have to do anything with
it??

Sincerely
jubs

 
Reply With Quote
 
 
 
 
Chris Uppal
Guest
Posts: n/a
 
      12-05-2005

> I have this problem with applets, when I run it on the appletviewer is
> doesn't show any error but when I deploy the html to a server and acess
> it from a browser it shows ClassFormatError : Truncated classfile.


To me this sounds like a problem with the way you transfer the jar/classfiles
to the server. Have you verified that the file(s) on the server are identical
(not just the same length) to the ones on your local system ?

-- chris


 
Reply With Quote
 
 
 
 
--jubs-->
Guest
Posts: n/a
 
      12-05-2005
ya i did that... I got fedup with the problem Now I trying to
imlplement it using JNLP. hope that atleast works.

 
Reply With Quote
 
Thomas Weidenfeller
Guest
Posts: n/a
 
      12-06-2005
--jubs--> wrote:
> I have this problem with applets, when I run it on the appletviewer is
> doesn't show any error but when I deploy the html to a server and acess
> it from a browser it shows ClassFormatError : Truncated classfile.


You did set your FTP client to binary transfer, didn't you?

/Thomas
--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/...g/java/gui/faq
http://www.uni-giessen.de/faq/archiv....java.gui.faq/
 
Reply With Quote
 
--jubs-->
Guest
Posts: n/a
 
      12-06-2005
how do u do that???

 
Reply With Quote
 
Thomas Fritsch
Guest
Posts: n/a
 
      12-06-2005
--jubs--> wrote:
> how do u do that???
>

If you use FTP from command-line, type "bin" (as opposed to "ascii")
after connecting to the server.
If you use a graphical FTP-client, there should be a toggle ("binary"
vs. "ASCII") somewhere in the GUI.

--
"Thomas:Fritsch$ops:de".replace(':','.').replace(' $','@')
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      12-06-2005
On 6 Dec 2005 06:54:51 -0800, "--jubs-->" <(E-Mail Removed)> wrote,
quoted or indirectly quoted someone who said :

>how do u do that???


Every FTP utility does it a different way. Poke around in options for
auto/binary/ASCII. ASCII flips the line endings to match your server
convention e.g. \r\n -> \n for a Unix server. But if you upload a
class file that way or a jpg, it will scramble it.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
Reply With Quote
 
Andrew Thompson
Guest
Posts: n/a
 
      12-07-2005
--jubs--> wrote:

> I have this problem with applets, when I run it on the appletviewer is
> doesn't show any error but when I deploy the html to a server and acess
> it from a browser it shows ClassFormatError : Truncated classfile.


Are your classes jar'd?

If so, the class files themselves are not being truncated.

Note that
- Your classes will need to be jar'd for JWS.
- If it works with Jar'd classes for JWS, it should
also work for Jar'd classes as an applet.

[ And JWS'd applets suck. E.G.
Applet <http://www.physci.org/pc/jtest-applet.jnlp>
Application <http://www.physci.org/pc/jtest.jnlp> ]


--
Andrew Thompson
physci, javasaver, 1point1c, lensescapes - athompson.info/andrew
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
![Oof Topix] All McCain, All Flip-Flop, All the Time Bucky Breeder Computer Support 7 09-27-2008 03:33 PM
All new updates at Testking.co.uk with all new added exams with 100 % passing guarantee Moderator Microsoft Certification 5 02-02-2006 02:48 PM
All new updates at Testking.co.uk with all new added exams with 100 % passing guarantee Moderator MCSE 5 02-02-2006 02:48 PM
All new updates at Testking.co.uk with all new added exams with 100 % passing guarantee Moderator MCSD 5 02-02-2006 02:48 PM
All new updates at Testking.co.uk with all new added exams with 100 % passing guarantee Moderator Microsoft Certification 0 01-23-2006 01:15 PM



Advertisments