Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hello everyone,
When I am running a java code I get this error
Exception in thread "main" java.lang.NoClassDefFoundError: ml.options.Options
at java.lang.Class.initializeClass(libgcj.so.7)
at ToUnicode.main(ToUnicode.java:34)
Caused by: java.lang.ClassNotFoundException: java.lang.Enum not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:/home/ghita/Indri/Transliterator/options.jar], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[file:/usr/share/java-ext/bcprov-jdk14-1.35.jar], parent=null}}
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.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 java.lang.Class.initializeClass(libgcj.so.7)
...1 more
when I type java -version, that's what I get
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070302 (prerelease) (4.1.2-1mdv2007.1)
I am not sure if it is the version I am running or something else
java.lang.Enum was not part of Java 1.4 (which is the version your machine says you are running). Uninstall the gcj Java compiler and download Java 1.5 for Linux from the Sun Java site:
Well, there actually isn't any real needd to uninstall gcj before installing a jdk. All it does is sae some space. As for the jdk, that should be available straight from your repositories if you use Suse, Debian, Ubuntu, Gentoo, Mandriva, ... (Fedora, CentOS and Slackware are exceptions in this case - these do force you to get and install the jdk yourself).
I suggested the uninstall and the download from Sun because I have never had anything but problems otherwise. I guess I get picky-I do most development in Java, and I don't like it when things screw with my Java environment.
By using update-alternatives, you can simply switch from gcj to jdk5 or jdk6 and back. It works fine for me. Tomcat 5.5? I switch to jdk5. Tomcat 6? OK, then I use jdk6. Of course, you need to remember what was compiled on which of those three - things could get messy if you don't. From that viewpoint, keeping only one isn't a bad idea at all - but unfortunately there are still plenty of JSP frameworks that won't run with JDK6.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.