When trying to start Java Workshop 2.0 (or some other Java applications) on Solaris 2, 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 doesn't quite match the java bin command used. For example, on Solaris 2.6: LD_LIBRARY_PATH = /usr/openwin/lib results in Java Workshop runing 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.
The answer is to not include /usr/java/lib in your LD_LIBRARY_PATH since it is needed only in rare circumstances, such as if you are using the Java Invocation API.