Tag Archives: bug

Fixing IntelliJ IDEA font glitch on Ubuntu

This post is mostly for myself to remember what changes to make in IntelliJ IDEA. The problem is that fonts are ugly and not antialized in stock-IDEA. In my case it affects IDEA 13 and 13.1 so far.

The problem is still not completely solved, the fonts are looking better, but still not as good as in Eclipse. Don’t ask me why, I just don’t know.

After googling for a good while I came up with the following additions that improve how fonts are rendered:

In idea64.vmoptions add the following lines:

-Dawt.useSystemAAFontSettings=on
-Dswing.aatext=true
-Dsun.java2d.xrender=true

At the very end of idea.sh exchange the following line

eval "$JDK/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@"

for

eval "/usr/lib/jvm/jdk-7-oracle-x64/bin/java" $ALL_JVM_ARGS -Djb.restart.code=88 $MAIN_CLASS_NAME "$@"

This is to make sure that Oracles JDK is used as there seems to be a problem with OpenJDK and fonts in IDEA (even though this works in Eclipse). Make sure you use the path that is correct for your JDK.

While at it I also increased the default memory settings and my complete idea64.vmoptions looks like this now:

-server
-Xms256m
-Xmx2048m
-XX:MaxPermSize=512m
-XX:ReservedCodeCacheSize=256m
-ea
-Dsun.io.useCanonCaches=false
-Djava.net.preferIPv4Stack=true
-XX:+UseCodeCacheFlushing
-XX:+UseConcMarkSweepGC
-XX:SoftRefLRUPolicyMSPerMB=50
-Dawt.useSystemAAFontSettings=on
-Dswing.aatext=true
-Dsun.java2d.xrender=true
Advertisements

Recent problems with launching Conzilla

I got several emails these days from people who were not able to launch Conzilla anymore. The reason was an exception (“java.net.MalformedURLException: no !/ in spec”) during start up.

I investigated the problem (which is caused by a regression bug of Sun’s most recent Java 5.0, i.e. 1.5.0_16) and tried to work around it, but came to the conclusion – as many other developers who tried to solve the very same problem – that it is best to wait for a fix from Sun.

The reason is that it would require too many changes in the code and even some major refactoring. Apart from that, even third-party libraries as e.g. log4j are affected. Conzilla is not the only application which has been broken, basically all applications making use of Java Web Start are affected.

Bugs have been reported to Sun:

http://bugs.sun.com/view_bug.do?bug_id=6746185
http://bugs.sun.com/view_bug.do?bug_id=6753651

Let’s hope that Sun fixes this bug very soon, until then my recommendation is: Do not use JRE/JDK 1.5.0_16, and if you happen to use it, downgrade to an earlier release, or upgrade to 6.0/1.6.

I will keep you informed regarding this issue.