Closed trumpetx closed 7 years ago
Looks like this might be an open issue https://github.com/eclipsesource/J2V8/issues/188
Hi,
I have the same error here on windows 10 64 : UnsatisfiedLinkError: Could not load J2V8 library. Reasons: no j2v8_win32_x86_64 in java.library.path
It's weird as the lib in in my build.gradle
same on jvm-mon-0.2, windows 7, java 1.8.0_111. Really looking forward to use this interesting tool from command line
jvm-mon.bat
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.IllegalStateException: J2V8 native library not loaded
at com.eclipsesource.v8.V8.checkNativeLibraryLoaded(V8.java:195)
at com.eclipsesource.v8.V8.createV8Runtime(V8.java:149)
at com.eclipsesource.v8.V8.createV8Runtime(V8.java:125)
at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:58)
at com.eclipsesource.v8.NodeJS.createNodeJS(NodeJS.java:45)
at JvmMon.<clinit>(JvmMon.java:18)
Caused by: java.lang.UnsatisfiedLinkError: Could not load J2V8 library. Reasons:
no j2v8_win32_x86_64 in java.library.path
at com.eclipsesource.v8.LibraryLoader.loadLibrary(LibraryLoader.java:75)
at com.eclipsesource.v8.V8.load(V8.java:71)
at com.eclipsesource.v8.V8.createV8Runtime(V8.java:145)
... 4 more
At the moment in only runs on Linux an MacOS, #1 There is a windows version of J2v8 library so it should work but haven't tried it yet
On Ubuntu 16.04 I was getting this warning, but the issue was that I didn't have set JAVA_HOME
.
user@ubuntuuser ~/Downloads/jvm-mon-0.2
% ./bin/jvm-mon
$JAVA_HOME/lib/tools.jar not found
OpenJDK 64-Bit Server VM warning: You have loaded library /home/user/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Exception in thread "main" java.lang.NoClassDefFoundError: sun/jvmstat/monitor/MonitorException
at com.jvmtop.view.VMOverviewView.scanForNewVMs(VMOverviewView.java:165)
at JvmMon.update(JvmMon.java:50)
at JvmMon.<init>(JvmMon.java:45)
at JvmMon.main(JvmMon.java:27)
Caused by: java.lang.ClassNotFoundException: sun.jvmstat.monitor.MonitorException
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 4 more
user@ubuntuuser ~/Downloads/jvm-mon-0.2
% export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64"
user@ubuntuuser ~/Downloads/jvm-mon-0.2
% ./bin/jvm-mon
OpenJDK 64-Bit Server VM warning: You have loaded library /home/user/libj2v8_linux_x86_64.so which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
... jvm-mon opens ...
Maybe the script should check if $JAVA_HOME is set and exit if not.
Maybe the script should check if $JAVA_HOME is set and exit if not.
Probably a good idea
Definitely.
The new script in version 0.3 does the check and automatically sets JAVA_HOME on Mac (if not set already).
I also got this error trying to run as another user. The app seems to need write permissions on the install directories/files. If that's correct, would suggest adding a test for this in the startup script.
I too got this error running as a different user.
Executing from a VM, unzipped package, CentOS 6