eclipse突然找不到兼容的jre

时间:2018-04-08 06:45:32

标签: java eclipse

有一天,突然发生eclipse无法编译项目。 eclipse无法再为javaSE-1.7找到兼容的JRE。我知道我们可以将“JRE系统库”更改为我的“已安装的JRE”设置之一,但我的项目中有太多子模块需要更改。

重新安装JDK并重新配置“已安装的JRE”并没有帮助我的“eclipse-jee-oxygen-1”再次识别兼容的JRE,即使在新的空白工作区中也是如此。 enter image description here enter image description here

2 个答案:

答案 0 :(得分:1)

我怀疑没有JDK 8的氧气运行

Eclipse-oxygen-installation

-vm
[path-to-jdk-7-home]\bin\server\jvm.dll

尝试将-vm添加到eclipse.ini

// modules =================================================
var express        = require('express');
var app            = express();
var mongoose       = require('mongoose');
var bodyParser     = require('body-parser');
var methodOverride = require('method-override');

// configuration ===========================================

// config files
var port = process.env.PORT || 8080; // set our port
var db = require('./config/db');

// connect to our mongoDB database (commented out after you enter in your own credentials)
connectionsubject = mongoose.createConnection(db.urlSubjectViews);



// get all data/stuff of the body (POST) parameters
app.use(bodyParser.json()); // parse application/json 
app.use(bodyParser.json({ type: 'application/vnd.api+json' })); // parse application/vnd.api+json as json
app.use(bodyParser.urlencoded({ extended: true })); // parse application/x-www-form-urlencoded

app.use(methodOverride('X-HTTP-Method-Override')); // override with the X-HTTP-Method-Override header in the request. simulate DELETE/PUT
app.use(express.static(__dirname + '/public')); // set the static files location /public/img will be /img for users

// routes ==================================================
require('./app/routes')(app); // pass our application into our routes

// start app ===============================================
app.listen(port);   
console.log('Magic happens on port ' + port);           // shoutout to the user
exports = module.exports = app;                         // expose app

答案 1 :(得分:0)

看起来像我设置为“-Dfile.encoding = UTF-8 -Xms256m -Xmx4096m”的windows env变量“JAVA_TOOL_OPTIONS”会导致问题。当我删除它时,eclipse开始再次识别兼容的JRE。