Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我已经将一个单独的代码打包到一个新的 jar 中。我希望它在新的 jre 中运行(具有自己的堆内存),这段代码可以为我工作吗?还是有什么最佳做法?
Process p = Runtime.getRuntime().exec("java -classpath . com.company.Runner");