3

I just downloaded and installed a trial JProfiler version from jprofiler_linux_7_0_1.sh. The strange fact is that there's no prompt for inputting license information in the installing process. But everything seems to be fine, until I try to run the profiler:

# sh ./bin/jprofiler -c

(The -c is to run jprofiler in console. I have read somewhere on Internet, but not sure that's true. Anyway, the result is still the same.)

Here's the results I get:

Exception in thread "main" java.lang.UnsatisfiedLinkError: /opt/jdk1.6.0_26/jre/lib/amd64/xawt/libmawt.so: libXext.so.6: cannot open shared object file: No such file or directory
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1703)
        at java.lang.Runtime.load0(Runtime.java:770)
        at java.lang.System.load(System.java:1003)
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1807)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1724)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:50)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.awt.NativeLibLoader.loadLibraries(NativeLibLoader.java:38)
        at sun.awt.DebugHelper.<clinit>(DebugHelper.java:29)
        at java.awt.Component.<clinit>(Component.java:566)
        at com.install4j.runtime.splashscreen.JavaSplashController.show(Unknown Source)
        at com.install4j.runtime.launcher.SplashEngine.showSplashScreen(Unknown Source)
        at com.install4j.runtime.launcher.Launcher.main(Unknown Source)

I have come to /opt/jdk1.6.0_26/jre/lib/amd64/xawt; it does have libmawt.so, but no libXext.so.6. I tried to uninstall jprofiler and install it again, but the same error occurs.

Does anyone have a clue what's happening here?

Hoàng Long
  • 10,746
  • 20
  • 75
  • 124

2 Answers2

3

You cannot run the JProfiler GUI in console mode. The argument -c is only for running the installer in console mode.

To set up profiling on a headless machine, run

bin/jpintegrate

To control a profiled process that does not have a JProfiler GUI attached ("offline profiling") run

bin/jpcontroller
Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • thanks for your instruction, I have setup jpintegrate and get the config.xml out of it. I tried to connect my local machine to the server, but unsuccessful – Hoàng Long Nov 17 '11 at 09:59
  • do you know anyway to identify that the agent is already running? – Hoàng Long Nov 17 '11 at 10:01
  • 1
    @HoàngLong on stderr, you will see lines prefixed with "JProfiler>", they indicate that the agent is activated. On your local machine, use a session of type "Attach to JVM (local or remote)" and choose the same port as spcified in jpintegrate. Also make sure that firewalls on the remote and local sides are open on that port. – Ingo Kegel Nov 17 '11 at 10:20
  • Thank you for the correct guide. That's exactly the problem I met later. – Hoàng Long Nov 18 '11 at 09:32
  • Well, you are one of the guys who develop jprofiler? That's cool :). Would you please show me some dependable source to look for JProfiler document? – Hoàng Long Nov 18 '11 at 09:35
  • 1
    @HoàngLong To learn more about JProfiler, you could have a look at the [screen casts](http://www.ej-technologies.com/products/jprofiler/screencasts). The documentation is bundled, but it is also [available online](http://www.ej-technologies.com/products/jprofiler/resources.html). Another good way to explore features is to look at the [what's new pages of recent releases](http://www.ej-technologies.com/products/jprofiler/whatsnew7.html). – Ingo Kegel Nov 18 '11 at 09:40
1

Check that you have got libxtst in your operation system. To install it, you can do something like this: "sudo apt-get install libxtst6:

PS: You could also try to use YourKit Java Profiler with evaluation license.

Vladislav Bauer
  • 952
  • 8
  • 19