Solaris Common Messages and Troubleshooting Guide



When trying to start Java Workshop 2.0 (or some other Java applications), the following error is displayed:

java.lang.UnsatisfiedLinkError: setCursor
        at sun.awt.motif.MComponentPeer.initialize(Compiled Code)
        at sun.awt.motif.MTextAreaPeer.initialize(Compiled Code)
        at sun.awt.motif.MComponentPeer.<init>(Compiled Code)
        at sun.awt.motif.MTextAreaPeer.<init>(Compiled Code)
        at sun.awt.motif.MToolkit.createTextArea(Compiled Code)


The LD_LIBRARY_PATH is probably set up to include a Java lib directory that does not quite match the java bin command used. For example, in the Solaris 2.6 release LD_LIBRARY_PATH = /usr/openwin/lib results in Java Workshop running properly. But setting LD_LIBRARY_PATH = /usr/java/lib:/usr/openwin/lib results in the error being displayed, since Java Workshop uses its own version of JDK and the startup process picks up a mixture of versions.

To resolve, include /usr/java/lib in your LD_LIBRARY_PATH, since it is needed only in rare circumstances (like when you are using the Java Invocation API).