edvin / fxlauncher

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

controlsfx not found for custom ui #154

Open roberthtux opened 5 years ago

roberthtux commented 5 years ago

Hi! I've trying to make a project with a custom ui launcher but not in separated project, so i've the project structure like: image All is ok, but when run java -jar fxlauncher.jar shows image Can you help me, how to do this? I've a project where i need load a spring context and load init files. Thanks.

edvin commented 5 years ago

It's not a good idea to have dependencies in the custom launcher ui. When you run java -jar fxlauncher.jar, the dependencies will not be on the classpath, hence the error message. You can of course choose to repackage fxlauncher.jar to include your depdendencies, or you could set up a classpath containing both fxlauncher.jar and the dependencies when you launch it from the command line (java -cp).

roberthtux commented 5 years ago

Thanks foy your answer. All dependendencies are included in fxlauncher, and the CustomLauncherUI too. That is correct? How can i run launcher.jar (with dependencies included) and a CustomerLauncherUi in the same launcer.jar? this is posible? Firstly, I tried to run fxlauncher where my project launches a preloader (medusa preloader) but when launcher ends, the preloader not is show, therefore I thought in CustomLauncherUI.

edvin commented 5 years ago

There are several build tools that can help you with embedding other classes inside a single jar, for example the fatjar maven plugin. Not sure I understand your other questions, sorry.