1

when i tried to build my project i am getting this error below as:

    BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 45.435s
    [INFO] Finished at: Wed Jun 13 17:25:47 GMT+05:30 2012
    [INFO] Final Memory: 10M/76M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project DPCommons: Compilation failure: Compilation failure:
C:\MyEclipseWorkspace\Workspace_MayMU24\DPCommons\src\com\afunds\lang\ResourceClassLoader.java:[13,15] sun.misc.Resource is Sun proprietary API and may be removed in a future release

and the project names will appear below.

How can i overcome this.

Mdhar9e
  • 1,376
  • 4
  • 23
  • 46

3 Answers3

1

Do the following steps to solve that problem :

Window -> Preferences -> Java -> installed JREs -> I have a JRE from the JDK location, my location looks like C:\Program Files\Java\jdk1.6.0_26

Window -> Preferences -> Java -> installed JREs -> Execution Enviroments -> Select JavaSE-1.6 and select a compatible JRE which should be the one set in the previous step.

Look at this link -

Maven in Eclipse complains that "Unable to locate the Javac Compiler" whenever POM changed

Community
  • 1
  • 1
Pramod Kumar
  • 7,914
  • 5
  • 28
  • 37
  • i have given before as you mentioned here. then i tried. pls check is there any another way..to clear this error. – Mdhar9e Jun 13 '12 at 12:15
0

Looks like you have a JDK version which has this problem as per this discussion. Upgrade and retry.

Raghuram
  • 51,854
  • 11
  • 110
  • 122
0

By providing the below arguments in the pom.xml of my project solved the issue.

<compilerArguments>
<bootclasspath>${java.home}\lib\rt.jar</bootclasspath>
</compilerArguments>

But still unclear as to why this works?

hakish
  • 3,990
  • 7
  • 39
  • 56