Wednesday, 30 April 2014

Running EAS web console using different Java versions

Recently there was an OTN thread about invoking the EAS web console using different Java versions and it is a question that crops up time and time again.

Tim German wrote an excellent blog outlining the problem and a possible workaround, now I don’t want to discredit the method that Tim proposed in any way as it perfectly fine but I use a different technique and wanted to share as the way I see it the more options available the better.

For many different reasons it is possible that multiple versions of a JRE are installed on a client machine and probably the main reason is various software applications support different versions of Java.

It is possible to run multiple versions of Java without any issues but when using the EAS web console the user is usually forced down the route of the latest installed Java version being automatically invoked, yes it is possible to enable and disable the versions but sometimes this can be a pain when running multiple applications and in some cases an internal IT group policy will stop any changes being made in the Java control panel.

For example if I access the EAS web console then Java 8 which is not currently supported is automatically used as this is the latest version installed on my machine.

In theory you might think that starting up EAS by specifying the version of Java first would help but when accessed the JNLP file controls which version of Java will be invoked.

"C:\Program Files\Java\jre6\bin\javaws.exe" http://fusion11:10080/easconsole/easconsole.jnlp

In the above example Java 6 web start is used and the EAS JNLP is called, you will see the Java 6 flash screen appear but then the version of Java which will be used to start the console is defined by the contents of the JNLP which I will get onto shortly


So in my case Java 8 is invoked for running the EAS web console.

To get around this I use the following method which seems to work well for me.

First I want to download the JNLP to my machine instead of calling it each time from the EAS server where you have no control over it.

I create a test file with a jnlp extension and if you take a look at the properties you will notice by default it will open using Java Web Start Launcher.

I updated the property so it opens using notepad.

Now when I access the EAS web console the JNLP file is downloaded and I can it to my desktop.

If the easconole.jnlp file is edited you will see the following line in the xml code:

      <j2se initial-heap-size="32m" max-heap-size="256m" version="1.6+"/>

This basically means that the version of Java that will be invoked will be the latest version available that is greater or equal to 6 so in my case the web console will be run using Java 8

Once the jnlp file has been downloaded the property can be set back to opening with Java Web Start Launcher.

So to be able to run EAS using Java 6 I copied the jnlp file and edited to set the version to 1.6 instead of 1.6+

Then to start EAS I used the following syntax which runs Java Web Start 6 and also calls the updated JNLP file.

"C:\Program Files\Java\jre6\bin\javaws.exe" C:\EASConsoleTesting\easconsole16.jnlp

Taking a look at the Java Console and the properties of the Java process which EAS is running against it clearly indicates that Java 6 is correctly being used.

To use Java 7 it is a simple as copying and creating a new JNLP file then updating the version to 1.7

The syntax is the same but this time calling Java Web Start 7

Once again looking at the properties confirms the correct version of Java is being used.

It is also possible to target an exact update version so in my case I have both Java 7 update 45 and 55 installed but I want to open EAS using update 45.

This time in the JNLP file the version is set as “1.7.0_45” though to get it work I also had to add:



The command to run is exactly using the same format.

The correct version of Java being run is confirmed.

So that is my take on running EAS web console using different Java versions, enjoy!


Aarthi Krishnan said...

Hi john

The console almost launches for me save the exception of this error. Is this something you have run into ?

Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException
at com.essbase.eas.ui.frame.CFrame.windowOpened(Unknown Source)
at com.essbase.eas.console.ConsoleFrame.windowOpened(Unknown Source)
at com.essbase.eas.ui.frame.CFrame$1.windowOpened(Unknown Source)
at java.awt.AWTEventMulticaster.windowOpened(Unknown Source)

John Goodwin said...

Maybe you are experiencing the following bug -

Hari said...

Hi John ,

Thanks for the info.

How can we make those changes at the server side so that when user tries to access web console it will use the updaed easconsole.jnlp file and use only Java version 6