java file delete忽略错误,忽略编译错误 - Java

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.

解决方案

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值