Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

-bash: /usr/bin/java: cannot execute binary file

Status
Not open for further replies.

kalimba

Technical User
Feb 5, 2001
11
US
I am kind of new to this stuff and I think I may have mixed up some settings and now my java command doesn't work. I have compiled and run basic java programs in the past on my machine. I can still compile programs using javac, but when i try to run a simple java program from the command line i get the following error:

-bash: /usr/bin/java: cannot execute binary file

I have been playing around with CLASSPATH, and tried changing the permissions on java. I really don't know what to do. I recently installed MySQL, but I am not sure if that has anything to do with it as it had been a while before that since I had last tried to run a java program.
Thanks in advance for any help.
 
Thank you for your response sedji. That was one of the first things I tried though. I am working on mac OS X. I was wondering if there was a way to reinstall java or at least reset it to how it was originally when it worked. Thanks again.
 
Well I never could figure out the problem, so I re installed the operating system and Java works again. In the future I would not like to reinstall the whole OS just to reset the jdk defaults. Is there a simpler way to do this? I am working on Mac OSX so I cant just download Java again. (I think)
 
You should be able to download just Java from the java.sun.com website.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top