[英]Java compile error in Intellij IDEA 13.1
I got a code base from a source and trying to build using intellij Idea 13.1. 我从源代码获得了代码库,并尝试使用intellij Idea 13.1进行构建。 I am a .net guy and trying to set this up. 我是一个.net的人,并试图设置它。 Could you please help on how to resolve this error. 你能帮忙解决一下如何解决这个错误吗? I tried to setup the maven but no luck. 我试图设置maven但没有运气。
Information:Using javac 1.7.0_55 to compile java sources
Information:java: Errors occurred while compiling module 'main'
Information:Compilation completed with 100 errors and 0 warnings in 3 sec
Information:100 errors
Information:0 warnings
C:\Java\src\main\java\com\bc\testmod\models\MEntity.java
Error:(3, 1) java: package javax.persistence does not exist
Error:(12, 2) java: cannot find symbol
symbol: class Entity
Error:(13, 2) java: cannot find symbol
symbol: class Table
Assuming your codebase is maven-based I recommend you to do the following: 假设您的代码库是基于maven的,我建议您执行以下操作:
M2_HOME
for Maven 2 and JAVA_HOME
) 设置maven(包括为Maven 2和JAVA_HOME
设置环境变量M2_HOME
) pom.xml
; 执行文件 - >在IntelliJ Idea中打开并打开root pom.xml
; Make sure that you have a JDK defined under: 确保您在以下位置定义了JDK:
File -> Project Structure -> SDKs 文件 - >项目结构 - > SDK
And that you project is associated with the SDK/JDK here: 并且您的项目与SDK / JDK相关联:
File -> Project Structure -> Project -> "Project SDK" 文件 - >项目结构 - >项目 - >“项目SDK”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.