update4j / demo

Update4j demo application
2 stars 6 forks source link

Little help with demo #1

Open othenos opened 4 years ago

othenos commented 4 years ago

First, it's really a great thing for you to share update4j with everyone. I have been using fxlauncher for quite some time with great results. However, I have a need to move beyond Java 8 and fxlauncher does not seem to be moving in that direction. Your package looks to be a perfect replacement but I am having trouble grasping all of the details.

I have the demo installed and compiled but am stuck on the simple task of actually running it. If I try to java -jar bootstrap-1.0.0.jar there is no main mainfest attribute. So that is not the way to go. I am sure this is simple but I am at a loss. If you could give me a pointer or two, I could write up a simple set of instructions for newbies like me.

[INFO] Reactor Summary for Update4j Demo 1.0.0: [INFO] [INFO] Update4j Demo ...................................... SUCCESS [ 0.254 s] [INFO] Update4j Demo Bootstrap ............................ SUCCESS [ 2.088 s] [INFO] Update4j Demo Business ............................. SUCCESS [ 0.448 s] [INFO] Update4j Demo Create Configuration ................. SUCCESS [ 5.553 s] [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 8.439 s [INFO] Finished at: 2020-07-21T15:07:17-07:00 [INFO] ------------------------------------------------------------------------ mrobinson@development demo-master % java -jar target/config/bootstrap/bootstrap-1.0.0.jar no main manifest attribute, in target/config/bootstrap/bootstrap-1.0.0.jar mrobinson@development demo-master %

mordechaim commented 4 years ago

Thanks for reaching out. Are you trying to run it locally?

othenos commented 4 years ago

Yes I am.

On Tue, Jul 21, 2020 at 3:25 PM Mordechai Meisels notifications@github.com wrote:

Thanks for reaching out. Are you trying to run it locally?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/update4j/demo/issues/1#issuecomment-662138048, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPCHLGFVEDUHLBQ7V2OAVLR4YIVVANCNFSM4PEDG7YQ .

-- Sent from Gmail Mobile

mordechaim commented 4 years ago

The main class is JavaFxDelegate but since it's not a shaded jar it still requires linking update4j and javafx.

java -cp "update4j-1.4.5.jar:bootstrap/*" org.update4j.demo.bootstrap.JavaFxDelegate
mordechaim commented 4 years ago

You wouldn't usually shade your jar anyway since that defeats the incremental updates. Update4j can easily link all your required jars at launch time. So you can really do the whole startup by passing the setup config file as shown in the demo wiki page (using a local path instead of the remote)

This is probably too complicated at first, feel free to follow up.

othenos commented 4 years ago

Thanks for such a quick response. I’m away from my computer for an hour or so but will check it out as soon as I return.

On Tue, Jul 21, 2020 at 3:35 PM Mordechai Meisels notifications@github.com wrote:

The main class is JavaFxDelegate https://github.com/update4j/demo/blob/master/bootstrap/src/main/java/org/update4j/demo/bootstrap/JavaFxDelegate.java but since it's not a shadowed jar it still requires linking update4j and javafx.

Given that the linkage is usually done by update4j this isn't really a problem when launched via update4j's main class:

java -cp "update4j-.jar:bootstrap/*" org.update4j.Bootstrap

as explained in the demo wiki page https://github.com/update4j/update4j/wiki/Demo-Application

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/update4j/demo/issues/1#issuecomment-662141504, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPCHLAGEEVRR73IJFD47OTR4YJ27ANCNFSM4PEDG7YQ .

-- Sent from Gmail Mobile

othenos commented 4 years ago

mrobinson@development demo-master % java -cp "update4j-1.4.5.jar:bootstrap/*" org.update4j.demo.bootstrap.JavaFxDelegate Error: Could not find or load main class org.update4j.demo.bootstrap.JavaFxDelegate Caused by: java.lang.ClassNotFoundException: org.update4j.demo.bootstrap.JavaFxDelegate This command was run in the root of the project.

Is this command assuming there is a bootstrap jar file present in the bootstrap module? In this project the bootstrap jar is locate in the main app target/config/bootstrap folder.

In the bootstrap module target folder there does exist the JavaFxDelegate class. But that does not seem to satisfy the command.

The command referred to in the Demo Application page (maybe you mean the remote demo app instead of downloading and building it locally)

java -cp "update4j-<version>.jar:bootstrap/*" org.update4j.Bootstrap

is referring to org.update4j.Bootstrap. Where is that found? In the Update4j jar file? It's not clear how that applies to the demo app.

mordechaim commented 4 years ago

Haven't looked at the demo app for quite a while, will get back to you tomorrow

othenos commented 4 years ago

Thanks a lot

On Tue, Jul 21, 2020 at 6:51 PM Mordechai Meisels notifications@github.com wrote:

Haven't looked at the demo app for quite a while, will get back to you tomorrow

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/update4j/demo/issues/1#issuecomment-662195454, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPCHLFDZQ7I4UN3U44NUMTR4ZA3LANCNFSM4PEDG7YQ .

-- Sent from Gmail Mobile

mordechaim commented 4 years ago

Ok, here's the thing, I didn't write the demo to be able to run from the build artifacts. The output config directory was instead designed to be the final file structure that can be uploaded and pulled with the outputted setup.xml.

You can tweak around the Maven output to copy dependencies (update4j and JavaFX) in a single directory, but I don't have the time now to guide you on this.

othenos commented 4 years ago

No problem, I understand how that goes. I'll continue reading and playing around with it. Eventually, I'll get it to work as I am committed to moving beyond Java 8. Thanks again for making it available.

Best wishes, Mike

Othenos Consulting, LLC

skype: mike_robinson zoom: https://zoom.us/j/9627533696?pwd=SDRCVHFKeDUrd3p2MllSc25nNkZxdz09

On Thu, Jul 23, 2020 at 7:59 AM Mordechai Meisels notifications@github.com wrote:

Ok, here's the thing, I didn't write the demo to be able to run from the build artifacts. The output config directory was instead designed to be the final file structure that can be uploaded and pulled with the outputted setup.xml.

You can tweak around the Maven output to copy dependencies (update4j and JavaFX) in a single directory, but I don't have the time now to guide you on this.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/update4j/demo/issues/1#issuecomment-663056400, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAPCHLBVWS3KH7U5EUU3U33R5BF4DANCNFSM4PEDG7YQ .