macOS xdg-desktop-icon
Laurent Bourgès
bourges.laurent at gmail.com
Fri Oct 26 17:08:57 UTC 2018
Probably use / not \ for java args like:
Xbootclasspath/a:C:\Users\Jim\Documents\itw\share\icedtea-web\netx.jar
Java uses unix convention, not windows one !
Le ven. 26 oct. 2018 à 18:35, Jim Douglas <jimdouglas at mac.com> a écrit :
> What am I missing, Laurent?
>
> C:\Users\Jim\Documents\itw\bin>itw11.bat
> http://10.0.1.5:8888/basis/admin.jnlp
>
> C:\Users\Jim\Documents\itw\bin>set HOME=C:\Users\Jim
>
> C:\Users\Jim\Documents\itw\bin>set ITW=C:\Users\Jim\Documents\itw
>
> C:\Users\Jim\Documents\itw\bin>set
> JAVA_HOME=C:\Users\Jim\Documents\jdk-11.0.1
>
> C:\Users\Jim\Documents\itw\bin>C:\Users\Jim\Documents\jdk-11.0.1\bin\java
> -splash:C:\Users\Jim\Documents\itw\share\icedtea-web\javaws_splash.png
> -Xbootclasspath/a:C:\Users\Jim\Documents\itw\share\icedtea-web\netx.jar
> -Xms8m --patch-module
> java.desktop=C:\Users\Jim\Documents\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=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
> --add-opens=java.desktop/sun.awt.windows=ALL-UNNAMED
> --add-opens=java.desktop/sun.java2d.d3d=ALL-UNNAMED
> --add-opens=java.desktop/sun.lwawt.macosx=ALL-UNNAMED --add-exports
> java.base/jdk.internal.loader=ALL-UNNAMED --add-opens
> java.base/jdk.internal.loader=ALL-UNNAMED -Dicedtea-web.bin.name=javaws
> -Djava.io.tmpdir=C:\Users\Jim\Documents\itw\bin\temp\
> -Dcom.basis.util.common.security.BBjClassLoader.DEBUG=false
> net.sourceforge.jnlp.runtime.Boot -Xnofork -jnlp
> http://10.0.1.5:8888/basis/admin.jnlp
> WARNING: package sun.awt.X11 not in java.desktop
> WARNING: package sun.lwawt.macosx not in java.desktop
> Exception in thread "main" java.lang.NoClassDefFoundError: Could not
> initialize class
> net.sourceforge.jnlp.runtime.JNLPRuntime$DeploymentConfigurationHolder
> at
> java.desktop/net.sourceforge.jnlp.runtime.JNLPRuntime$DeploymentConfigurationHolder.access$000(JNLPRuntime.java:450)
> at
> java.desktop/net.sourceforge.jnlp.runtime.JNLPRuntime.getConfiguration(JNLPRuntime.java:487)
> at
> java.desktop/net.sourceforge.jnlp.util.logging.JavaConsole.canShowOnStartup(JavaConsole.java:182)
> at
> java.desktop/net.sourceforge.jnlp.runtime.JNLPRuntime.initialize(JNLPRuntime.java:226)
> at
> java.desktop/net.sourceforge.jnlp.runtime.Boot.init(Boot.java:343)
> at
> java.desktop/net.sourceforge.jnlp.runtime.JnlpBoot.run(JnlpBoot.java:58)
> at
> java.desktop/net.sourceforge.jnlp.runtime.Boot.run(Boot.java:264)
> at java.desktop/net.sourceforge.jnlp.runtime.Boot.run(Boot.java:63)
> at java.base/java.security.AccessController.doPrivileged(Native
> Method)
> at
> java.desktop/net.sourceforge.jnlp.runtime.Boot.main(Boot.java:204)
> Exception in thread "Thread-0" java.lang.NoClassDefFoundError: Could not
> initialize class
> net.sourceforge.jnlp.runtime.JNLPRuntime$DeploymentConfigurationHolder
> at
> java.desktop/net.sourceforge.jnlp.runtime.JNLPRuntime$DeploymentConfigurationHolder.access$000(JNLPRuntime.java:450)
> at
> java.desktop/net.sourceforge.jnlp.runtime.JNLPRuntime.getConfiguration(JNLPRuntime.java:487)
> at
> java.desktop/net.sourceforge.jnlp.util.logging.LogConfig.<init>(LogConfig.java:61)
> at
> java.desktop/net.sourceforge.jnlp.util.logging.LogConfig.<init>(LogConfig.java:48)
> at
> java.desktop/net.sourceforge.jnlp.util.logging.LogConfig$LogConfigHolder.<clinit>(LogConfig.java:91)
> at
> java.desktop/net.sourceforge.jnlp.util.logging.LogConfig.getLogConfig(LogConfig.java:95)
> at
> java.desktop/net.sourceforge.jnlp.util.logging.OutputController.consume(OutputController.java:153)
> at
> java.desktop/net.sourceforge.jnlp.util.logging.OutputController.flush(OutputController.java:138)
> at
> java.desktop/net.sourceforge.jnlp.util.logging.OutputController$1.run(OutputController.java:243)
> at java.base/java.lang.Thread.run(Thread.java:834)
>
> C:\Users\Jim\Documents\itw\bin>
>
>
>
> /**
> * see <a href="
> https://en.wikipedia.org/wiki/Double-checked_locking#Usage_in_Java">Double-checked
> locking in Java</a>
> * for cases how not to do lazy initialization
> * and <a href="
> https://en.wikipedia.org/wiki/Initialization_on_demand_holder_idiom">Initialization
> on demand holder idiom</a>
> * for ITW approach
> */
> *private* *static* *class* DeploymentConfigurationHolder {
>
> *private* *static* *final* DeploymentConfiguration INSTANCE =
> initConfiguration();
>
> *private* *static* DeploymentConfiguration initConfiguration() {
> DeploymentConfiguration config = *new*
> DeploymentConfiguration();
> *try* {
> config.load();
> config.copyTo(System.getProperties());
> } *catch* (ConfigurationException ex) {
>
> OutputController.getLogger().log(OutputController.Level.MESSAGE_ALL, R(
> "RConfigurationError"));
> *//mark this exceptionas we can die on it later*
> config.setLoadingException(ex);
> *//to be sure - we MUST die - *
> http://docs.oracle.com/javase/6/docs/technotes/guides/deployment/deployment-guide/properties.html
> }*catch*(Exception t){
> *//all exceptions are causing InstantiatizationError so
> this do it much more readble*
>
> OutputController.getLogger().log(OutputController.Level.ERROR_ALL, t);
>
> OutputController.getLogger().log(OutputController.Level.WARNING_ALL, R(
> "RFailingToDefault"));
> *if* (!JNLPRuntime.isHeadless()){
> JOptionPane.showMessageDialog(*null*, R(
> "RFailingToDefault")+"\n"+t.toString());
> }
> *//try to survive this unlikely exception*
> config.resetToDefaults();
> } *finally* {
> OutputController.getLogger().startConsumer();
> }
> *return* config;
> }
> }
>
> /**
> * Gets the Configuration associated with this runtime
> *
> * *@return* a {*@link* DeploymentConfiguration} object that can be
> queried to
> * find relevant configuration settings
> */
> *public* *static* DeploymentConfiguration getConfiguration() {
> *return* DeploymentConfigurationHolder.INSTANCE;
> }
>
>
> On Oct 26, 2018, at 1:02 AM, Laurent Bourgès <bourges.laurent at gmail.com>
> wrote:
>
> Hi Jim,
> I published an updated IcedTeaWeb 1.7 release:
> http://jmmc.fr/~bourgesl/share/itw/
>
> ONLY FOR DEV / TESTS, NOT FOR PRODUCTION USE.
>
> This build have customized linux shell launchers (+ windows bat): it is
> still a work in progress.
>
> Le jeu. 25 oct. 2018 à 10:43, Laurent Bourgès <bourges.laurent at gmail.com>
> a écrit :
>
>> Hi Jim,
>>
>> With Oracle inexplicably ditching javaws in Java 11, and ending public
>>> updates of Java 8 in January, end users are desperately looking for a
>>> replacement…and IcedTea-Web is really the only viable option. In my testing
>>> here, it basically works; it reliably launches our customers’ existing
>>> JNLPs, giving them a path forward. But now that we’ve established that it
>>> basically works, our customer testers are focused on fine-grained
>>> deployment details, and they care a lot about those desktop icons.
>>>
>>
>> Thanks for your feedback
>>
>>
>>> I spent days trying to build
>>> <https://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web> IcedTea-Web
>>> in macOS, but I had to eventually give up; I couldn’t get past the errors.
>>> I’ve been doing Windows & Mac testing with a build that Laurent Bourgès
>>> kindly provided
>>> <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2018-September/040118.html> to
>>> me.
>>>
>>
>> I can publish nightly itw builds either on my own server or on a github
>> mirror.
>>
>
> Here it is.
>
>
>> Since I have no ability to edit and build IcedTea-Web, I had to take a
>>> different approach; I put together the attached Mac-specific dropin
>>> replacement for the xdg-desktop-icon script, which works reasonably well in
>>> my testing here; it parses the .desktop file and generates a minimal macOS
>>> AppBundle corresponding to the JNLP parameters. I hope someone will find it
>>> useful, or even use it as the basis for integrating macOS desktop
>>> integration directly into IcedTea-Web.
>>>
>>
>> Excellent, I will try your script when I will have some spare time...
>>
>>
>>> Now I’m back to the Windows 10 system, which is also not creating the
>>> desktop icon. First, I always get this flood of permissions errors
>>> launching any JNLP; I have no idea what this is trying to tell me:
>>>
>>> Removing execute permissions on file
>>> C:\Users\Jim\.cache\icedtea-web\cache\4369\http\10.0.1.5\8888\basis\10.0.1.5-launchdock-launch.jar.info.temp
>>> failed
>>>
>>
>> I would like you trying latest 1.7 release, to see if that problem is
>> already fixed.
>>
>
> Could you try soon ?
>
> Cheers,
> Laurent
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20181026/5b6aa4fb/attachment-0001.html>
More information about the distro-pkg-dev
mailing list