在运行Eclipse时明确指定要使用的Java VM

创建桌面快捷方式

Specifying the Java virtual machine
Here is a typical Eclipse command line:

eclipse -vm c:\jdk6u22\jre\bin\javaw

Tip: It's generally a good idea to explicitly specify which Java VM to use when running Eclipse. This is achieved with the "-vm" command line argument as illustrated above. If you don't use "-vm", Eclipse will look on the O/S path. When you install other Java-based products, they may change your path and could result in a different Java VM being used when you next launch Eclipse.

To create a Windows shortcut to an installed Eclipse:

1.Navigate to eclipse.exe in Windows Explorer and use Create Shortcut on the content menu.
2.Select the shortcut and edit its Properties. In the Target: field append the command line arguments.
Opening this shortcut launches Eclipse. (You can drag the shortcut to the Windows Desktop if you want to keep it in easy reach.)

D:\eclipse\eclipse.exe -vm D:\JRE6\bin\javaw.exe

D:\eclipse\eclipse.exe -vm "D:\JRE 6\bin\javaw.exe"

注意:当javaw的路径包含空格时必须使用双引号包含起来。

 

复制JRE安装文件到Eclipse根目录

 

编辑eclipse.ini

 

 在-vmargs之前插入参数,如下:

 -vm
D:\JRE6\bin\javaw.exe

-vm
D:\JRE 6\bin\javaw.exe

注意:即使javaw的路径包含空格,也不要使用双引号。

 设置Path环境变量

向Path环境变量追加内容(javaw的父级路径),如下:

;D:\JRE6\bin

 

转载于:https://www.cnblogs.com/rms365/p/10961447.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值