[598] in java-interest

home help back first fref pref prev next nref lref last post

Exceptions and Native Methods...

daemon@ATHENA.MIT.EDU (Raymond Harrison - TCI/AIT)
Wed Jul 5 21:05:53 1995

From: rharriso@elmer.tcinc.com (Raymond Harrison - TCI/AIT)
To: java-interest@java.Eng.Sun.COM
Date: Wed, 5 Jul 1995 18:17:54 -0600 (MDT)

Hello and Help!
	
When my program compiles, the following message comes at
runtime....

java.lang.IncompatibleClassChangeException sybase.SybInterface: method SybRes()V not found
        at SybTest.main(SybTest.java:34)

	I must admit that I have used C more than
C++, and my knowledge of OBJECT methodolgies is
just beginning to grow... so please bare with me -
I learn fast.
	Anyway, I have an interface written in JAVA
which calls a native method, written in C, which calls
DBLIB routines, which when returns an argument containing
an array of results (The native interface calls this 
HArrayOfStrings)... This is passed as a function argument.
This function is called SybRes and takes a String[] argument.
The definition as found in my interface file is as follows:

	public native void dbresults(String str[]);
	.
	.
	public void SybRes(String str[]) {
		dbresults(str);
		return;
	}
The "Test" program calls this routine in the 
following manner.....

	public static void main(String args[]) {
	SybInterface syb = new SybInterface();
	String[] MyString={"AAAAAAAAAAAAAAAAA","BBBBBBBBBBBBBBBBBBB","CCCCCCCCCCCCCCCCC"};

-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com

home help back first fref pref prev next nref lref last post