icedtea-web compatible with OpenJDK11
Jiri Vanek
jvanek at redhat.com
Mon Sep 10 11:45:06 UTC 2018
On 9/8/18 9:20 PM, Jim Douglas wrote:
> Thanks for sharing that, Laurent. This is what I ended up testing on my Mac, with your archive
> installed in $HOME/Documents/icedteaweb-1.7-patched and http://jdk.java.net/11/ installed in
> $HOME/Documents.
>
> scrappy:Documents jimdouglas$ pwd
> /Users/jimdouglas/Documents
> scrappy:Documents jimdouglas$ cat itw
> export ITW=$HOME/Documents/icedtea-web-1.7-patched
> export JAVA_HOME=$HOME/Documents/jdk-11.jdk/Contents/Home
> $JAVA_HOME/bin/java -splash:$ITW/share/icedtea-web/javaws_splash.png
> -Xbootclasspath/a:$ITW/share/icedtea-web/netx.jar -Xms8m --patch-module
> java.desktop=$ITW/share/icedtea-web/netx.jar
> --add-exports=java.desktop/net.sourceforge.jnlp=ALL-UNNAMED
> --add-opens=java.desktop/net.sourceforge.jnlp.runtime=ALL-UNNAMED
> --add-exports=java.desktop/net.sourceforge.jnlp.runtime=ALL-UNNAMED
> --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net
> <http://java.net>=ALL-UNNAMED --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED
> --illegal-access=warn --add-reads java.base=ALL-UNNAMED,java.desktop --add-reads
> java.desktop=ALL-UNNAMED,java.naming --add-reads java.naming=ALL-UNNAMED,java.desktop --add-exports
> java.desktop/sun.awt=ALL-UNNAMED,java.desktop --add-exports
> java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop --add-exports
> java.base/sun.security.provider=ALL-UNNAMED,java.desktop --add-exports
> java.base/sun.security.util=ALL-UNNAMED,java.desktop --add-exports
> java.base/sun.security.x509=ALL-UNNAMED,java.desktop --add-exports
> java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop --add-exports
> java.base/sun.security.validator=ALL-UNNAMED,java.desktop --add-exports
> java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop --add-exports
> java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop --add-exports
> java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop --add-exports
> java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop --add-exports
> java.desktop/sun.applet=ALL-UNNAMED,java.desktop --add-exports
> java.base/sun.security.action=ALL-UNNAMED,java.desktop --add-exports
> java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop --add-exports
> java.desktop/sun.applet=ALL-UNNAMED,jdk.jsobject -Dicedtea-web.bin.name=javaws
> net.sourceforge.jnlp.runtime.Boot -Xnofork -jnlp $@
>
> scrappy:Documents jimdouglas$ ./itw http://localhost:8888/jnlp/hello.jnlp
If you wish, please submit patch for .bat lunchers. Please bear inmind, that future rust lunchers
wil be based on .sh versions (with many extension) so .sh files should be ahead.
>
>
> That takes me about as far as I was previously getting with OpenJDK 11 on macOS; it launches my app,
> then fails in my application with security errors or native library issues that I don’t yet
> understand; I’ll keep poking at it.
>
>> On Sep 8, 2018, at 1:20 AM, Laurent Bourgès <bourges.laurent at gmail.com
>> <mailto:bourges.laurent at gmail.com>> wrote:
>>
>> Jim,
>>
>> Thank you for sharing your feedback on windows, here is my experience:
>>
>> I built itw 1.7 without plugin with openjdk8 & tested my apps on linux with openjdk11-ea.
>> Note: I hacked Makefile to generate both linux & win launcher scripts and install it in
>> itw/install folder, not in usual linux paths.
>>
>> FYI my apps are compatible with java 7. I never tested an application needing java 9+ or specific
>> jdk11 feature or jigsaw args.
>> ( it would be great to test an OpenJFX11 app... needing jfx11 modules.)
>>
>> I modified javaws.sh to enable JIGSAW and print out the complete java command line, as the bash
>> script is jigsaw aware, not the windows batch.
>>
>> Then I moved to windows with my own itw package as a zip file (netx.jar + shell script), available
>> at:
>> http://jmmc.fr/~bourgesl/itw/
>>
>> It is very minimal but worked on linux/win & mac !
>>
>> On windows, I just fixed the java command line (got on linux).
>>
>> It is simplified as it only works with -Xnofork (can not restart ITW itself for now).
>>
>> SET ITW=C:\Users\bourgesl\Desktop\icedtea\install\install # icedtea-web PATH (netx, splashscreen)
>> SET JAVA_HOME=C:\Users\bourgesl\Desktop\icedtea\jdk-11 # openjdk11 PATH
>>
>> %JAVA_HOME%\bin\java -splash:%ITW%\share\icedtea-web\javaws_splash.png
>> -Xbootclasspath/a:%ITW%\share\icedtea-web\netx.jar -Xms8m --patch-module
>> java.desktop=%ITW%\share\icedtea-web\netx.jar --add-reads java.base=ALL-UNNAMED,java.desktop
>> --add-reads java.desktop=ALL-UNNAMED,java.naming --add-reads java.naming=ALL-UNNAMED,java.desktop
>> --add-exports java.desktop/sun.awt=ALL-UNNAMED,java.desktop --add-exports
>> java.desktop/javax.jnlp=ALL-UNNAMED,java.desktop --add-exports
>> java.base/sun.security.provider=ALL-UNNAMED,java.desktop --add-exports
>> java.base/sun.security.util=ALL-UNNAMED,java.desktop --add-exports
>> java.base/sun.security.x509=ALL-UNNAMED,java.desktop --add-exports
>> java.base/jdk.internal.util.jar=ALL-UNNAMED,java.desktop --add-exports
>> java.base/sun.security.validator=ALL-UNNAMED,java.desktop --add-exports
>> java.base/com.sun.net.ssl.internal.ssl=ALL-UNNAMED,java.desktop --add-exports
>> java.base/sun.net.www.protocol.jar=ALL-UNNAMED,java.desktop --add-exports
>> java.desktop/sun.awt.X11=ALL-UNNAMED,java.desktop --add-exports
>> java.naming/com.sun.jndi.toolkit.url=ALL-UNNAMED,java.desktop --add-exports
>> java.desktop/sun.applet=ALL-UNNAMED,java.desktop --add-exports
>> java.base/sun.security.action=ALL-UNNAMED,java.desktop --add-exports
>> java.base/sun.net.www.protocol.http=ALL-UNNAMED,java.desktop --add-exports
>> java.desktop/sun.applet=ALL-UNNAMED,jdk.jsobject -Dicedtea-web.bin.name
>> <http://dicedtea-web.bin.name/>=javaws net.sourceforge.jnlp.runtime.Boot -Xnofork -jnlp
>> http://....jnlp
>>
>> So you have all jigsaw args for ITW, as specified by the official linux shell.
>>
>> My javaws.bat hacks were minimal; I hard-coded JAVA_HOME to point to JDK 11, and added the
>> jigsaw args that appeared to be required based on the reported error messages (some of which
>> might be specific to my use case):
>>
>> set JAVA_HOME=C:\Program Files\Java\jdk-11
>>
>> "%JAVA%" --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.net
>> <http://java.net/>=ALL-UNNAMED --add-exports=java.base/jdk.internal.util.jar=ALL-UNNAMED
>> --illegal-access=warn "-splash:%SPLASH_LOCATION%" "%LAUNCHER_BOOTCLASSPATH%" %LAUNCHER_FLAGS%
>> %JAVAWS_J_OPTIONS% "-classpath" "%CP%" "-Dicedtea-web.bin.name
>> <http://dicedtea-web.bin.name/>=%PROGRAM_NAME%" "-Dicedtea-web.bin.location=%BINARY_LOCATION%"
>> "%CLASSNAME%" %ITW_WIN_SPECIALS% -verbose %*
>>
>> That was enough to successfully test both signed and unsigned jnlp files with javaws.bat. It
>> didn’t eliminate all of the reported error and warning messages, but it did eliminate fatal
>> errors.
>>
>>
>> Could you give an example for unsigned jnlp app ?
>>
>>
>> I’m still trying to understand this:
>>
>> net.sourceforge.jnlp.LaunchException: Fatal: Initialization Error: Unknown Main-Class. Could not determine the main class for this application.
>> at net.sourceforge.jnlp.runtime.JNLPClassLoader.initializeResources(JNLPClassLoader.java:704)
>>
>>
>> ??
>>
>>
>> And dozens of “failed” messages like this:
>>
>> Removing execute permissions on file C:\Users\Jim\.cache\icedtea-web\cache\673\http\10.0.1.5\8888\basis\JnlpExtIndex.jar.pack.gz.pack.gz.info.temp failed
>>
>> Removing read permission on file C:\Users\Jim\.cache\icedtea-web\cache\673\http\10.0.1.5\8888\basis\JnlpExtIndex.jar.pack.gz.pack.gz.info.temp failed
>>
>>
>> ITW cache seems not working well on windows yet !
>> Some recent patches are in progress...
>>
>>
>> But I can ignore all of that; it doesn’t stop anything from loading.
>>
>> The Mac client is where I’m really stuck; it only seems to be available if you can build it
>> from sources, and that process has been a complete failure for me.
>>
>>
>> ITW does not have any mac native client or installer yet. However mac is unix so ITW bash scripts
>> works out of the box.
>> Just use my itw.zip and run itw/bin/javaws11.sh : That's all folks !
>>
>> So I was very excited to see this passing comment:
>>
>> “Hmmm... So rust launchers, when compiled on generic linux, and provided with JAVA_HOME should
>> work for your mac friends?
>> I would liek to understand this a bit more, to not kill the mac usecase."
>>
>>
>> I have no idea what does it mean.
>> Jiri, could you explain how to build rust launchers ? Is it scripting or does it make native
>> executable commands ? I could try building on mac if needed.
>>
>> PS: For me, fixing sh/bat launchers for jdk11 is my goal as it is enough for win/mac/linux platforms.
>>
>> Cheers,
>> Laurent
>
--
Jiri Vanek
Senior QE engineer, OpenJDK QE lead, Mgr.
Red Hat Czech
jvanek at redhat.com M: +420775390109
More information about the distro-pkg-dev
mailing list