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=21190It 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.htmlSo, 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