Possible to move the tmp directory of Eclipse?

别等时光非礼了梦想. 提交于 2019-12-21 12:37:11

问题


I'm trying to speed up Eclipse by having my projects on a RAM disk (stuck with a slow laptop and a heavy kind of eclipse project at the moment). Worked great for loading the project and such, but when I'm building it seems to read and write a lot to a directory in %APPDATA% (seems to have a generated name from the name of the project). This makes it actually go slower than usual...

So... is there a way I can move the tmp directory of eclipse? Preferably without moving the tmp directory of other applications in the process.


回答1:


May have found a way by setting a property called java.io.tmpdir in eclipse.ini. Seems to have changed where most of the read/write activity happens during build at least. For example:

-vmargs
-Xms128m
-Xmx1024m
-XX:MaxPermSize=256M
-Djava.io.tmpdir=E:\tmp

Not sure if it have to be after the -vmargs thing or not, but this seems to work anyways.




回答2:


It can be done by Djava.io.tmpdir property
->On root directory of your project right click as select run or debug as then in:
In Run/Debug Configuration of your project
->Run configuration
->Arguments-->
In VM Arguments
write the complete path of your temp directory
example: if you want to select a folder JAVAtmp in F drive then pass the VM arguments as :

-Djava.io.tmpdir=F:\JAVATmp



来源:https://stackoverflow.com/questions/10328944/possible-to-move-the-tmp-directory-of-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!