Hi Liu Xin,

No, this is not a wrong usage on your part. You are facing the following issue:

https://bugs.openjdk.java.net/browse/JDK-8157947

So, at this point, till this is fixed, you would face issues if you try to run commands based on the the javascript interface with jhsdb.

Thanks,
Jini.

On 9/17/2017 1:36 PM, Liu Xin wrote:
Hello, serviceability mail-list,

Jdk9 refactored the CLI for hsdb. I try to catch you up.  With the
latest openjdk9 build, I always meet the following message when I want
to use 'console' in GUI.

./jhsdb hsdb
//attach pid
//windows/console
javax.script.ScriptException: TypeError: sapkg.runtime.VM.getVM is not a
function in sa.js at line number 54
Warning! JS Engine can't start, some commands will not be available

I quickly look at it. It seems that it has problem to load 'sa.js'.
// SA singletons are kept in 'sa' object
var sa = new Object();
sa.vm = sapkg.runtime.VM.getVM();
sa.dbg = sa.vm.getDebugger();
sa.cdbg = sa.dbg.CDebugger;

I strongly suspect that it didn't invoke
 sun.jvm.hotspot.runtime.VM.initialize before loading the sa.js.
is it intentional or just wrong usage of mine?

Please note that I did build nashorn and jjs works perfectly.  I can
reproduce this problem on linux and macosx.

I took reference of the doc of clhsdb shipping with hotspot source code:
hotspot/src/jdk.hotspot.agent/doc/clhsdb.html
is it out of date?  I found it NOT 'Few CLHSDB commands are already
implemented in JavaScript.'

thanks,
--lx

Reply via email to