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 moreModifying remote webstart launch file locally
It seems that it’s possible to save remote webstart file locally. And while still using remotely distributed jar files for the webstart, modify at least few webstart parameters in locally saved jnlp -file. However, this trick seems to work only with JDK5 version of webstart, not the one in JDK6. JDK6 seems to dutifully retrieve…
Read moreJDK 6…, improvement over JDK 5…, not
For example, following issues seem to be persistently existing: Bug ID: 6566201 JNLP ClassLoader performance degraded in 1.6 significantly for the signed(?) jar Bug ID: 6532373 xcb_xlib.c:50: xcb_xlib_unlock: Assertion ’c->xlib.lock’ failed. First issue means huge slow down in webstart application startup. When doing some profiling in webstart started application, it’s consuming huge amount of memory…
Read moreDetecting from where code is called
Detect if current piece of code is called by own classes: [code lang=”java”] /** * @return True if current execution points originates from own classes */ public static boolean isOwn() { StackTraceElement[] stack = Thread.currentThread().getStackTrace(); int len = stack.length; for (int i = 2; i < len; i++) { if (stack[i].getClassName().startsWith("org.kari.")) { return true; }...
Read morePDF rendering in java
Rather interesting news. If java gets built-in PDF rendering support, it opens gateway for various new tricks. Java PDF Renderer
Read moreCalculating JTextComponent -height
Problem: Let’s assume that we know the available width and we should determine what is the required height for JTextComponent within that limitation. This problem arises immediately, at least in three cases in java: Variable row height table cells Tooltip size Message dialog size In all of these cases, it is necessary sometimes to know…
Read moreEclipse 3.3 is crappy slow
After all it turns out that crap factor has overcome over the usability factor. Basically Eclipse 3.3 contains some improvements to speed things up. However, in reality it’s just slower then 3.2.x. Reason for this strangeness is the fact that Eclipse 3.2, made big speed improvement by starting to use jar packaged plugins. This reduced…
Read moreThreading in Java
Quite good and usefull information Java Specialist – The Secrets of Concurrency
Read moreRMI over zipped stream
If large amounts of compressable data is transferred over RMI, then valid question to ask is if compression would make any benefit there. However, before going into compression of the outputstream, first thing is to do algorithmic changes to reduce traffic. I.e. no compresion can match algorithm which avoids reduntant traffic completely. Also compression adds…
Read moreEmbedding Swing components in a JEditorPane
This sounds rather interesting, I can see various interesting uses for this. Amy Fowler’s Blog: Embedding Swing components in a JEditorPane
Read more