Building OpenJDK Panama 19 - java

i wanted to build OpenJDK panama for Windows 11 WSL from site:
uname Linux DESKTOP-LCGGQ32 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
git clone https://github.com/openjdk/panama-foreign
cd panama-foreign
On Windows 11 WSL I tried Commands:
./configure --with-boot-jdk=/mnt/c/Tools/jdk-17 --with-libclang="/mnt/c/Tools/LLVM" --with-toolchain-version=2019
Then
make
it fails on make
as shown below:
Building target 'default (exploded-image)' in configuration 'windows-x86_64-server-release'
Compiling 1 files for BUILD_TOOLS_HOTSPOT
Compiling 8 files for BUILD_TOOLS_LANGTOOLS
<3>init: (11742) ERROR: UtilAcceptVsock:244: accept4 failed 110
<3>init: (11743) ERROR: UtilAcceptVsock:244: accept4 failed 110
make[3]: *** [CompileToolsHotspot.gmk:47: /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/buildtools/hotspot_tools_classes/_the.BUILD_TOOLS_HOTSPOT_batch] Error 255
make[2]: *** [make/Main.gmk:95: buildtools-hotspot] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: *** [ToolsLangtools.gmk:37: /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch] Error 255
make[2]: *** [make/Main.gmk:74: buildtools-langtools] Error 2
ERROR: Build failed for target 'default (exploded-image)' in configuration 'windows-x86_64-server-release' (exit code 2)
=== Output from failing command(s) repeated here ===
* For target buildtools_buildtools_hotspot_tools_classes__the.BUILD_TOOLS_HOTSPOT_batch:
<3>init: (11742) ERROR: UtilAcceptVsock:244: accept4 failed 110
* For target buildtools_langtools_tools_classes__the.BUILD_TOOLS_LANGTOOLS_batch:
<3>init: (11743) ERROR: UtilAcceptVsock:244: accept4 failed 110
* All command lines available in /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/make-support/failure-logs.
=== End of repeated output ===
No indication of failed target found.
HELP: Try searching the build log for '] Error'.
HELP: Run 'make doctor' to diagnose build problems.
make[1]: *** [/mnt/c/repo/panama-foreign/make/Init.gmk:315: main] Error 2
make: *** [/mnt/c/repo/panama-foreign/make/Init.gmk:186: default] Error 2
Configuration summary:
Name: windows-x86_64-server-release
Debug level: release
HS debug level: product
JVM variants: server
JVM features: server: 'cds compiler1 compiler2 epsilongc g1gc jfr jni-check jvmci jvmti management parallelgc serialgc services shenandoahgc vm-structs zgc'
OpenJDK target: OS: windows, CPU architecture: x86, address length: 64
Version string: 19-internal-adhoc.root.panama-foreign (19-internal)
Source date: Determined at build time
Tools summary:
Environment: wsl2 version 5.10.16.3-microsoft-standard-WSL2, #1 SMP Fri Apr 2 22:23:49 UTC 2021 (Ubuntu 20.04.4 LTS); windows version 10.0.22000.556; prefix "/mnt"; root "\wsl.localhost\Ubuntu-20.04"
Boot JDK: java version "17" 2021-09-14 LTS Java(TM) SE Runtime Environment (build 17+35-LTS-2724) Java HotSpot(TM) 64-Bit Server VM (build 17+35-LTS-2724, mixed mode, sharing) (at /mnt/c/tools/jdk-17)
Toolchain: microsoft (Microsoft Visual Studio 2019)
C Compiler: Version 19.29.30136 (at /mnt/c/progra~2/micros~2/2019/profes~1/vc/tools/msvc/1429~1.301/bin/hostx86/x64/cl.exe)
C++ Compiler: Version 19.29.30136 (at /mnt/c/progra~2/micros~2/2019/profes~1/vc/tools/msvc/1429~1.301/bin/hostx86/x64/cl.exe)
Build performance summary:
Build jobs: 15
Memory limit: 15858 MB
WARNING: The result of this configuration has overridden an older
configuration. You should run 'make clean' to make sure you get a
proper build. Failure to do so might result in strange build problems.
cat: standard output: No such file or directory
I have looked the failure logs
File1:
buildtools_buildtools_hotspot_tools_classes__the.BUILD_TOOLS_HOTSPOT_batch.cmdline
/mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/fixpath exec /mnt/c/tools/jdk-19/bin/javac.exe -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLevel=1 -g -Xlint:all -source 18 -target 18 -Xlint:-options -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii -Werror -d /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/buildtools/hotspot_tools_classes #/mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/buildtools/hotspot_tools_classes/_the.BUILD_TOOLS_HOTSPOT_batch.filelist
File2:
buildtools_langtools_tools_classes__the.BUILD_TOOLS_LANGTOOLS_batch.cmdline
/mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/fixpath exec /mnt/c/tools/jdk-19/bin/javac.exe -J-XX:+UseSerialGC -J-Xms32M -J-Xmx512M -J-XX:TieredStopAtLevel=1 -g -Xlint:all -source 18 -target 18 -Xlint:-options -implicit:none -Xprefer:source -XDignore.symbol.file=true -encoding ascii -Werror -d /mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/langtools_tools_classes #/mnt/c/repo/panama-foreign/build/windows-x86_64-server-release/buildtools/langtools_tools_classes/_the.BUILD_TOOLS_LANGTOOLS_batch.filelist
Seems like the problem is because of WSL
https://github.com/microsoft/WSL/issues/6420
But i dont know how to fix this issue for panama.

