Hello All,
Did you ever tried to check the Java version installed in your machine after a long long time(say a year)? Well if yes then there can be two cases
CASE 1: The version is same as before or may get updated (if regularly updated through web)
CASE 2: The version is lesser than the initially installed version (say I installed a time back 1.6 and somehow today I found it as 1.4 :-o)
PROBLEM: No tensions in case of CASE 1 but second case might occur if you have installed any software that provides JDK also in its package. For example, Oracle BI Publisher. Majority of the time it happens with oracle products because Oracle also provides its own JDK . Now what happens when you actually install any such Oracle products then value of "bin" directory path of "JDK" in "PATH" variable under "Environment Variables" is over written by Oracle's JDK so then whenever you check out the version of JDK installed in your system at command prompt then it will show you the version of JDK provided by recently installed software(specifically oracle products).
EFFECTS:
1. This problem may affect compile time failure of your JAVA programs(those compiled through command prompt only) if version of Java program to be compiled is higher than shown JAVA version in command prompt.
2. If you are using any IDE (assuming installed before new software) for compiling Java program then it will not reflect any changes as when you have installed that IDE tool (say Netbeans) then it autimatically takes actual JDK installed directory path(say JDK1.6)
SOLUTION: To avoid above problem, just you need to do one simple thing , open "Environment Variables" setting Dialog box [Right Click My computer -> Properties->Advanced System Settings->Environment Variables tab] and Edit "Path" varibale in "System variables" heading. You will find that in the starting your Oracle product's jdk would have been added. So remove it from there and append it at the end instead of keeping it in starting. e.g. [C:\OraHome_1\jre\1.4.2\bin] entry is transferred at the end in "Path" variable. Click OK and Apply and OK.
Now open command prompt and check Java version - it will show correct version of Java installed in your system
Feel free to add or correct information. :)
Thanks !
