Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to recompile with -Xlint:unchecked?

I keep getting this message in BlueJ/Java.

http://cache.gyazo.com/19c325e77bbc120892d1035dcfda5377.png

I know there are several other questions like this already on StackOverflow, but none of the answers were specific enough for me, a Java noob. For example, one of them said to add something on the javac command line," and I have no idea what is that. So use that information to know how specific you must be with me. Sorry. Thanks!

like image 394
viggom555 Avatar asked May 30 '12 20:05

viggom555


People also ask

How do I recompile with make?

Use the command `make' to recompile the source files that really need recompilation. Make the changes in the header files. Use the command `make -t' to mark all the object files as up to date. The next time you run make, the changes in the header files do not cause any recompilation.

What is recompile with Xlint in Java?

By "recompile with -Xlint", the compiler means to inform you that you need to recompile your program like this: javac -Xlint abc.java. If you do so, the compiler will tell you which methods are deprecated so you can remove your calls to them.

How do I recompile a Java project?

Open a command prompt window and go to the directory where you saved the java program. Assume it's C:\. Type 'javac MyFirstJavaProgram. java' and press enter to compile your code.

What does it mean to recompile a program?

Meaning of recompile in Englishto compile a computer program (= change it into a machine language) for a second, third, etc. time: It should be able to run all modules already released without requiring developers to recompile their code.


2 Answers

open up command prompt in the directory with your source files. then type javac -Xlint:unchecked *.java

like image 135
Epicblood Avatar answered Sep 28 '22 00:09

Epicblood


Please refer to the BlueJ FAQ which has the exact answer.

Edit: Sorry for the runaround. This is what the FAQ says for Windows. Go to your Bluej installation directory and open lib\bluej.defs file. Then go to the section that says bluej.windows.vm.args and add the value the other user said.

So you have:

bluej.windows.vm.args=-Xlint:unchecked

I would listen to paulsm4's advice and start learning from command-line if you really want to understand java. This is the best I can do.

like image 43
user845279 Avatar answered Sep 28 '22 01:09

user845279