cancel
Showing results for 
Search instead for 
Did you mean: 

Using stack size and remote debugger with java 1.4

SOLVED
Chris Atkins_1
Occasional Contributor
Solved!

Using stack size and remote debugger with java 1.4

I am trying to start up java 1.4.2.00 specifying my initial and max heap sizes along with using remote debuging. I can start java with either the -Xms and -Xmx options or the -Xrundwp option fine. When I try to use both, I get a message about no transport identified and the jvm stops.
java -server -Xms64m -Xmx2048m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket
,address=8787,server=y,suspend=n

Produces the following error:

ERROR: No transport specified.
Invalid JDWP options:
Error occurred during initialization of VM
-Xrun library failed to init: jdwp

How can one set the heap size and still use remote debugging?


2 REPLIES 2
Mike Stroyan
Honored Contributor
Solution

Re: Using stack size and remote debugger with java 1.4

The problem seems to be that java drops the part of -Xrunjdwp after the :. It happens when the java program decides to exec the java_q3p version to ensure that it can access more than 1500m of data.

The simple workaround is to use an -Xmx size under 1500. If you need to use more than 1500m of heap, you may be able to invoke java with -d64 to use the 64 bit version. That doesn't have the problem with -Xrunjdwp. It would require 64-bit versions of any JNI libraries that you use.

Another possibility would be to invoke the 32-bit java_q3p program directly. You would need to set environment variables that normally are set by the java program. In particular, you would need to set SHLIB_PATH. Here is one example invocation-

SHLIB_PATH=/opt/java1.4/jre/lib/PA_RISC2.0:/opt/java1.4/jre/lib/PA_RISC2.0/server:/opt/java1.4/jre/../lib/PA_RISC2.0 /opt/java1.4/bin/PA_RISC2.0/java_q3p -server -Xms64m -Xmx2048m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp
Mike Stroyan
Honored Contributor

Re: Using stack size and remote debugger with java 1.4

That example using java_q3p directly is missing the same -Xrunjdwp options that started this discussion. :-)

You would obviously want to include the full -Xrunjdwp argument-

-Xrunjdwp:transport=dt_socket
,address=8787,server=y,suspend=n