Saturday, August 17, 2013

JDeveloper 12c, JDK 1.7 and Retina Screens. A Blurred Passioned Triangle!

Hello there.
How are you this fine day? how is your place this time of year??

In this summer post, we are going to see how to overcome the blurriness we will face if we use JDeveloper 12c , jdk 1.7 on a Retina Screen (I tried on a macbook pro). So the latest jdk was installed on this machine was jdk 1.7 u25  which I believe is the latest version at the time of this writing.
All well and the wind is on our side!
However, installing JDeveloper and using jdk 1.7 u25 caused me some issues... one really.. The whole IDE was blurry and very very very very x 2048=very annoying.  I couldn't actually read or write any code...

And I think to my self... what a wonderful summer (well... for the Northern hemisphere anyways.. or let me rephrase: what a wonderful season! (feel better now?) ... why is this happening?

Well, it turns out that this is not related to JDeveloper. It is jdk 1.7 issue as mentioned here:

https://netbeans.org/bugzilla/show_bug.cgi?id=215141

And yes, I did try to see how NetBeans brother looked like and it was the same problem..

Alrighty! So, we are good. it is not JDeveloper's fault. it is not Retina's fault.. it is the jdk 1.7 u25 that causes this behaviour.
In fact, every application that is jdk based will be blurry... 

If you go ahead and open the Java control panel from your mac preferences.. oh baby... it is a blurry world!
So, what do we do? lets go the beach.. or a mountain.. or a bowling place.. or beach party.. or stay inside enjoy good music..
Or perhaps, fix this issue? what do you say?

Well there is a way! isntall jdk1.7 u40 or early access jdk 8! and viola! things are all good!
https://jdk7.java.net/download.html
http://jdk8.java.net

I went for the jdk 1.7 u40 and everything worked like a charm! Or not?
Well, for the NetBeans brother, it did... a restart would do the trick.. the blurriness.. gone.

But for my JDeveloper, it didnt.. it just stayed there.. it was blurry as hell.. To my disappointment, I though it was even more blurry! But of course not..
So we still have a blurry JDeveloper.. Why is that?

We have to get to the bottom of this.

Alright.. Netbeans worked like a charm.. but JDeveloper did not..
OK. Lets see how to set it to the default then!

Locate your jdev.conf file in your JDeveloper Middleware home( whereDidYouInstallJDeveloperPath/jdeveloper/jdev/bin/jdev.conf )..

When you open it, you will see the following:


Hmm...
What do we get from that? Shall we just change the path over there and restart?
The comment says:


# Directive SetJavaHome is not required by default, except for the base
# install, since the launcher will determine the JAVA_HOME.  On Windows
# it looks in ..\..\jdk, on UNIX it first looks in ../../jdk. If no JDK
# is found there, it looks in the PATH.

ok.. so.... I am a bit confused here... it says it is not required.. I have already updated my mac with jdk.17 u40 and it still dosent work.. 

The comment further says that it will look for jdk folder first under specific paths..
I guess this is for installations with bundled jdks... Which in my case... there is no jdk folder...
so this leaves us with the PATH option...
No luck here either... I have no java set in the PATH...

So, I am guessing that it has to pick up that directive either way...
Why dont we update the PATH with our new java version and see what happens??
ok then! (I assume you said YES passionately! and without blurry hesitations! )

ok so we have to set our ~/.batch_profile with JAVA_HOME and then update our PATH
here is a sample:



export JAVA_HOME=$(/usr/libexec/java_home)

export PATH=$PATH:$JAVA_HOME/bin



ok. so, now,  lets just restart  JDeveloper...

Unfortunately, that did not work.. I dont know if we set it all wrong or I understood it all wrong.... but it certainly did not work..

So we have to change that directive to the path of the jdk 1.7_40..

After we restarted JDeveloper, it was obvious from the splash screen that things are now improved..
We can verify this by going to Tools -> Manage Libraries and select JSE definitions


And this is it. It is not pretty... but it did the job.

A note on integrated weblogic: Since this is a workaround for the blurry screen, it is not needed to change the jdk integrated Weblogic uses to run. we can leave it as is. It will run just fine!

For those of you who want to change that config as well, you can change the setDomainEnv.sh file under your system folder / DefaultDomain / bin ( mine was ~/system12.1.2.0.40.66.68/DefaultDomain/bin/setDomainEnv.sh )

A last note, we could just reinstall JDeveloper and pick up the jdk we wanted... but where is the fun in that??

We can now enjoy the pixelized but not blurred splash screen of JDeveloper.. The rest of the IDE is just fine!

CheerzZzZzZz..


No comments:

Post a Comment

Post a Comment

LinkWithin

Related Posts Plugin for WordPress, Blogger...