jn1kk
jn1kk

Reputation: 5102

Ant Start Java With CMD in foreground

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?

Upvotes: 0

Views: 494

Answers (1)

Arctigor
Arctigor

Reputation: 247

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...

Upvotes: 1

Related Questions