开发者

Invoke Java via Batch File with Filepath Arguments

开发者 https://www.devze.com 2022-12-25 00:52 出处:网络
I\'m having an issue getting files loaded into an app called GCS, by dragging them onto the executable. GCS can be invoked on Windows with a bat file, which goes like this:

I'm having an issue getting files loaded into an app called GCS, by dragging them onto the executable. GCS can be invoked on Windows with a bat file, which goes like this:

@echo off
start javaw -Xmx256M -jar "GURPS Character Sheet.app/Contents/Resources/Java/GCS.jar" %*

If I hard code a filep开发者_如何学Cath in place of the batch argument wildcard (with quotes), it works. If I run the debugger with a filepath argument it works. If I echo %, it gives me the correct filename with quotes around it. If I add quotes around % it still breaks.

I have a disconnect here between the batch file and Java, and I'm at a loss. Does anyone recognize this problem? Thanks in advance.


I used a shortcut to the batch file to get drag and drop on invocation to work. But now I can't open with a double click outside of the bat's directory. :(

0

精彩评论

暂无评论...
验证码 换一张
取 消