[1138] in java-interest
Passing Object base class as a parameter
daemon@ATHENA.MIT.EDU (Imran Balkhi (NT))
Thu Aug 24 23:44:13 1995
Date: Wed, 23 Aug 1995 17:08:03 -0700
From: ibalkhi@dnt.dialog.com (Imran Balkhi (NT))
To: java-interest@java.sun.com
Hi,
I tried to pass Object base class as a parameter to a native function. However, java compiler could not find Object class. I am providing java code and error message. Please if somebody has any idea please let me know.
Note: I was able to pass user defined classes as parameter to native function.
// Java Code
class Reg {
public static native long regC(Object xx); // Create a shadow object
public static native long unregC(Object yy); // Delete a shadow objec
}
//Error Message
final.java:5: Class object not found in type declaration.
public static native long regC(object xx); // Create a shadow object
^
final.java:6: Class object not found in type declaration.
public static native long unregC(object yy); // Delete a shadow objec
^
Note: "The Java Language Specification", Release 1.0 Alpha3, on page 7 dicusses about Object base class. I also tried to extend my class with base class but it did not work.
e.g.,
class Reg extends Object {
}
gave me the following error:
final.java:6: Super class object of class Reg not found.
class Reg extends object {
^
Thank's
Imran
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com