karakun / OpenWebStart

Run Web Start based applications after the release of Java 11
https://openwebstart.com
Other
417 stars 48 forks source link

OWS v3.0.0-alpha2 fail to find the user/username/Desktop directrory on non-english Ubuntu #510

Closed miniwark closed 2 years ago

miniwark commented 2 years ago

After installing OWS v3.0.0-alpha2 Debian package on Ubuntu 21, the launch of a .jnlp file fail with:

netx: Launch Error: Could not launch JNLP file. (Error while downloading jar! (java.lang.RuntimeException: Can not write message to file! (Can not write message to file! (/home/username/Desktop/itw-log.txt (Aucun fichier ou dossier de ce type)))))

Full trace:

net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. The application has not been initialized, for more information execute javaws/browser from the command line and send a bug report.
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:419)
    at net.sourceforge.jnlp.Launcher.launchApplicationInstance(Launcher.java:164)
    at net.sourceforge.jnlp.Launcher.lambda$launch$0(Launcher.java:140)
    at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: Error while downloading jar!
    at net.adoptopenjdk.icedteaweb.classloader.ClassLoaderUtils.waitForCompletion(ClassLoaderUtils.java:19)
    at net.adoptopenjdk.icedteaweb.classloader.PartsHandler.lambda$downloadAllOfPart$10(PartsHandler.java:172)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at net.adoptopenjdk.icedteaweb.classloader.PartsHandler.downloadAllOfPart(PartsHandler.java:173)
    at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
    at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1382)
    at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
    at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
    at net.adoptopenjdk.icedteaweb.classloader.PartsHandler.loadEagerParts(PartsHandler.java:87)
    at net.adoptopenjdk.icedteaweb.classloader.PartsHandler.loadEagerJars(PartsHandler.java:77)
    at net.adoptopenjdk.icedteaweb.classloader.JnlpApplicationClassLoader.initializeEagerJars(JnlpApplicationClassLoader.java:38)
    at net.sourceforge.jnlp.runtime.ApplicationInstance.initialize(ApplicationInstance.java:121)
    at net.sourceforge.jnlp.Launcher.launchApplication(Launcher.java:383)
    ... 6 more
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: Can not write message to file!
    at java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357)
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1895)
    at net.adoptopenjdk.icedteaweb.classloader.ClassLoaderUtils.waitForCompletion(ClassLoaderUtils.java:17)
    ... 27 more
Caused by: java.lang.RuntimeException: Can not write message to file!
    at net.adoptopenjdk.icedteaweb.classloader.PartsHandler.print(PartsHandler.java:278)
    at net.adoptopenjdk.icedteaweb.classloader.PartsHandler.getLocalUrlForJar(PartsHandler.java:188)
    at net.adoptopenjdk.icedteaweb.classloader.PartsHandler.lambda$downloadJar$11(PartsHandler.java:181)
    ... 4 more
Caused by: java.io.FileNotFoundException: /home/username/Desktop/itw-log.txt (Aucun fichier ou dossier de ce type)
    at java.io.FileOutputStream.open0(Native Method)
    at java.io.FileOutputStream.open(FileOutputStream.java:270)
    at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
    at net.adoptopenjdk.icedteaweb.classloader.PartsHandler.print(PartsHandler.java:275)
    ... 6 more

This is normal because the "Desktop" directory is internationalised on Ubuntu (and other distros ?), in my case the name is "Bureau".

Also why no use the /home/username/.config/icedtea-web/ for this sort of temporary/log files ?

sclassen commented 2 years ago

OWS v3.0.0-alpha2 is not ready for production. Also there is currently no further development on the 3.x branch. The logging to the itw-log.txt is only for debugging issues. It uses this non-standard logging because of some issues we had.

We therefore recommend you use version 1.5.2 of OWS