【Tools.Eclipse】 64位系统下同时使用64位和32位的eclipse

来源:互联网 发布:简单特效制作软件 编辑:程序博客网 时间:2024/04/27 18:01

转自: http://blog.csdn.net/jacarri/article/details/9785683


32位JDK安装目录是D:\Java\32\jdk1.6.0_13

64位JDK安装目录是D:\Java\jdk1.7.0_06


JAVA_HOME配置的是JAVA_HOME=D:\Java\32\jdk1.6.0_13


然后启动64位的eclipse果断的报错了,报错信息:[Failed to load the JNI shared library "D:\Java\32\jdk1.6.0_13\bin\..\jre\bin\client\jvm.dll".],想到环境变量配置的是32位的JDK,果断的确认是eclipse使用了默认的配置,要解决这个问题就要在64位eclipse.ini中指定jvm的位置.

配置方法如下:

  在eclipse.ini文件中找到openFile,在下面添加如下两行:

  1. -vm  
  2. D:/Java/jdk1.7.0_06/bin/javaw.exe  

注意上面两行不能写在同一行上哟.

   为了保证以后将环境变量的jdk切换到64位后,32位的eclipse报错,所以顺便32位的eclipse的配置文件也做了类似的配置

  如果改配置后出现这个错误[Java was started but returned exit code=13]  ,可能是你给64位的eclipse指定了32位的jvm.


上我64位eclipse使用的配置文件

  1. -startup  
  2. plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar  
  3. --launcher.library  
  4. plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502  
  5. -product  
  6. org.eclipse.epp.package.java.product  
  7. --launcher.defaultAction  
  8. openFile  
  9. --launcher.XXMaxPermSize  
  10. 256M  
  11. -showsplash  
  12. org.eclipse.platform  
  13. --launcher.XXMaxPermSize  
  14. 256m  
  15. --launcher.defaultAction  
  16. openFile  
  17. -vm  
  18. D:/Java/jdk1.7.0_06/bin/javaw.exe  
  19. -vmargs  
  20. -Dosgi.requiredJavaVersion=1.5  
  21. -Xms40m  
  22. -Xmx384m  
  23. -XX:PermSize=256M   
  24. -XX:MaxPermSize=256M  
  25. -verbose:gc  
  26. -XX:+PrintGCDetails  
  27. -XX:+PrintGCDateStamps  
  28. -Xloggc:D:/application/eclipse-android/gc.log  

上32位eclipse使用的配置文件

  1. -startup  
  2. plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar  
  3. --launcher.library  
  4. plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502  
  5. -product  
  6. org.eclipse.epp.package.jee.product  
  7. --launcher.defaultAction  
  8. openFile  
  9. --launcher.XXMaxPermSize  
  10. 256M  
  11. -showsplash  
  12. org.eclipse.platform  
  13. --launcher.XXMaxPermSize  
  14. 256m  
  15. -vm  
  16. D:/Java/32/jdk1.6.0_13/bin/javaw.exe  
  17. --launcher.defaultAction  
  18. openFile  
  19. -vmargs  
  20. -Dosgi.requiredJavaVersion=1.5  
  21. -Xms40m  
  22. -Xmx512m  


0 0
原创粉丝点击