« SELinux, Apache, and User Directories | Main

September 09, 2005

"jarError: no known VMs. (check for corrupt jvm.cfg file)"

I had this weird error suddenly appear after using Eclipse and changing various compiler settings and moving the default JRE used by Eclipse. The error was:

% java 
jarError: no known VMs. (check for corrupt jvm.cfg file)
Every java command returned this same error. After some google work, I finally realized it was an issue with permissions.

I am not sure how, who, what, but someone or something changed permissions on the jvm.cfg file to only be readable as root; thus, only root could run java command. Not surprise that

% sudo java
works without complaint. To fix this, you need to change permissions on jvm.cfg. As usual, finding this file is a pain and go figure, spotlight is useless. Here is what you need to do:
% sudo chmod a+r /System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib
Everything should work fine now. An alternative path to this file is:
/Library/Java/Home/lib/ 
Good luck.

Posted by egm at September 9, 2005 02:51 PM

Comments

Post a comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)


Remember me?