Java compile error in Intellij IDEA 13.1
10,274
Solution 1
Assuming your codebase is maven-based I recommend you to do the following:
- Set up maven (this includes setting environment variable
M2_HOME
for Maven 2 andJAVA_HOME
) - Get a clean codebase (from VCS for example);
- Do File -> Open in IntelliJ Idea and open root
pom.xml
; - Let maven do its job - creating modules, downloading dependencies, etc. This may take a while.
- Now you need to build your project. Most likely you'll do that just as you doing it now.
Solution 2
Make sure that you have a JDK defined under:
File -> Project Structure -> SDKs
And that you project is associated with the SDK/JDK here:
File -> Project Structure -> Project -> "Project SDK"
Author by
pili
Updated on June 04, 2022Comments
-
pili almost 2 years
I got a code base from a source and trying to build using intellij Idea 13.1. I am a .net guy and trying to set this up. Could you please help on how to resolve this error. I tried to setup the maven but no luck.
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
-
Kaveh Ghahremani almost 10 yearsI would check on maven after you've configured that your JDK/SDK set up is correct
-
pili almost 10 yearsThanks Alexey, This worked great! Now I am getting another error which could be related to something else, "Unable to load class [com.microsoft.sqlserver.jdbc.SQLServerDriver]".