关于和java对象交互
我发现在给出的文档中有一个对象JavetReflectionObjectFactory是在包里面不存在的,我的版本已经更新到文档的指定版本,但是还没有这个包,可以指导一下这个包在哪吗
Clone this project and it's in the source code.
抱歉我还想问一个愚蠢的问题,比如我在js代码中写一个while(true),我发现java代码就在这块阻塞了,没办法执行下面关闭的代码,如果我想手动停止这段js代码,应该怎么操作, 我写了一个子线程用来跑关闭的代码,结果不太行,并没有达到预期的效果,可以知道一下吗,下面这是我代码
Please review the doc.
您不会说的是v8Runtime.terminateExecution(); 主动抛出异常来终止吧
如果是通过v8Runtime.terminateExecution(); 关闭掉这个进程,可以手动在打开吗,我看通过iJavetEngine.getGuard(10000)自动关闭的可以再打开,手动的这个可以吗
抱歉我还想问一个愚蠢的问题,比如我在js代码中写一个
while(true),我发现java代码就在这块阻塞了,没办法执行下面关闭的代码,如果我想手动停止这段js代码,应该怎么操作, 我写了一个子线程用来跑关闭的代码,结果不太行,并没有达到预期的效果,可以知道一下吗,下面这是我代码
If you write a Java thread in JS, then the thread will indeed run, but you must know that the main thread of the event loop is still running, so the main thread will not exit, then the asynchronous operation is also micro-queuing, which will not enter the run, and also cause blocking
