I have a project in netbeans in which I have a java scanner which has been generated using jflex. So when I usually build this using a make file I use the -Xlint option, that is
javac -Xlint javaScanner.java
But now when I am creating the jar file using the clean and build option it is showing the following error.
init:
deps-clean:
Updating property file: /home/mridula/testPrjct/sDvait-LCS/build/built-clean.properties
Deleting directory /home/mridula/testPrjct/sDvait-LCS/build
clean:
init:
deps-jar:
Created dir: /home/mridula/testPrjct/sDvait-LCS/build
Updating property file: /home/mridula/testPrjct/sDvait-LCS/build/built-jar.properties
Created dir: /home/mridula/testPrjct/sDvait-LCS/build/classes
Created dir: /home/mridula/testPrjct/sDvait-LCS/build/empty
Created dir: /home/mridula/testPrjct/sDvait-LCS/build/generated-sources/ap-source-output
Compiling 35 source files to /home/mridula/testPrjct/sDvait-LCS/build/classes
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Copying 1 file to /home/mridula/testPrjct/sDvait-LCS/build/classes
compile:
Created dir: /home/mridula/testPrjct/sDvait-LCS/dist
Copying 1 file to /home/mridula/testPrjct/sDvait-LCS/build
Copy libraries to /home/mridula/testPrjct/sDvait-LCS/dist/lib.
Building jar: /home/mridula/testPrjct/sDvait-LCS/dist/sDvait-LCS.jar
To run this application from the command line without Ant, try:
java -jar "/home/mridula/testPrjct/sDvait-LCS/dist/sDvait-LCS.jar"
jar:
BUILD SUCCESSFUL (total time: 2 seconds)
If I could know how the file is being built. I could just add the -Xlint option so that the jar file could be created without a problem.
Netbeans uses ant to build java projects. There is a build.xml file in your project dir that handles this process.
But you have another option:
Right click your project node, choose "Properties" (a dialog box pops up). On the left choose "Compiling" and add your options in the field "Additional compiler options"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With