Speed up Java2D (& Swing) in Linux

Using -Dsun.java2d.opengl=true as startup argument for java when starting application using Java2D heavily (well, basically any Swing application), it improves noticeably performance in Linux environment. Currently I’m experimenting following settings in my /etc/profile.local -file. [code] _JAVA_OPTIONS=’-Xverify:none -Dsun.java2d.opengl=true’ export _JAVA_OPTIONS [/code] (_JAVA_OPTIONS is magic environment variable which is used automatically by java). I tested performance by…

Read more

Profiling Webstart applications

Profiling of the applications launched via webstart may sound difficult, but in reality it isn’t. What you need is to have approriate profiler/debugger native libraries in LD_LIBRARY_PATH of the system (or equivalent), and then specifying necessary arguments for webstart (from command line) For example, using YourKit with Webstart: [code] javaws -J-agentlib:yjpagent=tracing http://example.com/example.jnlp [/code] Same approach…

Read more

Java SE 6 troubleshooting

Some interesting additional java parameters: B.1 HotSpot VM Command-Line Options – Troubleshooting Guide for Java SE 6 with HotSpot VM Option to automatically make memory dump when OutOfMemory occurs sounds rather interesting. These utilities, should exist in all java deployments: jps: List PIDs of java processes jmap: Make heap of java process (jmap -dump:format=b,file=test.hprof PID)…

Read more