LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Sun Java not run some jnlp file (https://www.linuxquestions.org/questions/slackware-14/sun-java-not-run-some-jnlp-file-923587/)

BratPit 01-13-2012 07:18 AM

Sun Java not run some jnlp file
 
Hi

Can not run aplet from jnlp file from this link:

I checked it on Slackware 13.37,13.0 and slack based distro Salix.
Always error "Can not ran Java Env /usr/lib/java".

On other distros installed on VirtualBox : Debian, Centos Fedora everything works OK .
Java version 6_24 but on others works too.

Only on slack based distro do not work.

I think it is a bug in Java install on Slackware package because on other distros on the same version Java it works OK.

Maybe some clue.I gave up.

B.P

corp769 01-13-2012 08:11 AM

Instead of using the "java" command, have you tried using "javaws" to run the jnlp file?

BratPit 01-13-2012 08:42 AM

Yes .
I wrote:



Everyone can check this.

Alien Bob 01-13-2012 09:10 AM

It works fine on my Slackware64 13.37.
I get a polish login screen.

Eric

BratPit 01-13-2012 09:25 AM

Bob

But on my 32 bit is

"Unable to launch the aplication"

both on laptop and on desktop.

I did not check on Slack64.

Maybe it is time to go for 64 bits :-)

Thanks.

phenixia2003 01-13-2012 09:49 AM

Hello,

Quote:

Originally Posted by BratPit (Post 4573646)
But on my 32 bit is

"Unable to launch the aplication"

both on laptop and on desktop.

I did not check on Slack64.

Maybe it is time to go for 64 bits :-)

Well, I tried on my Slackware-32 and I got the error with the JRE (ie 6u25),
but, with the (stock) JDK, the application works. So replacing the JRE by
the JDK should solve your problem.

--
SeB

Alien Bob 01-13-2012 09:52 AM

Quote:

Originally Posted by phenixia2003 (Post 4573664)
Hello,



Well, I tried on my Slackware-32 and I got the error with the JRE (ie 6u25),
but, with the (stock) JDK, the application works. So replacing the JRE by
the JDK should solve your problem.

--
SeB

I should have mentioned that I have the JDK installed as well. No idea why that would be required...

Eric

BratPit 01-13-2012 10:37 AM

phenixia2003

Thanks for pointing me to jdk.
It works.
I mark thread as resolved, but open question is:

Why jre in Slackware do not work, and in rpm based distros and Debian works ?

BratPit 01-13-2012 12:33 PM

Alien Bob,phenixia2003

I found it.

There is bug in JRE package for Slackware

The environment path is: /usr/lib/java

and should be: /usr/lib/java/jre

Best regards

phenixia2003 01-14-2012 10:50 AM

Hello,

Quote:

Originally Posted by BratPit (Post 4573790)
I found it.

There is bug in JRE package for Slackware

The environment path is: /usr/lib/java

and should be: /usr/lib/java/jre

The JRE package has no folder /usr/lib/java/jre, this one comes from the JDK package.

But, I reproduced the problem under Slackware and Centos (6.2) using only the binaries from Oracle (versions 6u25 and 6u30).

First of all, looking at the Slackbuild used to repackage the JRE binaries from Oracle, we notice the steps below :
  1. Unpacks the binary from Oracle under /usr/lib, which create a folder name jre1.6.0_25.
  2. renames the folder jre1.6.0_25 to java
  3. creates a symlink jre1.6.0_25 -> java

It seems that the problem has something to do with the step #2, but I really don't know why and I don't understand that :scratch:. This should be related to a bug from Oracle or inside the application pointed by the provided jnlp link.

So, how to reproduce the problem using only the binaries from Oracle ?
  1. Save the script /etc/profile.d/jre.sh to something like /etc/profile.d/jre.sh.bak
  2. Remove your java installation (ie removepkg jre or removepkg jdk)
  3. Restore the script /etc/profile.d/jre.sh
  4. Get the JRE binary from Oracle. This test can be done using the version "6u30" as you can't get previous versions unless you have an Oracle account (sic!).
  5. as root, install the JRE into /usr/lib :
    Code:

    $ cd /usr/lib
    $ sh /path/to/oracle/jre-6u30-linux-i586.bin (or jre-6u30-linux-x64.bin)


After this, the JRE must be installed into /usr/lib/jre1.6.0_30. Always in /usr/lib, create this link :

Code:

  $ ln -sf jre1.6.0_30 java
Now, as normal user, if you start the application from the given jnlp link, using your browser or using the command below, things should work without any problem.

Code:

$ javaws http://makler.bmbgz.pl/sidoma8inter/sidoma_kl.jnlp
Now, we're going to reproduce, with the binary from Oracle, the problem found with the JRE package from Slackware.

1. As root :

Code:

  $ cd /usr/lib
  $ rm java
  $ mv jre1.6.0_30 java
  $ ln -sf java jre1.6.0_30

Note:The 2 last lines are the steps #2 and #3 found into the Slackbuild used to repackage the binaries from Oracle.

2. As normal user, if you start the application from the provided jnlp link, an error will be thrown.

Now, if we cancel what was done in the two previous steps, the application will start normally again :
  1. As root :

    Code:

    $ cd /usr/lib
     $ rm jre1.6.0_30
     $ mv java jre1.6.0_30
     $ ln -sf jre1.6.0_30 java

  2. As normal user, the application started from the provided jnlp link should work.

As the JDK binaries are repackaged the same way, I really don't understand why the jnlp-application works with it and not with the JRE. Is anybody else could check this to ensure that I don't tell stupid things :p ?

Greetings.

--
SeB

BratPit 01-14-2012 04:54 PM

phenixia2003

I was unprecisly.
The environment path to java home in /etc/profile.d/ is corect.
but JRE is only copied runtime part of JDK .
The runtime binaries in jdk are in path /usr/lib/java/jre but that runtimes in jre are in ../java.
I do not know why but if they are in the different folder outside path to ../jre you can't set properly environment to run javaws.
Simply system "sees" executable of java but Java itself not.
If you open ControlPanel of Java from menu and try set environment path to another folder but ../jre you can't set and write this environment path.
If they are right in place Java find and set it iself in its ControlPanel.

I just unpacked jre txz package copy content of ../java to ../jre then move ../jre to ..java and change install script to make right symlinks. Then make package and finito :-)


All times are GMT -5. The time now is 04:43 PM.