您如何将Eclipse和Eclipse项目指向eclipse中的新JRE版本? (不使用JAVA_HOME) [英] How do you point your Eclipse and Eclipse projects to a new JRE version in eclipse? (Not using JAVA_HOME)

查看:816
本文介绍了您如何将Eclipse和Eclipse项目指向eclipse中的新JRE版本? (不使用JAVA_HOME)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

设置场景:我的系统上有两个版本的Java。 32位版本和64位版本。另一个版本是Eclipse(Java EE)的64位版本。 MyEclipse(32位版本)指向了32位版本的JDK。我现在试图在新安装的JDK 1.6.0_32上指向Eclipse(32位版本)。 JAVA_HOME变量已经占用了64位版本,因此我无法使用这个。



以前这种环境和环境中的项目都是使用Java 1.6.0_30。我更改JRE版本的地方是
首选项 - > Java->已安装的JRE。在这里我添加了我的新JRE,并删除了旧的。还有哪些其他地方需要改变?当我启动Apache Tomcat服务器时,我仍然会收到1.6.0_30的错误信息。具体我得到错误
归档:文件/ Java / jdk1.6.0_30 / lib / tools.jar由类路径引用,不存在。



查看我的项目的类路径,我看到正确的1.6.0_33版本。我可以在哪里改变类路径?



提前谢谢

解决方案>

转到窗口/首选项/服务器/运行时环境,选择您的服务器(Apache Tomcat),单击编辑。有使用您的服务器的JRE,您可以根据需要进行更改。






Setting up scenario : I have two version of Java on my system. A 32 bit version and a 64 bit version. The other version I have is the 64 bit version of Eclipse (Java EE). The MyEclipse (32 bit version) is pointing to the 32 bit version of the JDK. I'm now trying to point the Eclipse (32 bit version) at the newly installed JDK 1.6.0_32. the JAVA_HOME variable is already take by the 64 bit version and thus I can't use this.

Previously this environment and projects in this environment were usinig Java 1.6.0_30. The places where I've changed the JRE version are in Preferences->Java->Installed JREs. In here I've added my new JRE and removed the old one. What other places might I need to change this? I'm still getting an error referring to 1.6.0_30 when I start up my Apache Tomcat server. In specific I get the error "The archive:Files/Java/jdk1.6.0_30/lib/tools.jar which is referenced by the classpath, doesn't exist. "

Looking in the class paths of my projects I see the correct 1.6.0_33 version. Where else might I need to change the classpath?

Thanks in advance.

解决方案

Go to Window/Preferences/Server/Runtime Environment, select your server (Apache Tomcat), click Edit. There is the JRE that uses your server, you can change it according to your needs.

这篇关于您如何将Eclipse和Eclipse项目指向eclipse中的新JRE版本? (不使用JAVA_HOME)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