Re: loadjava and Java version




MountainOaf@xxxxxxxxx wrote:
Hello,

I'm trying to upload a Java class into an 8.1.7 database as a Java
Stored Procedure. I issue the following command:

loadjava -u <user>/<pass> -v -resolve MyClass.java

The following error is displayed:

ORA-29535: source requires recompilation
MyClass:61: Method split(java.lang.String) not found in class
java.lang.String.

The error refers to the following line of code:

String[] response = returnString.split(",");

The variable returnString is a String. After doing a "java -version"
and finding that the server is running version 1.5.0_01, I checked the
1.5 API and found that there *is* a method called "split" in the class
java.lang.String.

So, I'm confused as the class has such a method, yet Oracle seems to
think that it does not. Any ideas as to what am I doing wrong?

Thanks for any assistance.

Oaf

Oracle 8.1.7 uses Java version 1.2.1. String.split() was introduced in
Java version 1.4.1. Look at using StringTokenizer().

Regards
/Rauf

.



Relevant Pages