Find the answer to your Linux question:
Results 1 to 2 of 2
Hey I have installed this on my fresh 10.2 with no problems. I can compile hello world but when I come to run it I get:- HTML Code: Exception in ...
  1. #1
    Just Joined!
    Join Date
    Mar 2006
    Posts
    42

    Java SE

    Hey

    I have installed this on my fresh 10.2 with no problems. I can compile hello world but when I come to run it I get:-

    HTML Code:
    Exception in thread "main" java.lang.ClassFormatError: HelloWorld (unrecognized class file version)
       at java.lang.VMClassLoader.defineClass(libgcj.so.7)
       at java.lang.ClassLoader.defineClass(libgcj.so.7)
       at java.security.SecureClassLoader.defineClass(libgcj.so.7)
       at java.net.URLClassLoader.findClass(libgcj.so.7)
       at java.lang.ClassLoader.loadClass(libgcj.so.7)
       at java.lang.ClassLoader.loadClass(libgcj.so.7)
       at java.lang.Class.forName(libgcj.so.7)
       at gnu.java.lang.MainThread.run(libgcj.so.7)
    ....Looks like im still using the gcj version that came pre-installed.


    javac - version gives me
    HTML Code:
    javac 1.6.0_01 
    which sounds right, BUT

    java -vesion gives me :-
    HTML Code:
    gij (GNU libgcj) version 4.1.2 20061115 (prerelease) (SUSE Linux)
    
    Copyright (C) 2006 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    I guess I need to change this so it uses the version I installed with my SE install, any pointers as to how to go about this, been smashing my head against the keyboard ALL night

    Thanks

    Joe

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,344
    I usually uninstall gcj and all of its components because its not really needed if you are going to be using Sun java.

Posting Permissions

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