让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选项出 ...
随机推荐
- Android打包失败Proguard returned with error code 1. See console
问题一: [2013-06-28 11:12:10 - ] Proguard returned with error code 1. See console [2013-06-28 11:12:10 ...
- Ubuntu lnmp安装记录
参考了: Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL 在访问 info.php的时候,我显示的是502错误.后面我参考了: Ubuntu15 ...
- activity和fragment的声明周期
Activity生命周期: Fragment生命周期:
- (原创)fedora 17安装KVM虚拟机
1.安装KVM yum groupinstall Virtualization 'Virtualization Client' 2.安装api支持 yum install libvirt servic ...
- css扁平化博客学习总结(二)css样式重置
css样式重置 方法一:不推荐使用,这么写会让网页解析速度变慢. *{ margin: 0; padding: 0;} 方法二:大家常用的写法,比较流行. body, html, div, block ...
- 【算法】A*改进算法
目的:我这里希望实现一个java A* 游戏里的战斗寻径 定义部分: 这个定义引用自 http://www.cnblogs.com/kanego/archive/2011/08/30/2159070. ...
- Logcat中报内存泄漏MemoryLeak的一次分析
有时候运行APP的时候Logcat中会报错,提示资源没有释放,Memory leak, 于是打开Android Studio在Android Monitor工具栏点开,有Logcat和Monitors ...
- 安装ipython notebook
从http://cs231n.github.io/assignments2016/assignment1/开始说起,因为要学习cs231n课程,需要安装ipython notebook,原本电脑中安装 ...
- 2.MySQL入门基本操作初体验
启动和关闭mysql服务器: 一.启动方式 1.使用 mysqld 脚本启动:/etc/inint.d/mysqld start 2.使用 守护进程safe_mysqld 启动:safe_mysqld ...
- python 自动化之路 day 05
内容目录: 列表生成式.迭代器&生成器 装饰器 软件目录结构规范 模块初始 常用模块 1.列表生成式,迭代器&生成器 列表生成式 需求:列表[0, 1, 2, 3, 4, 5, 6, ...