-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Native launcher on OS X => jars downloaded into ${user.home}, not into bundle #8
Comments
I have tested on Windows ant FXLauncher download jars into executable folder, so it works perfect. The problem is on Mac OS X that JVM current folder returns ${user.home}. So you have to use my code to get the current folder into .app bundle to work in the same mode as Windows. |
Thanks for reporting this. I'm away this weekend, but I'll get to it on Monday :) |
I just did a quick test on my Mac: mkdir tmp && cd tmp
wget http://fxldemo.tornado.no/fxlauncher.jar
java -jar fxlauncher.jar The dependencies |
You have to test with the DMG (native installer) |
Java 8 update 20 The problem is with the JVM when it started from the native installer. |
Ah, I see. I wonder if it's possible to configure the working dir for the dmg installer via javapackager. That way we wouldn't have to handle this as a special case. Investigating now :) |
I think that it's not posible. You need get the current folder on execution (FXLauncher), not in compile/package phase. I'm working in another app that runs a Jetty server embebed and I had to get the war into de DMG, and the solution I found (I was around 4-5 hours testing a lot ways) is the code I wrote before. |
I downloaded (http://fxldemo.tornado.no/FxlDemo-2.0.dmg) and copied it to FxlDemo.cfg
fxlauncher.jar Then I started the app, waited for it to update and checked the folder again: FxlDemo.cfg
controlsfx.jar
fxlauncher.jar
fxldemo-2.0.jar
no.tornado.FxlDemo.xml Can you try with the same installer to see if your result is different? It might be a Java Version issue as well, you're version is quite dated. I'm running Just want to make sure I know what's causing this before I make any adjustments :) |
I didn't mean we'd hard code some path via javapackager, but I though maybe there would be an option to specify that the current working directory should be where the app is installed. That's how it works for me by default. |
Did you include the identifier argument to javapackager by the way?
Or something similar? |
I have tested FXDemo.dmg and it works as espected. So I think the Java version is the problem. I will test with latest version. My conf to javapackager is:
I will test with another Java version and tell you the results |
Thank you. I'm really curious to find out what's causing this :) |
I'm just discussing with another user on an email thread, and we're looking into adding a
Would cause the downloaded artifacts to be installed in the following places, depending on OS:
If no |
Solved! It was java version. With the same configuration, using jdk1.8.0_91 it works fine. I think we can close the issue and alert people than 8u20 on Mac OS X doen´t work as espected. |
OK! I might add the parameter anyway, it won't affect existing configurations, but might be helpful to some people, and as you point out, it could actually be used for sharing libs between apps :) Thanks for reporting this! |
Thank you for your lib and keep the good work! It's very helpful 👍 |
Thanks :) Be sure you check out TornadoFX if you want to try a super charged way of building JavaFX apps :)) |
I'm mac user and I'm testing you great FXLauncher. I see that FXLauncher downloads jar files into user.home variable and It would be great to set the target folder. In OS X it would be download into the .app folder in fact, because if you drop the icon app to trash, you don't uninstall all the app because all the jars it's outside. If you want to get the dir to save the jars on OS X the code is:
Thank you and keep the great job
The text was updated successfully, but these errors were encountered: