0

I have a strong feeling Ant is locking up my app, so I want to change the build file to start java through cmd.

I have this command:

<target name="run">
    <exec executable="cmd.exe" spawn="true" osfamily="windows">
        <arg line="/c java -cp &quot;build/&quot; com.mycom.prog.Monitor"/>
    </exec>
</target>

This starts it fine, however, the cmd window is not in foreground (I can only see it in Process Manager), when it needs to be. Any ideas what could be wrong?

4

1 回答 1

1

I don't know if this will be helpful but here's what I know...

if you start cmd and run cmd.exe in it, it won't show only in the Process Manager... but if u run it like this: start cmd.exe then another cmd window will pop up...

so you can try putting executable="start cmd.exe" or something like this in your code and see if it'll work...

于 2013-08-08T20:33:54.013 回答