[SOLVED] 32 bit binaries do not run on 64 bit machine
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
[xxxxx@xxxxx Desktop]$ cat /etc/redhat-release
Red Hat Enterprise Linux Client release 5.4 (Tikanga)
[xxxxx@xxxxx Desktop]$ uname -a
Linux xxxxx 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
[xxxxx@xxxxx Desktop]$ java cos.jar
Exception in thread "main" java.lang.NoClassDefFoundError: cos/jar
Caused by: java.lang.ClassNotFoundException: cos.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
[xxxxx@xxxxx Desktop]$
Last edited by frznchckn; 02-22-2011 at 05:02 PM.
Reason: new information
[xxxxx@xxxxx Desktop]$ cat /etc/redhat-release
Red Hat Enterprise Linux Client release 5.4 (Tikanga)
[xxxxx@xxxxx Desktop]$ uname -a
Linux xxxxx 2.6.18-164.11.1.el5 #1 SMP Wed Jan 6 13:26:04 EST 2010 x86_64 x86_64 x86_64 GNU/Linux
[xxxxx@xxxxx Desktop]$ java cos.jar
Exception in thread "main" java.lang.NoClassDefFoundError: cos/jar
Caused by: java.lang.ClassNotFoundException: cos.jar
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
[xxxxx@xxxxx Desktop]$
To run jar files, you need to run them with java -jar
appreciate the reply, but as you can see from my second post (to correct the first post) I believe the issue has something to do with running 32 bit on my 64 bit machine. I did check and adding -jar did not solve the java execution problem either.
Well ok, I did the same thing on my fedora box right in front of me, and I could not duplicate it. I'm running 64 bit also... What version of gcc do you have?
And for the record, this is a very weird problem. I even googled intensively and got nothing. I'm becoming puzzled myself too.....
gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
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.
Trust me. We think it's crazy also. Even worse, we have it on two RHEL4 boxes and two CentOS 5 boxes. It's possible we did something odd on one of the machines but unlikely we did the same thing on 4 of them.
Okay, here's where my engineer-moonlighting-as-a-sysadmin really show...
earlier today, I "yum update"ed the box. Everything should be up to date with the RH repos.
I do a "sudo yum search gcc" and I try to update some of the libs that show up and I keep getting "No Packages marked for Update". I'm assuming because they are already at the latest versions. I also did a "yum clean all" and tried again just to make sure updates weren't being blocked.
It possibly could, but I would rather rule the compiler out before anything. I like to start off with the simple things; In the past I have tried troubleshooting "difficult" tasks, and sometimes came down to very simple fixes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.