Open UsAndRufus opened 6 years ago
Hi @UsAndRufus, thanks for the report! I've been off shoes for a bit with some eye problems, but hoping to get back in and this sounds like a big problem for Windows packaging!
Could you provide a few more details. Specifically I'd love to know:
.bat
file by clicking in Explorer? Or from a command-line like cmd.exe or Powershell?Appreciate the extra details, and hoping to look at this very soon.
Hi @jasonrclark, no worries, hope you're feeling better :smiley:. Running Windows 10, and neither worked (command line or double click). I ended up just using a .jar
instead.
Hi, i encountered this problem a while ago and there is a simple solution. The problem is in this line in the generated bat file: set PATH=%USERPROFILE%.shoes\jdk\bin;%PATH% When you delete ";%PATH%" part, it starts working. But this probably may affect the behavior of the program, at least one may not access installed programs without the full path when execute shell commands within shoes.
When I ran into this issue (also on Windows 10 and also clicking the .bat file in explorer), my solution was just to bypass the whole problem and use one of these tools that package a .jar as a .exe file. For what it's worth, I used Launch4j.
That's a cool idea @ericmathison, and a reasonable way workaround for folks fully on Windows. Might be worth writing down somewhere 🤔
The main reason we don't do this already from Shoes itself is cross-OS support--we're aiming that someone on any platform can build a package targeting another OS, and unfortunately everything I found like Launch4j would only run on Windows.
(Oh, and I'm still working toward getting back to non-work computer time regularly, and this is top of my list to investigate once I get there!)
Sure, I'll aim for writing up a wiki page.
Yes, Launch4j only targets Windows even though packages can be created from any Win/Mac/Linux machine (I created my .exe package on Linux). I'll keep my eyes out for something that supports more target platforms.
Oh cool, hadn't noticed that Launch4j can run on all the platforms (though only packages for Windows). Neat! Looks like it has a CLI mode... wonder if we could make some sort of integration to it, even if we don't necessarily want to ship it alongside? 💡
When I try and run the
.bat
script in the package Windows directory, it flashes up then disappears shortly after and the app doesn't run. This is on my machine with Shoes and a JDK already installed. If I double click on thejar
to run it or write my own.bat
script with just the run command in it it works fine. Seems like the checking if Java exists is broken.