Related

Sencha CMD problem after macOS Monterrey update

Problem
After update my macOS to Monterrey (12.0.1), I'm with a big problem to start my local projects with ExtJS.
When I execute:
sencha app watch
Get the error:
Sencha Cmd v7.5.0.5
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x00007ff813dcb6f2, pid=18621, tid=0x000000000000a707
#
# JRE version: OpenJDK Runtime Environment (8.0_242-b08) (build 1.8.0_242-b08)
# Java VM: OpenJDK 64-Bit Server VM (25.242-b08 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libsystem_platform.dylib+0x16f2] _platform_strlen+0x12
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more information is saved as:
# [my app folder]/hs_err_pid18621.log
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
/Users/kellerkichel/bin/Sencha/Cmd/sencha: line 167: 18621 Abort trap: 6 $BASEDIR/$VER/sencha "$#"
The funny thing is... if run again... the same command (sencha app watch), the error change:
2021-12-06 22:10:28.229 java[17909:173895] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSPlaceholderString initWithFormat:locale:arguments:]: nil argument'
*** First throw call stack:
(
0 CoreFoundation 0x00007ff813efae5b __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007ff813c5bb9d objc_exception_throw + 48
2 Foundation 0x00007ff814c9126d -[NSPlaceholderString initWithFormat:locale:arguments:] + 295
3 Foundation 0x00007ff814c9ff2f +[NSString stringWithFormat:] + 153
4 Update1478821341979869630.dylib 0x00000001218897a9 wuusgJAD + 553
5 Update1478821341979869630.dylib 0x0000000121874319 pGgFelzv + 9
6 Update1478821341979869630.dylib 0x0000000121888ab2 MKNXgAzM + 562
7 Update1478821341979869630.dylib 0x000000012188795d tyRtaPXr + 61
8 Update1478821341979869630.dylib 0x00000001218877bb ZWwnJFGw + 283
9 Update1478821341979869630.dylib 0x0000000121880dc6 Phdl_SDOTFG + 246
10 Update1478821341979869630.dylib 0x0000000121880e49 Phdl_SDOTF + 25
11 Update1478821341979869630.dylib 0x000000012186e505 Java_phdl_Phdl_SDOTF + 21
12 ??? 0x000000010e0e3407 0x0 + 4530779143
)
libc++abi: terminating with uncaught exception of type NSException
/Users/kellerkichel/bin/Sencha/Cmd/sencha: line 167: 17909 Abort trap: 6 $BASEDIR/$VER/sencha "$#"
And again (sencha app watch)... another one:
java(18084,0x7000041c5000) malloc: Heap corruption detected, free list is damaged at 0x6000005f3330
*** Incorrect guard value: 105553126503408
java(18084,0x7000041c5000) malloc: *** set a breakpoint in malloc_error_break to debug
/Users/kellerkichel/bin/Sencha/Cmd/sencha: line 167: 18084 Abort trap: 6 $BASEDIR/$VER/sencha "$#"
And after each execution, the error keep alternating between those above...
Attempts
1 - JAVA
First, I thinked is something with JAVA version, so I removed all JAVA installed, including brew installed versions.
Also removed all references to JAVA_HOME, and a fresh install of JAVA 8 was maked. No sucess... did it again with JAVA 11, and JAVA 17, without sucess.
Obs. At JAVA 17 the problem changed, but this is because JAVA 17 dont have the javascript processor (javax) anymore.
2 - SENCHA CMD
After the JAVA, have checked Sencha cmd, if has any update or something... my Sencha cmd versio is 7.4.0.39, and for my surprise have a new version (7.5.0.5), but also after update still not working.
Any sugestions?
After talking with some sencha MVP at discord.... have received the following tip:
You must delete the following file:
/Users/user/Library/Application Support/Sencha/Cmd/Update/app.properties
After that workaround, the system works again.
I hope these answer can help someone !!
Update!!!
After some mac os updates deleting the app.properties stop working.
So sencha report to add bypass_lp:true to the app.json
Download JRE 8(support apple sillicon neccessary, ex:zulu/bellsoft), and unzip it.
Edit path in "{your_senchacmd_path}/.install4j/inst_jre.cfg" and "{your_senchacmd_path}/.install4j/pref_jre.cfg" to new JRE path.
Reason: Sencha CMD's included JRE is not compiled for the ARM architecture and even with Rosetta 2.

How can I initialize Gradle projects in non-English systems?

I am trying to use Gradle on my Windows machine. The command I want to be able to use is:
gradle init --type java-application
But here is the error I get when I run this command on Powershell (or cmd):
> Task :init FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':init'.
> The requested build type 'java-application' is not supported. Supported types:
- 'basic'
- 'cpp-application'
- 'cpp-library'
- 'groovy-appl²cat²on'
- 'groovy-gradle-plugin'
- 'groovy-l²brary'
- 'java-appl²cat²on'
- 'java-gradle-plugin'
- 'java-l²brary'
- 'kotlin-appl²cat²on'
- 'kotlin-gradle-plugin'
- 'kotlin-l²brary'
- 'pom'
- 'scala-appl²cat²on'
- 'scala-l²brary'
- 'swift-application'
- 'swift-library'
As seen in the output, there is probably an encoding issue here. Because
java-appl²cat²on
is displayed as a possible type.
I used versions 6.9 and 7.0.2 and the results are the same. My system language is Turkish but I also use Git, Maven etc. without any issues.
Here is the output of gradle --version in case it is useful:
------------------------------------------------------------
Gradle 6.9
------------------------------------------------------------
Build time: 2021-05-07 07:28:53 UTC
Revision: afe2e24ababc7b0213ccffff44970aa18035fc0e
Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 1.8.0_231 (Oracle Corporation 25.231-b11)
OS: Windows 10 10.0 amd64
Update: Issue #17383 has been fixed and is targeted for Gradle 7.2.
You may hit a bug in Gradle. I was able to reproduce the issue by forcing tr-TR locale in environment variable JAVA_TOOL_OPTIONS. I filed a bug in the Gradle issue tracker to have this checked: Build init plugin is locale sensitive.
As a workaround, you could force English locale for project initialization, in Powershell:
PS> $env:JAVA_TOOL_OPTIONS="-Duser.language=en -Duser.country=US"
PS> gradle.bat init --type java-application
Picked up JAVA_TOOL_OPTIONS: -Duser.language=en -Duser.country=US
Select build script DSL:
1: Groovy
2: Kotlin
Enter selection (default: Groovy) [1..2]

Using tcnative module on AIX for HTTP2 on Tomcat

