Yesterday, I put on Oracle9i's database, and then wrote a small program with JCREATOR, tested JDBC to connect Oracle9i, and then opened Eclipse, and wanted to start writing, but Eclipse didn't start, Out of a mistake, I found a log file, it should be that the JDK version is wrong, it is 1.3.1, and starting Eclipse3.0, I need 1.4 JDK.
I was stupid, I originally installed the JDK of 1.4.2, and then installed JBuilder9. Because JBuilder9 brought a JDK, I suspect that two JDKs I was born, deleted the JDK that I installed. Then point Java_Home points to JDK with JBuilder in the user-level environment variable, at this time, the Eclipse is completely normal! ! !
I ate a meal at noon, put it on Oracle9i in the afternoon, and starting Eclipse how it is not normal? Also said that JDK version is wrong
So I cmd to the console, Java -Version, and sure, showing the current JDK version is 1.3.1, I will return to the setting interface of the environment variable, check it, my environment variable is not a wrong, all point to JDK1.4 comes with JBuilder9, what is the problem?
Through multiple experiments, I finally know where my problem is.
My environment variable is set in the user level, and in the system-level environment variable, a PATH variable automatically generated when there is ORACLE9I, pointing to the JDK / bin directory of Oracle9i, and the JDK comes with Oracle9i is 1.3.1 Version! !
That is, because of the system-level environment variable, PATH points to the 1.3.1 version of JDK, I am shielded in the settings made in the user-level environment variable, the system only uses the 1.3.1 version of JDK by default. In
Therefore, it is strongly recommended that everyone sets the environment variables, it is defined in the system level. I felt that the user-level variables were less, it seems to be more clear, and I used to define in user-level, now this is a bad habit.