如何在eclipse的配置文件里指定jdk路径
转载自:https://blog.csdn.net/gnail_oug/article/details/51925804;个人做了些小修改。
今天下载了eclipse4.6版本,打开时报Version 1.7.0_45 of the JVM is not suitable for this product. Version:1.8 or greater is required.,提示jdk版本要1.8以上,如下图:
由于不想直接将环境变量配置的jdk1.7改为jdk1.8,所以单独在eclipse的配置文件里指定jdk来运行eclipse4.6,方法如下:
打开eclipse根目录下的eclipse.ini配置文件,eclipse4.6默认配置如下:
- -startup
- plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
- --launcher.library
- plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444
- -product
- org.eclipse.epp.package.jee.product
- --launcher.defaultAction
- openFile
- -showsplash
- org.eclipse.platform
- --launcher.defaultAction
- openFile
- --launcher.appendVmargs
- -vmargs
- -Dosgi.requiredJavaVersion=1.8
- -XX:+UseG1GC
- -XX:+UseStringDeduplication
- -Dosgi.requiredJavaVersion=1.8
- -Xms256m
- -Xmx1024m
在 -vmargs 上一行--launcher.appendVmargs的上一行增加 -vm参数来指定jdk路径,如我的jdk路径在d:\java文件夹下 :
-vm
D:\java\jdk1.8.0_91\bin\javaw.exe
添加 -vm参数后的配置文件如下:
- -startup
- plugins/org.eclipse.equinox.launcher_1.3.200.v20160318-1642.jar
- --launcher.library
- plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.400.v20160518-1444
- -product
- org.eclipse.epp.package.jee.product
- --launcher.defaultAction
- openFile
- -showsplash
- org.eclipse.platform
- --launcher.defaultAction
- openFile
- -vm
- D:\java\jdk1.8.0_91\bin\javaw.exe
- --launcher.appendVmargs
- -vmargs
- -Dosgi.requiredJavaVersion=1.8
- -XX:+UseG1GC
- -XX:+UseStringDeduplication
- -Dosgi.requiredJavaVersion=1.8
- -Xms256m
- -Xmx1024m
然后再次运行eclipse.exe便能正常启动了。
如何在eclipse的配置文件里指定jdk路径的更多相关文章
- (转)如何在eclipse的配置文件里指定jdk路径
本文转载自:http://songguoliang.iteye.com/blog/1752519 运行eclipse时报如下错误: 在eclipse的配置文件里指定jdk路径,只需在eclipse的配 ...
- 在eclipse的配置文件里指定jdk路径
在eclipse的配置文件里指定jdk路径,只需在eclipse的配置文件里增加-vm参数即可. 打开eclipse目录下的eclipse.ini配置文件,增加-vm配置,需要注意的是该参数要加在-v ...
- Tomcat指定JDK路径(Linux+Windows)
当系统有多套JDK,不方便在系统配统一的JAVA_HOME时,我们可能想给tomcat指定JDK路径. 1.Linux下Tomcat指定JDK路径 找到$CATALINE_HOME/bin/catal ...
- eclipse debug configurations arguments指定文件路径参数
1 eclipse debug configurations arguments指定文件路径参数 使用绝对路径,但是这个文件必须要放在该project的源码路径的外面才行,否则eclipse不认这个文 ...
- Tomcat指定JDK路径
一.应用实例 一般情况下一台服务器只跑一个业务,那么就直接配置一套环境,设置好Java环境变量即可.某些时候一台服务器上会安装多个业务,而且各个业务需要的JDK版本各不相同,或者为了使业务独立开来,需 ...
- [#Linux] CentOS 7 配置JDK后,eclipse无法启动,提示jdk路径错误。
解决方案:在eclipse的目录下创建一个jre文件夹,在jre文件夹里创建一个jdk的bin目录的链接 1.进入到eclipse目录下,右键在终端打开. 2.创建jre目录:mkdir j ...
- eclipse指定jdk路径
- Tomcat手动指定jdk路径
Windows系统: 修改bin下的setclasspath.bat,在开头处添加: rem set specific jdkset JAVA_HOME=%CATALINA_HOME%\jdk1.8. ...
- 怎样在Mac OS X上面指定Eclipse启动时用指定的某一版本号JDK?
编辑 $ECLIPSE_HOME/Eclipse.app/Contents/MacOS/eclipse.ini 文件.在 Finder 中右键或者Ctrl+点击 Eclipse 应用程序.然后点击&q ...
随机推荐
- ios 获得webview user-agent
UIWebView *webView = [[UIWebView alloc]initWithFrame:CGRectZero]; NSString *myUserAgent = [webView s ...
- tensorflow ValueError: Cannot feed value of shape (5000,) for Tensor 'output:0', which has shape '(?, 10)'
提供的训练数据和定义的模型之间的维度不对应. 在MNIST手写数字识别时,在 mnist = input_data.read_data_sets("MNIST_data/") 中, ...
- Status Code:405 Method Not Allowed
场景: 前端调用方法的时候,调不通,并且报错信息为405 因为我们公司前后端分离开发,于是前端就来找我说我写的接口有问题?于是我就在这里的postman中测试发现没问题啊. 然后我好好看了一下报错信息 ...
- OpenCv 人脸识别 基础
#include <opencv2\opencv.hpp> #include <iostream> using namespace std; int main() { // 摄 ...
- 02 Tensorflow的安装配置
1 anaconda 64 位,win10 安装 清华大学镜像网络,下载地址:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 选择下载文件 ...
- Validate the date format
Validate the date format function checkdate(input) { var validformat = /^\d{2}\/\d{2}\/\d{4}$/; //Ba ...
- linux添加root级别账户
一条命令 useradd -p `openssl passwd -1 -salt ‘lsof’ admin` -u 0 -o -g root -G root -s /bin/bash -d /usr/ ...
- innerText 与textContent区别
两者都是可以过滤html元素 innerText 获取内容 换行会有L类似特殊符号 textContent 没有
- Mysql Innodb 性能参数设置 https://www.rathishkumar.in/2017/01/how-to-allocate-innodb-buffer-pool-size-in-mysql.html
参考原文: https://www.rathishkumar.in/2017/01/how-to-allocate-innodb-buffer-pool-size-in-mysql.html 查看系统 ...
- [leetcode]174. Dungeon Game地牢游戏
The demons had captured the princess (P) and imprisoned her in the bottom-right corner of a dungeon. ...