Has anyone successfully got the HTTP/2 connector working in Tomcat9 on AIX (e.g. powerpc-ibm-aix7.2.5.0)?
I followed the instructions here to build the tcnative module (using tomcat-native-1.2.24-src that comes with Tomcat 9.0.37, APR 1.5.2, OpenSSL 1.0.2, IBM Java 1.8.0_261) i.e.
$ ./configure --with-apr=/opt/freeware/bin/apr-1-config --with-java-home=/app/java8_64/ --with-ssl=yes --prefix=/app/tomcat
followed by
make && make install
This creates the expected entries in /app/tomcat/lib, i.e.
-rw-r--r-- 1 usrxxx grpxxxx 3440287 Mar 03 16:47 libtcnative-1.a
-rwxr-xr-x 1 usrxxx grpxxxx 1057 Mar 03 16:47 libtcnative-1.la
lrwxrwxrwx 1 usrxxx grpxxxx 23 Mar 03 16:47 libtcnative-1.so -> libtcnative-1.so.0.2.24
lrwxrwxrwx 1 usrxxx grpxxxx 23 Mar 03 16:47 libtcnative-1.so.0 -> libtcnative-1.so.0.2.24
-rwxr-xr-x 1 usrxxx grpxxxx 1372146 Mar 03 16:47 libtcnative-1.so.0.2.24
but when Tomcat starts I get
04-Mar-2021 15:30:00.752 WARNING [main] org.apache.catalina.core.AprLifecycleListener.init The Apache Tomcat Native library failed to load. The error reported was [tcnative-1 (Not found in java.library.path)]
java.lang.UnsatisfiedLinkError: tcnative-1 (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1462)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1414)
at java.lang.System.loadLibrary(System.java:584)
at org.apache.tomcat.jni.Library.<init>(Library.java:69)
at org.apache.tomcat.jni.Library.initialize(Library.java:206)
at org.apache.catalina.core.AprLifecycleListener.init(AprLifecycleListener.java:198)
...
04-Mar-2021 15:30:01.096 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.library.path=/app/java8_64/jre/lib/ppc64/compressedrefs:/app/java8_64/jre/lib/ppc64:/app/java8_64/jre/lib/ppc64/j9vm:/app/java8_64/jre/lib/ppc64:/app/java8_64/jre/../lib/ppc64:/app/java8_64/jre/lib/icc:/opt/freeware/lib:/opt/freeware/lib64:/usr/lib:/usr/lib64:/app/tomcat/lib:/usr/lib64:/usr/lib
...
04-Mar-2021 15:30:02.233 SEVERE [main] org.apache.catalina.util.LifecycleBase.handleSubClassException Failed to initialize component [Connector[org.apache.coyote.http11.Http11AprProtocol-8443]] org.apache.catalina.LifecycleException: The configured protocol [org.apache.coyote.http11.Http11AprProtocol] requires the APR/native library which is not available
at org.apache.catalina.connector.Connector.initInternal(Connector.java:1024)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:533)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:1057)
Edit - based on suggestions from Piotr and Lorinczy:
Tried adding tcnative-1.so as a symlink - same error
Copied libtcnative-1.* to the bin folder. Still failing but new error (progress!?). Possible 32bit v 64bit issue?
09-Mar-2021 10:10:07.116 WARNING [main] org.apache.catalina.core.AprLifecycleListener.init The Apache Tomcat Native library failed to load. The error reported was [/app/apache-tomcat-9.0.37/bin/libtcnative-1.a ( 0509-022 Cannot load module /app/apache-tomcat-9.0.37/bin/libtcnative-1.a.
0509-026 System error: Cannot run a file that does not have a valid format.)]
java.lang.UnsatisfiedLinkError: /app/apache-tomcat-9.0.37/bin/libtcnative-1.a ( 0509-022 Cannot load module /app/apache-tomcat-9.0.37/bin/libtcnative-1.a.
0509-026 System error: Cannot run a file that does not have a valid format.)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1462)
...
All the dependencies seem to be available
$ldd libtcnative-1.so.0.2.24
libtcnative-1.so.0.2.24 needs:
/usr/lib/libssl.so
/usr/lib/libcrypto.so
/opt/freeware/lib/libapr-1.so
/usr/lib/libpthread.a(shr_xpg5.o)
/usr/lib/libc.a(shr.o)
/opt/freeware/lib/libgcc_s.a(shr.o)
/usr/lib/libcrypto.a(libcrypto.so.1.0.2)
/unix
/usr/lib/libpthreads.a(shr_comm.o)
/usr/lib/libcrypt.a(shr.o)
but the dump command seems to support the 32 v 64 bit theory:
$ dump -H -X64 libtcnative-1.so.0.2.24
libtcnative-1.so.0.2.24:
dump: libtcnative-1.so.0.2.24: 0654-108 file is not valid in the current object file mode.
Use the -X option to specify the desired object mode.
$ dump -H -X32 libtcnative-1.so.0.2.24
libtcnative-1.so.0.2.24:
***Loader Section***
Loader Header Information
VERSION# #SYMtableENT #RELOCent LENidSTR
0x00000001 0x00000364 0x00000771 0x00000084
#IMPfilID OFFidSTR LENstrTBL OFFstrTBL
0x00000007 0x0000aacc 0x00006406 0x0000ab50
***Import File Strings***
INDEX PATH BASE MEMBER
0 /opt/freeware/lib:/usr/lib:/lib
1 libssl.so
2 libcrypto.so
3 libapr-1.so
4 libpthread.a shr_xpg5.o
5 libc.a shr.o
6 libgcc_s.a shr.o
It looks like only the 32-bit version of APR is currently available on the server also. I will update once I can get the 64-bit version installed.
Further Updates
The commands I am trying now are:
$ export CFLAGS=-maix64
$ export OBJECT_MODE=64
$ ./configure --with-apr=/opt/freeware/bin/apr-1-config_64 --with-java-home=/app/java8_64/ --with-ssl=/usr/include/openssl --prefix=/app/tomcat
$ make && make install
No errors but same outcome however. This doesn't seem to build a 64 bit version of the tomcat native module (if that is the issue).

