I seem to have a java problem on my MBP (OSX 10.9.2), possibly related to the Mavericks upgrade. When trying to activate a newly installed SSH process I get:

Exception in thread "main" java.lang.NoClassDefFoundError: <myprocess>
Caused by: java.lang.ClassNotFoundException: <myprocess>
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

The developer of the SSH process thinks my Java setup is the problem. My java -version is:

java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)

echo $CLASSPATH returns nothing (an empty line). But running set CLASSPATH=/Library/Java/Extensions (which I gather is the right path) has no effect. But even if it did, my system has nothing in that folder - so should it?

Very grateful for assistance.

  • Does updating to Java 7 from Oracle solve the problem? Apple sort of abandoned (er...deeply deprecated) its old Java 6 version. – Spiff Mar 12 '14 at 16:58
  • I've installed Java 7 but java -version reports the same version as above. – geotheory Mar 12 '14 at 17:59

Solved. This SO question has the answer - Ákos's answer (but credit belongs to @viktor-lexington if anyone wants someone to thank). The process I followed is:

$ sudo rm /usr/bin/java
$ sudo ln -s /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java /usr/bin

.. to replace an incorrect symlink. Now java -version reports version 1.7 and the process works.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.