Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I have around 1500 files to compile, in which 15-20 files have compilation errors. These files are not under my control, so I could not do any modification/update/delete. So, i have two questions here.

1) how do i ignore the compilation errors from these 15-20 files and continue to produce the .class file for rest of them. is there any javac commandline option or anything which will ignore the compliation errors and produce the .class files for all other non error files.

2)will the java compiler abort compilation as soon as it sees these errors or will it continue compiling(producing .class files) everything else and at the end then complain about these files with errors.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
632 views
Welcome To Ask or Share your Answers For Others

1 Answer

You can use Eclipse. Its internal compiler is - at least in some cases - able to keep going with the rest of the build, even when some classes don't compile fully. It will even produce class files for the broken classes if possible, generating methods which throw an exception as soon as they're called.

I would strongly recommend that you simply take a copy of all the source and fix the errors at least in your own copy as early as possible, but Eclipse's partial compilation may help you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...