-
Notifications
You must be signed in to change notification settings - Fork 109
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
Passing application parameters #2
Comments
Hi Patrick, These are not jvm parameters, so you should simply pass them as Also, be aware that this feature was introduced in version Are you running the application from an IDE or from the command line? If you're running it from the IDE, maybe you could supply me with a screenshot of the run configuration? Also, from which method are you accessing the parameters? If you can't get it to work I would be very grateful if you can upload a sample that shows the problem and I'll investigate. |
Hey Edvin, The following is my pom description part for fx launcher
So when I get you right all I need to do is putting these parameters as arguments to the configuration of the "embed-manifest-in-launcher" execution like ...
? Thanks for the version hint and yes I'm using a 1.0.7 dependency |
Ah, I see. The manifest embedding does not support hard coded parameters. You can only use parameters when you actually execute the java -jar fxlauncher.jar --myOption=myValue You can however add the arguments to the native installer via the The point of parameters the way I see it, is that they should be user configurable. If you add them to the manifest, they would be hard coded, so you might as well have hard coded the result of the parameters directly in the application. There might be a use case I'm missing here, and I've found a way to support this if necessary. If you can explain the use case for this, I'll be happy to add support! |
I found a nice way to implement this, so I'll get right on it :) Parameters given in the manifest will be forwarded to the application unless they are overriden on the command line. You should add the arguments exactly as you did in the "embed-manifest-in-launcher" execution above. Hang on, will get right back to you. |
This would be very nice :) Thank you so much! |
My pleasure :) I just released version 1.0.8, it should hit Maven central within the hour. Let me know how it goes, OK? |
1.0.8 is in Maven Central now :) |
My configuration now looks like:
but I get en error while executing the install goal - something like any ideas? |
I think the XML tags got lost in your last post, can you try again? This should work: <configuration>
<mainClass>fxlauncher.CreateManifest</mainClass>
<arguments>
<argument>${app.url}</argument>
<argument>${app.mainClass}</argument>
<argument>${app.dir}</argument>
<argument>${app.parameters}</argument>
</arguments>
</configuration> Where <app.parameters>--mode=minimal</app.parameters> Can you make sure you have a similar structure? This should also work: (last parameter in the arguments list) <argument>--mode=${app.mode}</argument> |
Ah, you added the fourth argument to |
(I made the same mistake in the Gradle example) |
Guess that's it! Works fine! Thank you very much for this!! |
Perfect! Thanks for making FXLauncher even better :)) |
Hey there!
I've been trying to pass an application parameter into my application on several ways now but it kinda ends like I don't find the right way to do it.
I tried passing it via
jvmProperties=--myOption=myValue and
userJvmOptions=--myOption=myValue
also tried appending an paramfile via
-paramfile file
Would you be so kind to help me out here?
thanks so much for this project by the way!!
best regards
patrick
The text was updated successfully, but these errors were encountered: