更改eclipse创建.eclipse,.p2和其他文件夹的位置

问题描述:

我看到eclipse在我的用户主文件夹中创建了一些文件夹,例如.eclipse .p2等...我想更改此默认文件夹(我想将所有文件保存在D:位置.). 我阅读了在Linux中更改.eclipse文件夹,但我不知道是哪个文件. ini我必须更改,如果我在Eclipse安装之后进行此操作.而且我有Windows 10而不是Linux. 对不起我的英语不好.希望在您的帮助下.

I see that eclipse create in my user home folder some folders like .eclipse .p2 etc... I want change this default folder(I want save all in a D: location.). I read this Change .eclipse folder in Linux but I don't understood which file .ini I must change and if I do this before on after eclipse installation. Furthermore I have Windows 10 not Linux. Sorry for my English. I hope in your help.

这是我的eclipse.ini

This is my eclipse.ini

-data  
D:/Programmi/Eclipse  
-configuration  
D:/Programmi/Eclipse/eclipse `  
-startup  
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar  
--launcher.library    
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.550.v20170928-1359  
-product  
org.eclipse.epp.package.java.product  
-showsplash  
org.eclipse.epp.package.common  
--launcher.defaultAction  
openFile  
--launcher.defaultAction  
openFile  
--launcher.appendVmargs  
-vmargs  
-D"user.home=D:/Programmi/Eclipse/home"
-Dosgi.requiredJavaVersion=1.8  
-Dosgi.instance.area.default=@user.home/eclipse-workspace  
-XX:+UseG1GC  
-XX:+UseStringDeduplication  
--add-modules=ALL-SYSTEM  
-Dosgi.requiredJavaVersion=1.8  
-Xms256m  
-Xmx1024m  
--add-modules=ALL-SYSTEM 

执行类似操作的简单方法是将目录移动到所需位置,然后创建指向用户目录的符号链接.

An easy way to do something similar is to move the directory to a desired location and then create a symbolic link to user directory.

示例:新的.p2位置为D:\Programmi\Eclipse\.p2

以管理员身份打开CMD控制台并执行以下操作:

Open CMD console as Administrator and execute the following:

mklink /D C:\Users\your-user\.p2 D:\Programmi\Eclipse\.p2