Question about Oracle and Java......

From: Bobak, Mark <>
Date: Thu, 28 May 2009 10:26:38 -0400
Message-ID: <>

Hi all,

I need a bit of help/advice/information with respect to Java/Oracle/JDBC. Note: I'm *NOT* a Java guy. I've never coded a line of Java in my life, I haven't a clue what's the difference between a Java bean and a servlet, a JRE and a JDK, etc... Back when I was writing code, there was one language to know, C. As Mogens would say, "I am legacy!"

So, having said that, I have a question, which may seem a bit na´ve. Although I don't have any Java knowledge, I have a feeling that the information I'm being fed doesn't quite smell right.....

Here's what's going on:
Environment is RHEL4 U6, x86-64, w/ Oracle and

Developer comes to me and says, I need Java 1.5 or 1.6, the server only has 1.4.2 installed. I check, and sure enough, /usr/bin/java is: pqrac201:[refpep1]:(/oracle/product/11.1.0/db):$java -version java version "1.4.2"
gcj (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9) Copyright (C) 2006 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

So, RHEL4 U6 comes w/ 1.4.2 installed. That's not entirely surprising, RHEL4 has been around for a while. I suspect I can find a 1.5 or 1.6 RPM somewhere, but, I know enough to know that recent releases of Oracle come w/ a JRE in the ORACLE_HOME. I tell the developer, what if you use the JRE in the 11g ORACLE_HOME, that's already installed, and it's 1.5: pqrac201:[refpep1]:(/oracle/product/11.1.0/db/jdk/bin):$./java -version java version "1.5.0_11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) Java HotSpot(TM) 64-Bit Server VM (build 1.5.0_11-b03, mixed mode)

So, he goes off and does that, and I assume he'll be happy using that version of Java. Now, this is where I start to smell a problem. He comes to me and says, ok, fine, but I need you to copy this ojdbc14.jar file to /oracle/product/11.1.0/db/jdk/jre/lib/ext. This strikes me as odd. I'm not in the practice of copying "foreign" files into an installed ORACLE_HOME. A little poking, and I realize that the current Java 1.5 installed under ORACLE_HOME has various ojdbc*.jar versions installed.

pqrac201:[refpep1]:(/oracle/product/11.1.0/db):$find . -name ojdbc\*.jar

So, I'm wondering why one of the included ojdbc*.jar files that's already included aren't good enough. Additionally, from a bit more digging, I realize that ojdbc14.jar is for Java 1.4, where as ojdbc5.jar is Java 1.5 (or 5.0) and ojdbc6.jar is for Java 1.6 (or 6.0).

So, I guess my question is, should I be pushing back and telling the developer he doesn't need ojdbc14.jar, and should be using ojdbc5.jar? If so, which ojdbc5.jar? (the one in O_H/jdbc/lib?)

Sorry if this is a trivial or na´ve question, but, I just don't have the Java knowledge or experience to fully understand how the pieces fit together. But it seems to me that copying ojdbc14.jar (part of Java 1.4) into a Java 1.5 installation is bad, wrong, and nonsensical.

Can someone who writes Java code in their sleep confirm the proper course of action here?


Received on Thu May 28 2009 - 09:26:38 CDT

Original text of this message