Run a .java file using ProcessBuilder

后端 未结 1 1499
滥情空心
滥情空心 2021-01-13 11:53

I\'m a novice programmer working in Eclipse on Windows XP, and I need to get multiple processes running (this is going to be a simulation of a multi-computer system). My in

相关标签:
1条回答
  • 2021-01-13 11:55

    You are calling the java compiler on the .java file, this will not run the class. What you probably want to do is running java.exe on your .class file. (ie something like "java.exe -cp ./bin Broker.test", assuming your class files are in ./bin)

    0 讨论(0)
提交回复
热议问题