java compiler remove classes when compiling a few selected java files

I chose a few java files or a package in the left side project explorer and compile (using CRTL+ALT+F9 for instance) . the java files are compiled. But when I run the web container, it compains java class def not found error for some totally unrelated classes which was available before the compilation.  I noticed some other classes are removed by the compile process.

Can somebody explain what's going on?

This is intelliJ 14

5 comments
Comment actions Permalink

Hi that link does not seem to help me.

I am running a tomcat server ourside of the intelliJ. from intelliJ there is no tomcat deployment initiated. I just use the remote debugger.  I compile the java files and target to the tomcat deployment WEB-IN\classes. It doesn't matter whether the tomcat is running or not. Statically on the file system, a few classes which was there before will end up missing sometimes after the compilation.

The thing is I don't even know what classes are removed . Only the class def not found error willshow up after a Tomcat restart. Then I have to end up compile the whole project again. It is a big project and take time to to do a full compilation.

0
Comment actions Permalink

Does it work if you use Build | Make instad of compile? What classes are missing?

Check idea.log and debug version of build.log for possible errors: https://intellij-support.jetbrains.com/entries/23352446 .

0
Comment actions Permalink

I almost never use build or make . They can only  issued at the module level not for individual java files correct me if I am wrong.
The project is huge , if I use make , it just either complains out of memory error or runs forever. To build the whole projects, I use ant scripts.

The missing class are random missing porject classes on the compilatoin target.

0
Comment actions Permalink

IntelliJ IDEA expects that you can Make the project. Make is incremental and if there is only one change, it would be as fast as Compile.

If it doesn't build because of out of memory, you can try increasing the heap size for the build process in IDEA settings.

0

Please sign in to leave a comment.