Invoke Java via Batch File with Filepath Arguments

Posted by EricIdyll on Stack Overflow See other posts from Stack Overflow or by EricIdyll
Published on 2010-03-27T06:11:25Z Indexed on 2010/03/27 6:13 UTC
Read the original article Hit count: 302

Hi there, 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 filepath 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 DOS and Java, and I'm at a loss. Does anyone recognize this problem? Thanks in advance.

© Stack Overflow or respective owner

Related posts about java

Related posts about batch-file