My java is 1.5.0 & javac is 1.6.0_24, does it mean that my Java installation is inconsistent?
I am on Debian Squeeze. My java is 1.5.0 & javac is 1.6.开发者_C百科0_24, does it mean that my Java installation is inconsistent? what is the latest package I should be having?
Checkout alternatives
It seems your different java programs are pointing to different executables. Debian uses a redirect with links for program for which alternative implementations exists, like java with the gcj, kaffe, sun-java5 and sun-java6, openjdk, ...
In the past you had to swap them all individually with the update-alternatives program.
I recollect there was something to do it all at once now : update-java-alternatives. It is aprt of the java-commons package. see also this post
sudo update-java-alternatives -l
shows you which java versions are installed
sudo update-java-alternatives -s java-6-openjdk
would set all java related programs to point to the openjdk version.
Typically there is a gui tool to help you do this. On my Ubuntu (also debian based) system it System --> Administration --> Alternatives Configurator.
Maybe you have 2 JDKs installed?
BTW, what does "my Java is 1.5.0" mean? Maybe you have a 1.5.0 JRE with a 1.6.0_24 JDK?
Yes it's and your JRE version should be >= JDK to avoid any inconsistencies.
精彩评论