trap int3 error in libglib - debian eclipse

I get this error randomly while using eclipse IDE with my PC turned on for more than a day:
(kern.log)
trap: java [16410] trap int3 ip: 7f2a62422c75 sp: 7f2a9f686da0 error: 0 in libglib-2.0.so.0.5800.3 [7f2a623ea000 + 7e000]
when I get the error, eclipse crashes.
This is my operating system configuration on Debian 10 buster:
Linux 4.19.0-10-amd64 # 1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU / Linux
This is the eclipse version:
Version: 2019-12 (4.14.0)
Build id: 20191212-1212
I tried to run a clear setup but I always get the same error
Could it be a software or hardware problem?
Thanks

VisualVM can not start

I have a remote Debian Squeeze server. I've installed Oracle JDK 1.7.0_07 manually and configured alternatives to every binary in jdk/bin path. Also i exported the global JAVA_HOME variable.
# java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) Server VM (build 23.3-b01, mixed mode)
#
Server has Gnome on board and I'm connecting with putty and X-Windows forwarding enabled.
But when I'm trying to launch VisualVM with jvisualvm command I just get nothing with 5-10 sec pause:
# jvisualvm
#
And when I try to show help, I see an Exception:
# jvisualvm --help
Usage: /usr/java/jdk1.7.0_07/bin/../lib/visualvm//platform/lib/nbexec {options} arguments
General options:
--help show this help
--jdkhome <path> path to Java(TM) 2 SDK, Standard Edition
-J<jvm_option> pass <jvm_option> to JVM
--cp:p <classpath> prepend <classpath> to classpath
--cp:a <classpath> append <classpath> to classpath
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class org.netbeans.core.startup.Splash$SplashComponent
at org.netbeans.core.startup.Splash.<init>(Splash.java:111)
at org.netbeans.core.startup.Splash.getInstance(Splash.java:64)
at org.netbeans.core.startup.Main.setStatusText(Main.java:47)
at org.netbeans.core.startup.NbEvents.setStatusText(NbEvents.java:384)
at org.netbeans.core.startup.NbEvents.logged(NbEvents.java:159)
at org.netbeans.Events.log(Events.java:127)
at org.netbeans.core.startup.ModuleList.readInitial(ModuleList.java:129)
at org.netbeans.core.startup.ModuleSystem.readList(ModuleSystem.java:241)
at org.netbeans.core.startup.CLICoreBridge.usage(CLICoreBridge.java:69)
at org.netbeans.CLIHandler.showHelp(CLIHandler.java:125)
at org.netbeans.CLIHandler.checkHelp(CLIHandler.java:179)
at org.netbeans.CLIHandler.initialize(CLIHandler.java:530)
at org.netbeans.CLIHandler.initialize(CLIHandler.java:346)
at org.netbeans.MainImpl.execute(MainImpl.java:151)
at org.netbeans.MainImpl.main(MainImpl.java:46)
at org.netbeans.Main.main(Main.java:39)
I googled that exception and found out that the libxtst-dev library is missing, but I installed it previously.
So what is the problem, how can I figure out what is going wrong?
UPDATE:
I'm working under root.
I don't have other versions of JDK in the system, the default OpenJDK was removed with apt-get purge.
My CLASSPATH system variable is empty, is it a problem?
UPDATE2:
libXtst is in /usr/lib
root#test:/usr/lib# ls -la /usr/lib | grep libXtst
-rw-r--r-- 1 root root 26666 Июн 23 2010 libXtst.a
lrwxrwxrwx 1 root root 16 Окт 7 01:18 libXtst.so -> libXtst.so.6.1.0
lrwxrwxrwx 1 root root 16 Окт 6 20:26 libXtst.so.6 -> libXtst.so.6.1.0
-rw-r--r-- 1 root root 23616 Июн 23 2010 libXtst.so.6.1.0
libXext is also in /usr/lib
root#test:~# ls -la /usr/lib | grep libXext
-rw-r--r-- 1 root root 118668 Июл 11 2010 libXext.a
lrwxrwxrwx 1 root root 16 Окт 6 22:26 libXext.so -> libXext.so.6.4.0
lrwxrwxrwx 1 root root 16 Май 21 13:42 libXext.so.6 -> libXext.so.6.4.0
-rw-r--r-- 1 root root 74432 Июл 11 2010 libXext.so.6.4.0
root#test:~#
here is output for command jvisualvm -J-Dnetbeans.logger.console=true
root#test:~# jvisualvm -J-Dnetbeans.logger.console=true
-------------------------------------------------------------------------------
>Log Session: Monday, October 8, 2012 10:48:32 PM MSK
>System Info:
Product Version = Java VisualVM
Operating System = Linux version 2.6.32-5-amd64 running on i386
Java; VM; Vendor = 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01; Oracle Corporation
Runtime = Java(TM) SE Runtime Environment 1.7.0_07-b10
Java Home = /usr/java/jdk1.7.0_07/jre
System Locale; Encoding = ru_RU (visualvm); UTF-8
Home Directory = /root
Current Directory = /root
User Directory = /root/.visualvm/7u6
Cache Directory = /root/.visualvm/7u6/var/cache
Installation = /usr/java/jdk1.7.0_07/lib/visualvm/visualvm
/usr/java/jdk1.7.0_07/lib/visualvm/profiler
/usr/java/jdk1.7.0_07/lib/visualvm/platform
Boot & Ext. Classpath = /usr/java/jdk1.7.0_07/jre/lib/resources.jar:/usr/java/jdk1.7.0_07/jre/lib/rt.jar:/usr/java/jdk1.7.0_07/jre/lib/sunrsasign.jar:/usr/java/jdk1.7.0_07/jre/lib/jsse.jar:/usr/java/jdk1.7.0_07/jre/lib/jce.jar:/usr/java/jdk1.7.0_07/jre/lib/charsets.jar:/usr/java/jdk1.7.0_07/jre/lib/jfr.jar:/usr/java/jdk1.7.0_07/jre/classes:/usr/java/jdk1.7.0_07/jre/lib/ext/zipfs.jar:/usr/java/jdk1.7.0_07/jre/lib/ext/dnsns.jar:/usr/java/jdk1.7.0_07/jre/lib/ext/localedata.jar:/usr/java/jdk1.7.0_07/jre/lib/ext/sunpkcs11.jar:/usr/java/jdk1.7.0_07/jre/lib/ext/sunec.jar:/usr/java/jdk1.7.0_07/jre/lib/ext/sunjce_provider.jar
Application Classpath = /usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/boot.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/org-openide-modules.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/org-openide-util.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/org-openide-util-lookup.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/locale/boot_ja.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/locale/boot_zh_CN.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/locale/org-openide-modules_ja.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/locale/org-openide-modules_zh_CN.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/locale/org-openide-util_ja.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/locale/org-openide-util-lookup_ja.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/locale/org-openide-util-lookup_zh_CN.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/lib/locale/org-openide-util_zh_CN.jar:/usr/java/jdk1.7.0_07/lib/dt.jar:/usr/java/jdk1.7.0_07/lib/tools.jar
Startup Classpath = /usr/java/jdk1.7.0_07/lib/visualvm/platform/core/org-openide-filesystems.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/core/core.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/core/locale/core_ja.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/core/locale/org-openide-filesystems_ja.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/core/locale/core_zh_CN.jar:/usr/java/jdk1.7.0_07/lib/visualvm/platform/core/locale/org-openide-filesystems_zh_CN.jar:/usr/java/jdk1.7.0_07/bin/../lib/visualvm/visualvm/core/com-sun-tools-visualvm-modules-startup.jar:/usr/java/jdk1.7.0_07/bin/../lib/visualvm/visualvm/core/locale/com-sun-tools-visualvm-modules-startup_ja.jar:/usr/java/jdk1.7.0_07/bin/../lib/visualvm/visualvm/core/locale/core_visualvm.jar:/usr/java/jdk1.7.0_07/bin/../lib/visualvm/visualvm/core/locale/com-sun-tools-visualvm-modules-startup_zh_CN.jar
-------------------------------------------------------------------------------
java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_07/jre/lib/i386/xawt/libmawt.so: libXext.so.6: Unable to open shared object file: No such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
at java.lang.Runtime.load0(Runtime.java:792)
at java.lang.System.load(System.java:1059)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1846)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:77)
at java.security.AccessController.doPrivileged(Native Method)
at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:74)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:186)
at java.awt.GraphicsEnvironment.createGE(GraphicsEnvironment.java:102)
at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:81)
at org.netbeans.core.startup.Main.start(Main.java:203)
at org.netbeans.core.startup.TopThreadGroup.run(TopThreadGroup.java:84)
at java.lang.Thread.run(Thread.java:722)
UPDATE 3
I downloaded Java demos and tried to launch SwingSet2:
root#test:/tmp/jdk1.7.0_06# java -jar demo/jfc/SwingSet2/SwingSet2.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: /usr/java/jdk1.7.0_07/jre/lib/i386/xawt/libmawt.so: libXext.so.6: unbale to open shared object file: no such file or directory
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1825)
at java.lang.Runtime.load0(Runtime.java:792)
at java.lang.System.load(System.java:1059)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(ClassLoader.java:1939)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1864)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1846)
at java.lang.Runtime.loadLibrary0(Runtime.java:845)
at java.lang.System.loadLibrary(System.java:1084)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1648)
at java.awt.Toolkit.<clinit>(Toolkit.java:1670)
at java.awt.Component.<clinit>(Component.java:595)
UPDATE 4
finally my mistake was in the version of JDK, see accepted answer.
I think you found the correct answer when you googled for the exception. libXtst.so.6 is missing, it should be in /usr/lib directory. Are you sure that it is installed? Can you run any other Java GUI application like SwingSet2? Can you run VisualVM with -J-Dnetbeans.logger.console=true and post the output?
jvisualvm -J-Dnetbeans.logger.console=true
Resolution for MAC: [In my case nothing was happening when I was trying to open the app]
Goto Application folder, Show Contents -> Resources/visualvm/etc/visualvm.conf
Example:
/Applications/VisualVM.app/Contents/Resources/visualvm/etc/visualvm.conf
Uncomment "visualvm_jdkhome" and replace the value with the correct JDK home path.
Example:
visualvm_jdkhome="/Users/username/tools/jdk-11.0.10.jdk/Contents/Home"
Try opening the app again, It should open.

Categories

Resources