Migration issues from Sun/Oracle JDK to OpenJDK

758 views
Skip to first unread message

Carl Jokl

unread,
Nov 17, 2011, 7:50:52 AM11/17/11
to The Java Posse
I am creating this thread as I want to ask about individuals
experiences with migrating from the encumbered Sun/Oracle JDK to
OpenJDK?

I have done some initial tests on the product developed by the company
for which I work. Using OpenJDK has some advantages given that Linux
is used both for developer workstations as well as the servers and
OpenJDK can be installed through the packaging system with all the
dependency management in place but the Sun/Oracle JDK is getting
harder to install via that means (and a non package manager
installation does not satisfy dependencies in the package manager
because it has no knowledge that a working version of Java is
installed.

OpenJDK seems to becoming more mature and I know it has passed the
Java TCKs. Testing with our product so far, OpenJDK seems to be
running fine with one area of potential concern of failure (A bridge
between Java and GNUstep called JIGS). On the other hand I am
experiencing a problem using JChart (latest version). In one of the
observed charts the writing is all garbled on OpenJDK. I think this
could be some kind of Font issue. I believe the Sun/Oracle JDK uses
some encumbered fonts. It is a little strange though because I can't
find anyone mentioning that JChart has issues with OpenJDK and it
seems to be claimed to be OpenJDK compatible. Downloading and running
JChart's swing demo seems to work the same whether I use the OpenJDK
or Sun/Oracle JDK.

Has anyone come across garbled text rendering for OpenJDK on Linux? If
so is fixing the problem straightforward?

The answer to these questions may decide if it is worth trying to fix
whatever is the source of compatibility problems on OpenJDK or if
instead it is just better to keep using the Sun/Oracle encumbered
version.

Simon Ochsenreither

unread,
Nov 17, 2011, 9:07:27 AM11/17/11
to java...@googlegroups.com
Hi Carl,

could possibly be a problem with the font renderer. OpenJDK switched to FreeType, while OracleJDK afaik still uses a proprietary one.
I'm not sure if Lucida still ships as a font with the proprietary Java ... probably grab the font from OracleJDK if it still exists and try running program with that font and OpenJDK.

Other possibility could be XRender. Did you try running with/without XRender?

Good luck, let me know if something helped!

Thanks,


Simon

Carl Jokl

unread,
Nov 17, 2011, 9:23:37 AM11/17/11
to java...@googlegroups.com
I managed to get font rendering under a Centos 5 server (with minimal gui-less installation as per company instructions) by installing  xorg-x11-fonts-Type1 through yum. This allowed font rendering to work. The font used though was different from the Sun JDK. I though I might fix that by installing the package for Sun java fonts. This actually make the rendering worse with text that was supposed to be vertical drawing at a slight diagonal. 

It looks like font rendering is still kind of problematic on OpenJDK and Oracle lots of other stuff to do such that it may not be addressed any time soon.

At the end of the day the system work with and has been distributed with the Sun/Oracle implementation of Java. I just thought it might be worth migrating if it was robust enough these days. 

This might be a little off topic but I am not exactly clear about what the future plans are for the OpenJDK relative to the Oracle JDK. The documentation says that the Oracle JDK will be based on OpenJDK. Is there an intention to eventually no longer need any kind of proprietary JDK at all and standardise on the OpenJDK?

Carl


--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/cb9a2iEqyT0J.

To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.

Simon Ochsenreither

unread,
Nov 17, 2011, 10:33:04 AM11/17/11
to java...@googlegroups.com
Hi,

Well, it is pretty much the other way around.

While OpenJDK is where development happens, Oracle only distributes the proprietary OracleJDK as the “official thing” on chosen platforms.
If you want to use something else, you have to build it yourself or rely on other vendors to supply it to you.

Bye,


Simon.

robilad

unread,
Nov 17, 2011, 11:43:13 AM11/17/11
to The Java Posse
Another point to keep in mind is that Oracle JDK 7 is based on the
source
code in OpenJDK 7, while that was not the case for Oracle JDK 6 and
OpenJDK 6:
http://blogs.oracle.com/darcy/entry/openjdk_6_genealogy - so YMMV
depending
on whether you're using OpenJDK 6 or OpenJDK 7 packages from your
distribution,
in addition to other factors mentioned below.

cheers,
dalibor topic

Java F/OSS Ambassador
Java Platform Group @ Oracle

Carl Jokl

unread,
Nov 17, 2011, 12:08:34 PM11/17/11
to java...@googlegroups.com
I suspect though that in the case of some of the worse issues such as font rendering and graphical fidelity in general, if some solution is put into place for either Java 6 or Java 7 implementations it will probably be used in both. The Java specification doesn't concretely specify how things have to look graphically or what the graphical performance must be like. 

The things I came across on the internet regarding text rendering in Java implied that the solutions put in place so far are known full well not to be the best but resources are limited and there is already so many other things to do that this issue is probably not going to get the same attention.

I wonder if some of the text / font rendering couldn't be written in Java using the graphics pipeline to perform the drawing. I suppose whether it is implemented in Java or using a native library probably isn't so much of an issue compared with it being easier to reuse some existing implementation of text rendering rather than write a new one, especially to get things done quickly.

--
You received this message because you are subscribed to the Google Groups "The Java Posse" group.

robilad

unread,
Nov 17, 2011, 1:40:32 PM11/17/11
to The Java Posse
On Nov 17, 6:08 pm, Carl Jokl <carl.j...@gmail.com> wrote:
> I suspect though that in the case of some of the worse issues such as font
> rendering and graphical fidelity in general, if some solution is put into
> place for either Java 6 or Java 7 implementations it will probably be used
> in both.

If we're talking about OpenJDK 6 and OpenJDK 7 specifically, then no.

OpenJDK 7 has seen a lot of work going into it that is not in OpenJDK
6
(but it is in Oracle JDK 6 & Oracle JDK 7, obviously), due to the
different
genealogy of OpenJDK 6.
Reply all
Reply to author
Forward
0 new messages