I created a project in NetBeans by downloading some third-party banks of Bouncy Castle, which provides some Java cryptography APIs. I also downloaded souce code and placed them under the src folder according to the package name. However, several java files that I have in my project are displayed in red with errors. here is one of them -
getparams() in org.bouncycastle.jce.provider.JCEECPrivateKey cannot implement getParams() in rg.bouncycastle.jce.interfaces.ECKey found : java.security.spec.ECParameterSpec required: rg.bouncycastle.jce.ECParameterSpec
But the strange part is that when I actually compile the code from NetBeans, the compilation is successful and the last jar file is created. However, the compilation says the following:
Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
My questions are: why does compilation happen, although some files have errors? Can I ignore them as benign?
How to compile with -Xlint in NetBeans because I compile by clicking in the project and selecting "Clean and Build".
java compiler-construction netbeans
user496934
source share