Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: using JServer...how to configure/use........new to this, please help

Re: using JServer...how to configure/use........new to this, please help

From: Karsten Farell <kfarrell_at_medimpact.com>
Date: Fri, 20 Sep 2002 18:03:01 GMT
Message-ID: <ppJi9.1162$w61.30241911@newssvr13.news.prodigy.com>


SlimFlem wrote:
> Karsten, thanks so much for replying. Let me explain my environment a
> little better to you. I do all my development on Windows 2000 using
> Eclipse as my Java IDE and Toad as my interface to Oracle. The actual
> Oracle database resides on the Solaris server. And this is where my
> confusion comes in...

Ok, let me be a little more specific. I operate in an environment similar to yours - Java on Win2k and Oracle on Solaris.

> I didn't really understand what you meant about generations of
> classes. Can you explain please? Also, are you saying that if my
> CLASSPATH is set correctly (as an environment variable on Windows)
> that when I do loadjava the correct dependencies will also be loaded?
> I load .class files and not .java files, does this make a difference?
> Should I do one vs. the other?

I meant generations in the sense of "inheritance". For example, we have a MD5.java class that is a "leaf node" (in that it doesn't call any other class). We have JavaDBFunctions.java and one of its methods, JPassword, calls a function in MD5.java. Therefore, JavaDBFunctions is the parent of MD5 (generation 1, so to speak). Sorry about the confusing terminology.

I always load the .java files, but according to the docs, you can load the .class files as well. There's no "good" reason for my choice ... just the way I've done it from the beginning.

> My classpath environment variable on Windows is defined as "ClassPath"
> but only contains entries for Rational stuff. Within Eclipse, I also
> add my dependencies by including external jars and making new
> Variables pointing to my external libraries.

My Win2k CLASSPATH (I don't think case matters) includes a dot (current directory at the front), which is why I 'cd' to the parent directory under which all my .java files live (c:\projects\everest, in my case) before doing the 'loadjava'.

> Any more info would be greatly appreciated.

Basically, I do the following steps to get my .java into the database:

Open an MS-DOS window on my PC (where I have the .java files). cd projects\everest

dropjava -user stuff -verbose com\lf\common\MD5.java
dropjava -user stuff -verbose com\lf\common\JavaDBFunctions.java
loadjava -user stuff -verbose com\lf\common\MD5.java
loadjava -user stuff -verbose com\lf\common\JavaDBFunctions.java
loadjava -user stuff -resolve com\lf\common\JavaDBFunctions.java

Notes:
1. The 'dropjava' is optional, but I've found it helps because sometimes Oracle gets tangled up (in spite of marketing claims, I don't think the jvm is really ready for prime time).
2. The last step ('-resolve') forces JPassword (within JavaDBFunctions) to resolve its reference to MD5.
3. The 'stuff' includes user/password_at_tns_alias.

Hope this explains it a little better. Received on Fri Sep 20 2002 - 13:03:01 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US