[4295] in java-interest

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

Re: Exceptions from java native methods!!

daemon@ATHENA.MIT.EDU (Pradeep Badri)
Fri Dec 15 16:24:46 1995

From: Pradeep Badri <pbadri@cisco.com>
To: Ramprasad_Golla@novell.com (Ramprasad Golla)
Date: Fri, 15 Dec 95 10:54:26 PST
Cc: java-interest@java.sun.com
In-Reply-To: <s0d14a1b.051@fromGW>; from "Ramprasad Golla" at Dec 15, 95 10:11 am


Hello,

There's a native C function SignalError provided by java
which you can use to throw an exception.  When you call the function
in your C program, the program control will be transferred 
to the first catch statement which handles the exception in your java code.

However, i don't know of any function which you can use to
catch an exception in the native C mode.  You can only throw 
an exception in native code.

cheers,
-pradeep
Pradeep Badri.
Cisco Systems.

> 
> Hi Everyone,
> 
> Can native methods in Java throw exceptions?
> PlainSocketImpl class defines private native void socketCreate(boolean
> stream) throws IOException;
> I am very surprised to see this, because code for the native methods are
> in C Dlls.  First there are no exceptions in C, how does this work?
> Can any one shed some light on this?
> 
> Thanks in advance
> Ram rgolla@novell.com
> 
> 
> -
> This message was sent to the java-interest mailing list
> Info: send 'help' to java-interest-request@java.sun.com
> 

-
This message was sent to the java-interest mailing list
Info: send 'help' to java-interest-request@java.sun.com

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