Do not automatic compile in IntelliJ IDEA 5.0.2 Build #3516

When I try to create 2 class A and B, if in class A, it has a reference to class B, I can not compile class A in IntelliJ IDEA 5.0.2 Build #3516.

I found that if I compile class B first and then compile class A, it's OK.

public class A {

public A() {

B b = new B();



public class B {

And if I add main() method to class A

public static void main(String[] args) {

A a = new A();


then run class A. Now it works well!


Check if "Settings | Project | Compiler | Honor dependencies on Compile command" is enabled.



Please sign in to leave a comment.