Eclipse中的GlassFish抱怨“GlassFish v3需要JDK 1.6而不是JRE” [英] GlassFish in Eclipse complains "GlassFish v3 requires a JDK 1.6 and not a JRE"

查看:135
本文介绍了Eclipse中的GlassFish抱怨“GlassFish v3需要JDK 1.6而不是JRE”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在运行:


  • 适用于Web开发人员的Eclipse Java EE IDE。

  • 版本: Helios Service Release 2

  • Build id:20110218-0911

我还安装了Java EE 6 SDK Update 2,其中包括:

I have also installed Java EE 6 SDK Update 2 which includes:


  • GlassFish开源版3.1

  • Java EE 6代码示例

  • Java EE 6 API文档

  • Java EE 6教程

  • 您的第一场杯: Java EE平台

  • GlassFish Open Source Edition 3.1
  • Java EE 6 Code Samples
  • Java EE 6 API Documentation
  • Java EE 6 Tutorial
  • Your First Cup: An Introduction to the Java EE Platform

我已经使用Eclipse注册了GlassFish,但是当我尝试启动服务器时,会收到以下错误:

I have registered GlassFish with Eclipse but when I try to start the server, I get the following error:


GlassFish v3需要JDK 1.6而不是JRE。请在服务器属性运行时环境部分添加/选择正确的JDK。

GlassFish v3 requires a JDK 1.6 and not a JRE. Please add/select the correct JDK in the Server properties 'Runtime Environment' section.

我在这里搜索了一个答案,但是没有远远似乎工作。有人建议我如何排序这个错误?

I have searched here for an answer but none so far seem to work. Can anybody suggest how I would sort this error out?

推荐答案

是的,你下载了(或指向Eclipse)一个JRE,但是它需要一个JDK。后者具有所有Java工具:javac.exe,java.exe,jar.exe等。

Yes, you downloaded (or pointed Eclipse to) a JRE, but it needs a JDK. The latter has all the Java tools: javac.exe, java.exe, jar.exe, etc.

如果您查看告诉Eclipse寻找的目录一个JDK,你必须看到一个/ bin目录中的.exe文件。如果你没有,你知道为什么错误信息。

If you look at the directory where you told Eclipse to look for a JDK, you must see a /bin directory with those .exe files in it. If you don't, you know why the error message.

确保你下载了一个JDK并指向Eclipse。

Make sure you downloaded a JDK and point Eclipse to it.

还有一个检查:看看是否可以启动没有Eclipse的Glassfish。如果你在同一时间学习,你就不了解两件事情。将一个未知数离开方程式,直到您可以使Glassfish自行运行。

One more check: see if you can start Glassfish without Eclipse. You're ignorant of two things if you're learning both at the same time. Leave one unknown out of the equation until you can make Glassfish run on its own.

您需要一个JAVA_HOME环境变量。它指向什么?如果你没有,创建它。

You need a JAVA_HOME environment variable. What's it pointing to? If you don't have one, create it.

这篇关于Eclipse中的GlassFish抱怨“GlassFish v3需要JDK 1.6而不是JRE”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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