6

Do I need a symlink to make javaws, that is, Java Web Start, work if I have a personalized location for my Java?

I have installed Java as follows:

sudo update-alternatives --install "/usr/bin/java" "java" 
    "/home/user/programs/jdk6u32/bin/java" 1

sudo update-alternatives --install "/usr/bin/javaws" "javaws" 
    "/home/user/programs/jdk6u32/bin/javaws" 1

sudo update-alternatives --config java
sudo update-alternatives --config javaws

sudo ln -s /home/user/programs/jdk6u32/jre/lib/amd64/libnpjp2.so 
    /usr/lib/firefox-addons/plugins/libnpjp2.so

The last line is necessary for Firefox to find the Java plug-in. It sets up a symlink. It was due to advice found on stackexchange and I suspect I need something similar for javaws and if so, what would it be?

I am on ubuntu 12.04 (Precise) and Firefox 12.0 and Oracle Java 6 update 32.

H2ONaCl
  • 9,693
  • @Samik, You are right. There are a few choices: download, open with Firefox or open and browse. Opening and browsing to 'javaws' did the trick. Strangely, I never had to browse through the file system with my earlier setups but I think I had Java setup differently before. You should post it as an answer. – H2ONaCl Jun 06 '12 at 18:56
  • Ok, then posting this as an answer. – Samik Jun 06 '12 at 18:59

3 Answers3

5

Whenever you encounter a .jnlp file download, Firefox will present you with the "open-with" dialogue, then you can browse to the location of javaws and open the .jnlp file with it. From next time on, it'll be the default choise remembered by the browser.

Samik
  • 2,660
  • That's true, but is it necesarry to launch firefox to run JNLP application? But on right click on file javaws is missing in open with other application application list :-( – Betlista Jan 03 '13 at 22:46
  • just open a terminal and type javaws <jnlp file name> – Samik Jan 03 '13 at 22:57
  • I know, but when I can associate it with firefox I would expect, that I can associate it also with javaws... – Betlista Jan 03 '13 at 23:38
  • well, there is a way to associate file-types to application, go to /usr/share/applications/ then edit defaults.list to add the line application/x-java-jnlp-file=javaws.desktop, of course you have to create the .desktop file if that doesn't exist; I use icetea plugin, so mine is icedtea-netx-javaws.desktop but you can custom create a .desktop file with menu editor that points to javaws and kp it in that directory. Then log out and log back in. – Samik Jan 03 '13 at 23:53
  • Thanks for your comments. I used this way - http://askubuntu.com/questions/235861/how-to-associate-jnlp-file-with-javaws/235872#235872 – Betlista Jan 04 '13 at 00:04
1

After you launch the jnlp before, the mime type is stored into the firefox mimeType.rdf, so you could pike up it from Edit > Preferences > Applications, search "jnlp", then you could associate the javaws (any version of jdk or jre) with it.

Eric
  • 11
  • 1
0

Open Firefox and go to: EditPreferencesApplicationsJava Web Start

Pick the choice you want.

Basharat Sialvi
  • 24,046
  • 8
  • 62
  • 82
  • Today Java Web Start is not listed anymore, but a search for jnlp works. – Harald Sep 26 '17 at 15:21
  • I have a phone calling site which uses Java applet for web calling, I added the URL address to Web Start, but it didn't work, is there any other way to run this applet with Firefox 15.0.1? – Michael Mar 18 '19 at 07:53