James Ritchie wrote:Hi Carey,
Brilliant idea, I might use that in the meantime. Would the next step be to maybe make a custom installer that can save the .jar and .bat locally and create a shortcut to the batch file on their desktop for example?
Matthew Bendford wrote:What actually happens: Your jar is run by javaw.exe which is intended for GUI type applications and does NOT open a command prompt.
Matthew Bendford wrote:@Carey
Better option would be inside user.home instead of root of system partition.
Matthew Bendford wrote:@Carey True, but
Matthew Bendford wrote:@Paul
I agree with you it's possible to change, I would do it in registry as at least this way hasn't changed (yet). But to me it's the kind of "solution" to tinker with symptoms instead of "curing" the cause, which seems to me as a misunderstanding of CLI vs GUI.
Tim Holloway wrote:Java does have its own preferences system ...
Tim Holloway wrote:I thought the current form was more like C:\users\%USERNAME%\data\appname\
But I not only don't run Windows, I don't have a Windows machine accessible to me, so I can't confirm.
What are you talking about? You're mixing Java settings with program settings. Two different things. Program settings can be handled any way that the program would like to implement them, XML or otherwise.
Tim Holloway wrote:But enough of the Windows Registry in general - it's an especially bad place to store settings for Java applications...
Paul Clapham wrote:The question here is about the Windows setting which says "Which application should I run when you double-click in File Explorer on a file with extension .JAR?" Presumably that is stored in the registry somewhere but it's not necessary to edit the registry directly to modify it. To me it looks fairly straightforward to modify it from inside File Explorer.
Tim Holloway wrote:Setting up a JAR file to run directly isn't usually that useful, however, since unless you're only going to make GUI java apps with no command line options, the program will want stdin/stdout/stderr and there's no place to put options on the command line on a per-icon basis (some other GUI OS's don't have that limitation). For such beasts, it's actually better to run the JAR as a command script and have the desktop launch the script, instead.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton