bn.
bn.

Reputation: 7949

Problems running unit tests after upgrading from Netbeans 6.5 to Netbeans 6.7

I am experiencing issues with existing projects from Netbeans 6.5 in Netbeans 6.7 when selecting a file under "Test Packages" and performing a right click-->Debug, or right click-->Run. The error reported is:

java.lang.NoSuchMethodError: main
Exception in thread "main" Java Result: 1

I am using JUnit 4.x

I have not changed any code since the upgrade and have tried this on multiple projects that were working and I still experience the problem. I am able to perform right click-->Test on the entire project.

Are there any changes I would need to make due to the upgrade, or is anything broken in Netbeans 6.7?

Upvotes: 0

Views: 503

Answers (1)

bn.
bn.

Reputation: 7949

Work-around Solution Found

If the following setting in Netbeans 6.7 is not checked, the tests work as they did in 6.5: Right Click --> "Project Properties" --> "Build" --> "Compiling" --> "Compile on Save"

So, this is at least a work-around until real issue is understood.

-bn

Upvotes: 1

Related Questions