0

I cannot build a simple project (just created with yo jhipster) in Eclipse. I'm getting the error:

Maven Dependency Problem
Missing artifact com.sun:tools:jar:1.6

Thare are other errors too but i think this is the one that is causing problems.
I can compile and run the same project from command line with mvn spring-boot:run

I googled for the error and found lots of solutions but unfortunately none worked.
If i check Eclipse configuration i can see that java.home points to C:\Program Files (x86)\Java\jre7 no matter what i do.
I tried to edit the eclipse.ini file adding -vm C:\Progra~1\Java\jdk1.7.0_51\bin\javaw.exe
I also double checked that my workspace and project are using a Jdk and not a Jre Vm.

Can someone please point me to the right direction please? Thanks!

andreapier
  • 2,958
  • 2
  • 38
  • 50

3 Answers3

1

I had the same issue before... you are probably running your Eclipse with a JRE rather than a JDK. The sun tools jar is actually part of the latest JDK, and doesn't necessarily need to be inferred directly in your project.

See my comments, issue #1, in the attached link: JHipster Eclipse project running out of memory in "main"

Community
  • 1
  • 1
degreesightdc
  • 186
  • 2
  • 14
0

Try with STS and everything works. Seems to be an issue with your eclispe

Jérôme Mirc
  • 119
  • 1
  • 4
0

I've imported the sample jhipster in Eclise (without STS) and everything was OK, after installing the maven dependencies.

To run the project, run as an application and search for the Application (com.mycompany.myapp.Application)

Paulo Fidalgo
  • 21,709
  • 7
  • 99
  • 115