java.lang.ClassFormatError on MAC

Help
jbrestel
2008-08-09
2013-05-15
  • jbrestel
    jbrestel
    2008-08-09

    I'm having trouble getting jtreeview to work with MAC's virtual machine when I compile the source code myself.  (I was able to download the pre packaged jar files (1.1.3) and those run fine).

    ------------
    I'm using Windows 2000 for development and am using:
    java version "1.6.0_07"
    Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
    Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

    I checked out the LinkedView cvs package for eclipse today (8-9-2008) and ran ant with eclipse with the dist option.  (I removed the "optimize" option in the javac section of the build.xml... no longer used)
    ------------

    I copied the jar files from the dist directory into a test site with the spellman clustering files you provide as a test.
    http://www.cbil.upenn.edu/~jbrestel/3K/testApplet.html

    This page loads fine on a windows machine but is throwing a "java.lang.ClassFormatError: Truncated class file" on MAC (firefox and safari). 

    Have you seen this before?  What version of the jdk do you use for your pre packaged distribution? 

    Thanks in advance
    john

     
    • jbrestel
      jbrestel
      2008-08-10

      I found a solution.  It seems there is a problem when "." is included in the classpath in the jarfile's manifest.

      http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6320113

      I removed this from build.xml and the applet now loads fine in MAC and PC.

        <manifest>
          <attribute name="Main-Class" value="LinkedView"/>
          <attribute name="Class-Path" value="lib/nanoxml-2.2.2.jar"/>    
        </manifest>

      john