Search code examples
javasolarisremote-debugging

How to get remote debugging work for Java on Solaris


I am trying to get remote debugging working with Java on Solaris OS. Following is what I have tried-

I have a Java class called TestP which has the main method.

When I try java -classpath . TestP

the program works fine. But when I try adding the debug parameters to the JVM-

java -Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n -classpath . TestP

It fails giving this error-

UTF ERROR ["../../../src/solaris/npt/utf_md.c":49]: Failed to complete iconv_open() setup

Can anyone please help me on figuring out why this error is coming up?? The above works fine on my Linux box.

Java version on Solaris: Java(TM) SE Runtime Environment (build 1.6.0_15-b03) Java HotSpot(TM) Client VM (build 14.1-b02, mixed mode)

Java version on Linux: java version "1.6.0_0" OpenJDK Runtime Environment (IcedTea6 1.5) (fedora-20.b16.fc10-i386) OpenJDK Server VM (build 14.0-b15, mixed mode)


Solution

  • Hmm... This seems to be a known Solaris (not specific to Solaris 10) issue with Java 6, not a Java issue (see this thread).

    Someone has successfully applied a workaround (see this blog post) from a Sun guy, Jeff Moguillansky, but I wouldn't recommend it and rather consider searching sunsolve for a patch as indicated on Sun's forums.

    Look at this one: http://sunsolve.sun.com/search/document.do?assetkey=1-1-6586755-1 (you'll need a Sun Online Account with a valid Support Contract or Software Subscription).