• Post Reply Bookmark Topic Watch Topic
  • New Topic

JNI, Invokation & Exceptions

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helo!
This is legal in normal way to run Java:

Exception is caught and handled inside JVM. But when I run this through JNI Invokation nobody seems to be takin care of raised exception. At least nothing gets printed. Now when I add exception handler:

then the raised exception seems to be caught in JNI Invokation as well.
What should I do? It seems that VW created via JNI "lacks" some of the behaviour of exception handling. Are there some initargs to do this? Should I mark each and evry exception on my code to be called from JNI Invokation.
Please help, thank you.
------------------
Antti Barck
It Solutions Consultant -- NSD Oy
Sun Certified Programmer for the Java™ 2 Platform
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JNI gurus here, anyone?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Excusez moi, but is this topic in right forum or what?
 
Jamie Young
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is wrong with using it the way that it works?
Why would you use a try without a catch?
It should not even compile without a catch, Right?
What is the point of trying to throw an exception that never gets
a catch?
Maybe I am just mis-understanding you.
You might want to check the moose lodege for other forums.
This Forum is about Daniel and Jess's book. Java security and the issues that associated with it.
------------------
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helo Jamie!
You are missing the point. The code just happens to be throwing, but in JNI Invokation I cannot run methods that throws something but I rather have to try and catch. This works nice for the code I write but whatabout code that is in some.mystic.class?! Go figure...
------------------
Antti Barck
It Solutions Consultant -- NSD Oy
Sun Certified Programmer for the Java™ 2 Platform
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helo again!
Are there any other opinions for this?
------------------
Antti Barck
It Solutions Consultant -- NSD Oy
Sun Certified Programmer for the Java™ 2 Platform
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!