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.
如果找到值,我想在现有项目中添加一个功能,然后使用
System.setProperty("javaplugin.vm.options","-Xmx512m");
实际上,我通过变量 a 获得价值 -Xmx512m。那么如何写这个语句
System.setProperty("javaplugin.vm.options",""Xmx"");
我试图在谷歌上搜索它,但没有找到它......请任何人建议......提前致谢
你应该试试
System.setProperty("javaplugin.vm.options","\"-Xmx512m\"");
使用\,您可以转义字符串中的双引号,使它们显示为双引号。
\