Saturday, October 17, 2009

Problem to running jnlp file

I phased problem to running jnlp file. I was getting following error in ubuntu OS.

netx: Launch Error: Could not launch JNLP file. (java.lang.reflect.InvocationTargetException null) (java.lang.SecurityException Changing the SecurityManager is not allowed.)
.............
........


I found the solution for this problem. to access that jnlp file use sudo privilege and use -nosecurity option .
Like
sudo javaws -nosecurity ContestAppletProd.jnlp

You can put this details in javaws file. Here is the step
find javaws by:
which javaws
my javaws file looks like this.

#!/bin/sh
/usr/lib/jvm/java-6-openjdk/bin/javaws $1

replaced second line with following line:

#!/bin/sh
sudo /usr/lib/jvm/java-6-openjdk/bin/javaws -nosecurity $1

Now i just have to use following command:
javaws ContestAppletProd.jnlp