edvin / fxlauncher

Auto updating launcher for JavaFX Applications
Apache License 2.0
713 stars 110 forks source link

Exception when run fxlauncher with --app parameter only #188

Open MakeItEasy opened 4 years ago

MakeItEasy commented 4 years ago

Follow FXLauncher Demo on site http://fxldemo.tornado.no/, I download fxlauncher from http://fxldemo.tornado.no/fxlauncher.jar and run.

If I run with java -jar fxlauncher.jar, the demo run successful. but if run with java -jar fxlauncher.jar --app=http://fxldemo.tornado.no/app.xml, Exception occured like below:

image

The output is below:

PS C:\Users\dairugang\Downloads> java -jar fxlauncher.jar --app=http://fxldemo.tornado.no/app.xml
logging to C:\Users\DAIRUG~1\AppData\Local\Temp\\fxlauncher.log
四月 16, 2020 1:24:50 下午 fxlauncher.AbstractLauncher syncManifest
信息: Loading manifest from 'app' parameter supplied: http://fxldemo.tornado.no/app.xml
四月 16, 2020 1:24:50 下午 fxlauncher.Launcher lambda$start$0
警告: Error during Update Manifest phase
java.io.FileNotFoundException: C:\Users\dairugang\Downloads\http:\fxldemo.tornado.no\app.xml (文件名、目录名或卷标语法不正确。)
        at java.io.FileInputStream.open0(Native Method)
        at java.io.FileInputStream.open(FileInputStream.java:195)
        at java.io.FileInputStream.<init>(FileInputStream.java:138)
        at java.io.FileInputStream.<init>(FileInputStream.java:93)
        at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
        at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
        at fxlauncher.FXManifest.load(FXManifest.java:169)
        at fxlauncher.AbstractLauncher.syncManifest(AbstractLauncher.java:196)
        at fxlauncher.AbstractLauncher.updateManifest(AbstractLauncher.java:92)
        at fxlauncher.Launcher.lambda$start$0(Launcher.java:137)
        at java.lang.Thread.run(Thread.java:748)

四月 16, 2020 1:24:50 下午 fxlauncher.Launcher$1 reportError
警告: Error during Create Application phase
java.lang.IllegalArgumentException: Unable to retrieve embedded or remote manifest.
        at fxlauncher.AbstractLauncher.createApplicationEnvironment(AbstractLauncher.java:153)
        at fxlauncher.Launcher.lambda$start$0(Launcher.java:149)
        at java.lang.Thread.run(Thread.java:748)

From the source code here, maybe the File class can't resolve the http schema. It resolve it to the local path C:\Users\dairugang\Downloads\http:\fxldemo.tornado.no\app.xml.

By the way, if run with --app and --uri both, it run successful.

image