problems with Oracle9i and Java runtime environment
Recently I've installed Oracle 9i application server into my machine. I've installed
javase 5 update 3 before. Now the problem arise after I've installed Oracle 9i.
I've set the environment path variable accordingly. Now the source files compiles accordingly with my javase 5 javac command. but problem occurs when I try to run the class file using java command. They give me the following error.
java ConnectToOracle
Exception in thread"main" java.lang.UnsupportedClassVersionError: ConnectToOrac
le (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
for your information when I check the version of javac command using the command in the command line javac -version
it tells me javac 1.5.0_03
javac: no source files
Usage: javac <options> <source files>......
but when I use java -version
it tells me java version"1.3.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_01)
Java HotSpot(TM) Client VM (build 1.3.1_01, mixed mode)
which is a older version! I've also tried...
jre
Java(tm) Runtime Loader Version 1.1.8.10
Usage: jre [-options] classname [arguments]
Options:........
this is also an older jre
now my path is set as PATH=D:\jdk1.5.0_03\bin;
but still it wont working.
BUT if I give the absolute path like this explicitly like this: D:\jdk1.5.0_03\bin\java ConnectToOracle
the programs runs fine!
I guess my Oracle 9i has its own Jre running.
I've reinstalled jdk but that didnt solve the problem.
now please tell me how to get rid of this as I want to run the file using java command comes with jdk1.5.03 and have the latest jre!
[2523 byte] By [
mr47a] at [2007-10-2 13:43:12]

> Recently I've installed Oracle 9i application server
> into my machine. I've installed
> javase 5 update 3 before. Now the problem arise
> e after I've installed Oracle 9i.
> I've set the environment path variable accordingly.
> Now the source files compiles accordingly with my
> javase 5 javac command. but problem occurs when I try
> to run the class file using java command. They give
> me the following error.
>
> > java ConnectToOracle
> Exception in thread "main"
> java.lang.UnsupportedClassVersionError:
> ConnectToOrac
> le (Unsupported major.minor version 49.0)
> at java.lang.ClassLoader.defineClass0(Native
> 0(Native Method)
> at java.lang.ClassLoader.defineClass(Unknown
> (Unknown Source)
> at
> at
> at
> at
> java.security.SecureClassLoader.defineClass(Unknown
> Source)
> at
> at java.net.URLClassLoader.defineClass(Unknown
> known Source)
> at java.net.URLClassLoader.access$100(Unknown
> (Unknown Source)
> at java.net.URLClassLoader$1.run(Unknown
> (Unknown Source)
> at
> at
> at
> at java.security.AccessController.doPrivileged(Native
> Method)
> at java.net.URLClassLoader.findClass(Unknown
> (Unknown Source)
> at java.lang.ClassLoader.loadClass(Unknown
> (Unknown Source)
> at
> at
> at
> at sun.misc.Launcher$AppClassLoader.loadClass(Unknown
> Source)
> at java.lang.ClassLoader.loadClass(Unknown
> (Unknown Source)
> at
> at
> at java.lang.ClassLoader.loadClassInternal(Unknown
> wn Source)
>
>
> for your information when I check the version of
> javac command using the command in the command line
> javac -version
> it tells me javac 1.5.0_03
> javac: no source files
> Usage: javac <options> <source files>......
> but when I use java -version
> it tells me java version "1.3.1_01"
> Java(TM) 2 Runtime Environment, Standard Edition
> (build 1.3.1_01)
> Java HotSpot(TM) Client VM (build 1.3.1_01, mixed
> mode)
> which is a older version! I've also tried...
> jre
> Java(tm) Runtime Loader Version 1.1.8.10
> Usage: jre [-options] classname [arguments]
> Options:........
>
this is also an older jre
>
> now my path is set as
> PATH=D:\jdk1.5.0_03\bin;
>
> but still it wont working.
>
> BUT if I give the absolute path like this explicitly
> like this: D:\jdk1.5.0_03\bin\java
> ConnectToOracle
the programs runs fine!
>
> I guess my Oracle 9i has its own Jre running.
>
> I've reinstalled jdk but that didnt solve the
> problem.
> now please tell me how to get rid of this as I want
> to run the file using java command comes with
> jdk1.5.03 and have the latest jre!