让Eclipse使用新版本的JRE
更新到新的 Mac OS X 再打开Eclipse 编译程序会报错,
Exception in thread "main" java.lang.UnsupportedClassVersionError: Unsupported major.minor version 51.0
原因是Eclipse 找不到新版本的Java Runtime 的路径,需要有人来告诉他,解决办法:
- Launch
Eclipse.app - Choose
Eclipse -> Preferences - Choose
Java -> Installed JREs - Click the
Add...button - Choose
MacOS X VMas the JRE type. Press Next. - In the "JRE Home:" field, type
/Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home - You should see the system libraries in the list titled "JRE system libraries:"
- Give the JRE a name. The recommended name is
JDK 1.7. Click Finish. - Check the checkbox next to the JRE entry you just created. This will cause Eclipse to use it as the default JRE for all new Java projects. Click OK.
- Now, create a new project. For this verification, from the menu, select
File -> New -> Java Project. - In the dialog that appears, enter a new name for your project. For this verification, type Test17Project
- In the JRE section of the dialog, select
Use default JRE (currently JDK 1.7) - Click Finish.
让Eclipse使用新版本的JRE的更多相关文章
- 浅谈Eclipse寻找JVM(JRE)的顺序机制(转)
转自:http://blog.csdn.net/teedry/article/details/6666850 Eclipse也是一个普通的Java程序,因此必须有一个JRE做为运行环境. ...
- Eclipse寻找JVM(JRE)的顺序机制
http://developer.51cto.com/art/200907/135271.htm Eclipse也是一个普通的Java程序,因此必须有一个JRE做为运行环境.本文将简单谈谈Eclips ...
- eclipse配置tomcat 和JRE环境
配置JRE环境,通俗点讲就是添加一个不同版本的jdk window——preferences——java——installed jres 点击add添加 选择standard VM 选择一个本机正 ...
- 让eclipse启动时拥有jre
让eclipse 拥有jre,这样才能启动 eclipse/eclipse.ini 首行加入 -vm /home/liujl/installer/jdk/bin/java
- Java集成开发环境--Eclipse for J2EE配置JRE运行环境
.d1 { border-style: none } .d2 { border-style: solid } .d3 { border-style: dotted } .d4 { border-sty ...
- Eclipse添加JDK,JRE切换
Eclipse添加JDK Window---preferences 切换JDK,JRE
- ubuntu eclipse 找不到jre文件
一. 把jdk下的jre文件copy到eclipse安装目录 二. 打开eclipse 重新设计library和工作空间
- Eclipse - Mac Os Default JRE missing
转:http://stackoverflow.com/questions/1736993/eclipse-mac-os-default-jre-missing 1) Follow Joshua's a ...
- Eclipse添加默认的JRE
打开eclipse,依次点击如下选项Window->Preferences-> Java -> Installed JREs.步骤见下图. 选中Installed JREs选项出 ...
随机推荐
- Leetcode 102. Binary Tree Level Order Traversal(二叉树的层序遍历)
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, ...
- 【转】Android应用程序的数据存放目录解说
Android的每个应用程序,都有自己的可控的目录. 在Setting/Application info里面,可以看到每个应用程序,都有Clear data和Clear cache选项. 具体这些目录 ...
- (转)(contant的一些用法)
主要就是增加约束的 以下几种约束 .并 一一列举: 1.主键约束:要对一个列加主键约束的话,这列就必须要满足的条件就是分空因为主键约束:就是对一个列进行了约束,约束为(非空.不重复)以下是代码 要对 ...
- 收藏2个mongodb connector网址
https://github.com/plaa/mongo-spark https://github.com/mongodb/mongo-hadoop http://codeforhire.com/2 ...
- SQL SERVER 与ACCESS、EXCEL的数据导入导出转换
* 说明:复制表(只复制结构,源表名:a 新表名:b) select * into b from a where 1<>1 * 说明:拷贝表(拷贝数据,源表名:a 目标表名:b) ...
- 05顺序队列_Queue--(栈与队列)
#include "stdio.h" #include "stdlib.h" #include "io.h" #include " ...
- windows server 2003 负载平衡的详细设置步骤(转载)
声明:本文为转载. 当把一台服务器(包括Web服务器.FTP服务器或者流媒体服务器等等)放入网络中之后,随着客户端数量的不断增加,人们往往需要功能更强大.处理速度更快的服务器.为了解决这个问题,如果将 ...
- NodeJS连接MongoDB数据库时报错
今天第一次尝试连接MongoDB数据库,具体步骤也很简单. 首先,通过NodeJS运行环境安装MongoDB包,进入要安装的目录,执行语句 npm install mongodb 安装成功后,通过如下 ...
- 一种c#深拷贝方式完胜java深拷贝(实现上的对比)
楼主是一名asp.net攻城狮,最近经常跑java组客串帮忙开发,所以最近对java的一些基础知识特别上心.却遇到需要将一个对象深拷贝出来做其他事情,而原对象保持原有状态的情况.(实在是不想自己new ...
- 暑假集训(2)第七弹 -----今年暑假不AC(hdu2037)
J - 今年暑假不AC Crawling in process... Crawling failed Time Limit:1000MS Memory Limit:32768KB 64 ...