---
title: "【Maven】Eclipse is running in a JRE, but a JDK is required"
author: "cooliufang"
date: "2013-03-15T10:05:19Z"
tags: ["Eclipse", "maven"]
categories: ["开源软件"]
slug: "maven-eclipse-is-running-in-a-jre-but-a-jdk-is-required"
draft: false
lastmod: "2013-03-15T10:05:19Z"
id: 1829844
url: "https://smallwildpig.iteye.com/blog/1829844"
---

Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may not work when importing projects or updating source folders.

1. First check eclipse is using JDK, not JRE;
Window -> Preferences -> Java -> Installed JREs

2. Then configure file eclipse.ini
See the solution I in blog: 
<http://smallwildpig.iteye.com/blog/1752581>

3. Others: 
make sure "JAVA_HOME" is configured correctly
(maybe have more JDK, or the path is not correct)

4. eclipse shortcut
Open Properites -> Target, modify:
"D:\Program Files\eclipse\eclipse.exe" -vm "D:\Program Files\Java\jdk1.6.0_37\bin\javaw.exe"

Restart eclipse...