Attach process to a CommandLine instance
I'm trying to launch an application on the comman开发者_Go百科dline so I can see what it prints out for the standard output, but every time I launch it, it launches the GUI and the commandline acts has the process has ended.
I've even tried launching it from a C# code and use the method WaitForExit() but it just doesn't wait.
I know it is possible to do because my friend is able to do it and we're using the same bat to launch the application.
EDIT: I Launch it like this:
java -DproxySet=true -jar Minecraft.exe
Any tips would be appreciated, thanks
It's possible that one of you has java
defaulting to -server
and one to -client
and that that distinction causes process detachment. I can't seem to find the documentation to support that theory, but this faq indicates that the default could be different across Windows boxes.
So, try adding -server
and then try replacing -server
with -client
and see if that works.
Also, do a java -version
on both your and your friends computers. This difference could account for it as well.
精彩评论