Background: JDK was installed the other day and corresponding environment variables were set. JDK installation path C: ProgramFilesJavajdk1.6.0 _ 25JDK environment variable: JAVA_HOMEC: Export, jav
Background: JDK was installed the other day and corresponding environment variables were set. JDK installation path C:/Program Files/Java/jdk1.6.0 _ 25 JDK environment variable: JAVA_HOME = C:/Program Files/Java/jdk1.6.0 _ 25 CLASSPATH = .; % JAVA_HOME %/lib/dt. jar; % JAVA_HOME %/lib/tools. jar path java.exe, jav
Background:
JDK was installed the other day and corresponding environment variables were set.
JDK installation path C:/Program Files/Java/jdk1.6.0 _ 25
JDK environment variables are as follows:
JAVA_HOME = C:/Program Files/Java/jdk1.6.0 _ 25
CLASSPATH =.; % JAVA_HOME %/lib/dt. jar; % JAVA_HOME %/lib/tools. jar
Add the path of java.exeand javac.exe in path; % JAVA_HOME %/bin
Prerequisites
Oracle also has a JDK, Directory D:/oracle/product/10.2.0/db_1/jdk, and the path d exists in the PATH environment variable: /oracle/java/bin/the JDK path that comes with oracle
Problem
Oracle services can be started normally. When you open the WEB interfaces of OracleEM and isqlplus in a browser, the connection fails. Check the emctl status at the command prompt and enter the command emctl status dbconsole. The result fails, prompt to view oracle logs. Enter the oracle log folder, path D:/oracle/product/10.2.0/db_1/Host Name _ SID/sysman/log folder, and open emdctl (oracle enterprise manager 10g database control) the log file prompts the following:
20:43:49 Thread-2544 WARN http: snmehl_connect: connect failed to (SUN-PC: 3938): No connection cocould be made because the target machine actively refused it.
(Error = 10061)
If the log file is viewed, the target host rejects the connection. Considering that the environment variable PATH contains the jdk path that comes with oracle, I set JAVA_HOME = C:/Program Files/Java/jdk1.6.0 _ 25 in the environment variable, this will cause oracleEM and iSQLPLUS to encounter an error when reading the configuration file, that is, reading the java jdk environment variable by mistake instead of the JDK path that comes with oracle. That is, the JDK path where JAVA_HOME misleads oracle to read errors. Therefore, we need to change the environment variable settings so that oracle can read the data correctly.
The solution is to change the java jdk environment variable settings, delete JAVA_HOME, and change CLASSPATH = .; c:/Program Files/Java/jdk1.6.0 _ 25/lib/dt. jar; C:/Program Files/Java/jdk1.6.0 _ 25/lib/tools. in jar, change the jdk path to C:/Program Files/Java/jdk1.6.0 _ 25/bin.
After such changes, oracleEM and iSQLPLUS can be opened on the browser.
Refer to the article http://topic.csdn.net/u/20090222/20/0ff645fb-5a3f-430f-b0d0-f7519286c6f3.html replies inside the lpc19598188 proposed a solution, tried it, there is a setup error, because of the file path problem, hehe, this did not understand, something installed on your computer is messy ......
PS: oracle has a JDK environment. When setting the JDK for the Java language development environment, the JAVA_HOME setting causes oracle to incorrectly read the Java JDK, that is
The EM cannot be opened normally because the wrong path is read.
It took more than two hours to solve and summarize the problem !!! I want to improve efficiency