Saturday, October 22, 2005

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!

Update at 6:57 PM: If you meet this problem, please enable Settings | Project Settings | Compiler | Honor dependencies on "Compile" command.

Thanks Sascha Weinreuter! But I think that it should be enable by default.

No comments: