Page 1 of 1

Java Web Start no Longer Works in FireFox or Chrome

PostPosted: Mon Mar 27, 2017 7:37 pm
by kwpsd
On first start-up, entering the below URL format in the address bar of FireFox or Chrome no longer works...the browsers just hang (do nothing), but IE still works.

http://{serverURL}/servoy-client/servoy_client/{mySolutionName}.jnlp


When verifying the Java versions, the following warnings are seen:

java_warning_firefox.jpg
Web Start using FireFox
java_warning_firefox.jpg (74.8 KiB) Viewed 11112 times


java_warning_chrome.jpg
Web Start using Chrome
java_warning_chrome.jpg (26.87 KiB) Viewed 11112 times


What is the proper way to launch an application for a smart client without using a browser or the 'Select Solution' dialog?

Re: Java Web Start no Longer Works in FireFox or Chrome

PostPosted: Mon Mar 27, 2017 8:08 pm
by Harjo
that's a warning for applets!

you can download (and start) any jnlp file fine!

Re: Java Web Start no Longer Works in FireFox or Chrome

PostPosted: Mon Mar 27, 2017 9:49 pm
by ROCLASI
Hi Kim,

Some browsers will not automatically launch the jnlp file after downloading it. So it sits idle.
You should be able to launch it by double clicking the jnlp file.

Hope this helps.

Re: Java Web Start no Longer Works in FireFox or Chrome

PostPosted: Tue Mar 28, 2017 1:16 am
by kwpsd
Greetings to you both!

You should be able to launch it by double clicking the jnlp file.


@Robert: I did not know this...thank you for the tip!

you can download (and start) any jnlp file fine!


@Harjo: Where do I find the jnlp file for our solution on a customer new install (first start-up...no pre-exisiting jnlp file)?

I found the jnlp file on my development computer in the following folder:

Code: Select all
C:\Users\username\AppData\Local\Microsoft\Windows\Temporary Internet Files\Content.IE5\UVCL1INX


Are you saying that I can copy this jnlp file to customer's computer and launch it? What about installation specific info in the jnlp such as url...do I manually edit the jnlp to fit the customer installation, or is there an easier way?

<jnlp spec="1.0+" codebase="http://localhost:8080/" href="servoy-client/servoy_client/ARM.jnlp">


Sorry for all the questions...I have not launched solutions other than entering their url in a browser or using the 'Select Solution' dialog (which we do not want to enable at the customer site). The jnlp method is new to me.

Re: Java Web Start no Longer Works in FireFox or Chrome

PostPosted: Tue Mar 28, 2017 4:54 pm
by Bernd.N
kwpsd wrote:Where do I find the jnlp file for our solution on a customer new install (first start-up...no pre-exisiting jnlp file)?

The way we do it is to give a new user this path to the JNLP-file by email, together with his login information (initials + first temporary password):
http://10.???.???.34:8080/servoy-client/bob.jnlp
bob is the name of our solution, and the IP address is the server where our solution is installed.

The user then copies that jnlp-filepath from the email and puts it into his browser and presses ENTER.
That will then download the jnlp file into the browser's download folder.

The user then doubleclicks that downloaded file.
That will automatically create a desktop icon, so that on the next day, the user can start the system from that icon.

Whenever there is something wrong with that icon, a deletion of the Java Cache will solve that problem and a new download of the jnlp as described above will again install the icon.

To my knowledge, the jnlp gets created by Servoy when you install your application server.
I described that process here:
https://forum.servoy.com/viewtopic.php?f=12&t=21619

Re: Java Web Start no Longer Works in FireFox or Chrome

PostPosted: Wed Mar 29, 2017 2:20 am
by kwpsd
Thank you for the additional information, Bernd.

We typically provide our customers with the fully qualified url as well, but that stopped working for them with the latest release of FireFox and Chrome. As Robert mentioned, even though the browser did not automatically launch the jnlp file, the jnlp file was, in fact, downloaded. And, double-clicking the jnlp file did launch the solution. Finding where the jnlp file is saved on the client computer was a bit of a challenge (it's not obvious). The customer decided to put the jnlp file in a shared network folder and will use that for all new installs instead of using the browser method.

Also, I think the only way to download the jnlp file is by the browser method or the Select Solution dialog.

Re: Java Web Start no Longer Works in FireFox or Chrome

PostPosted: Wed Mar 29, 2017 3:43 am
by sbutler
A couple of tips and tricks I've learned with Java Web Start (AKA "the devil") over the years.

1. Webstart sucks, so avoid as much as you can. Use Johan's alternative bootstrap downloader: https://forum.servoy.com/viewtopic.php?f=16&t=21190
It essentially use Java Webstart just to manage itself, and then it managed everything else. Its much faster and reliable. Less headache.

2. You don't have to go through the browser for Java Web Start. javaws is available via command line: http://docs.oracle.com/javase/7/docs/te ... avaws.html
So, you can automate the installs completely. Below are some scripts you are welcome to use. .bat for Windows, .sh for Mac
These are particularly helpful in the corporate environment with IT manages the machines and can automate the deployment of these scripts across their infrastructure.

3. Most powerful of all is to combine #1 and #2. Use the automated installer to install using Johan's alternative bootstrap downloader

Install the client (Windows .bat)
Adjust path to jnlp as necessary. Most of this .bat is just figuring out the users path to Java since somtimes java doesn't include itself in the Windows path environmental variable.
Code: Select all
@echo off
cls
setlocal ENABLEEXTENSIONS
set KEY_NAME="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment"
set VALUE_NAME=CurrentVersion
::
:: get the current version
::
FOR /F "usebackq skip=2 tokens=3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul`) DO (
    set ValueValue=%%A
)
if defined ValueValue (
    @echo the current Java runtime is  %ValueValue%
) else (
    @echo %KEY_NAME%\%VALUE_NAME% not found.
    goto end
)
set JAVA_CURRENT="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment\%ValueValue%"
set JAVA_HOME=JavaHome
::
:: get the javahome
::
FOR /F "usebackq skip=2 tokens=3*" %%A IN (`REG QUERY %JAVA_CURRENT% /v %JAVA_HOME% 2^>nul`) DO (
    set JAVA_PATH=%%A %%B
)
@echo Installing Servoy
"%JAVA_PATH%\bin\javaws" https://yourserver.com/bootstrap.jnlp
:end


Install the client (Mac .sh)
Adjust path to jnlp as necessary.
Code: Select all
#!/bin/sh

javaws https://yourserver.com/bootstrap.jnlp

Re: Java Web Start no Longer Works in FireFox or Chrome

PostPosted: Thu Mar 30, 2017 2:18 am
by kwpsd
Thanks, Scott, for the information on Web Start and Johan's bootstrap downloader. I recall seeing Johan's post when it first appeared but could not afford the time to experiment with it. I will have another look at it.