简体   繁体   English

无法在Eclipse中建立Jhipster专案

[英]Cannot build jhipster project in eclipse

I cannot build a simple project (just created with yo jhipster ) in Eclipse. 我无法在Eclipse中构建一个简单的项目(仅使用yo jhipster创建)。 I'm getting the error: 我收到错误消息:

Maven Dependency Problem Maven依赖问题
Missing artifact com.sun:tools:jar:1.6 缺少工件com.sun:tools:jar:1.6

Thare are other errors too but i think this is the one that is causing problems. Thare也是其他错误,但是我认为这是导致问题的原因。
I can compile and run the same project from command line with mvn spring-boot:run 我可以使用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. 如果我检查Eclipse配置,无论我做什么,都可以看到java.home指向C:\\Program Files (x86)\\Java\\jre7
I tried to edit the eclipse.ini file adding -vm C:\\Progra~1\\Java\\jdk1.7.0_51\\bin\\javaw.exe 我试图编辑eclipse.ini文件并添加-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. 我还仔细检查了我的工作区和项目是否正在使用Jdk,而不是Jre Vm。

Can someone please point me to the right direction please? 有人可以给我指出正确的方向吗? Thanks! 谢谢!

I had the same issue before... you are probably running your Eclipse with a JRE rather than a JDK. 之前我也遇到过同样的问题……您可能正在使用JRE而不是JDK运行Eclipse。 The sun tools jar is actually part of the latest JDK, and doesn't necessarily need to be inferred directly in your project. Sun工具jar实际上是最新JDK的一部分,不一定需要直接在您的项目中进行推断。

See my comments, issue #1, in the attached link: JHipster Eclipse project running out of memory in "main" 请参阅附件链接中的问题#1,我的评论: JHipster Eclipse项目在“主”中的内存不足

Try with STS and everything works. 尝试使用STS,一切正常。 Seems to be an issue with your eclispe 似乎是您的eclispe的问题

I've imported the sample jhipster in Eclise (without STS) and everything was OK, after installing the maven dependencies. 在安装了Maven依赖项之后,我已经将示例jhipster导入了Eclise(没有STS)中,一切正常。

To run the project, run as an application and search for the Application (com.mycompany.myapp.Application) 若要运行项目,请作为应用程序运行并搜索该应用程序(com.mycompany.myapp.Application)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM