• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

JNI, Invokation & Exceptions

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JNI gurus here, anyone?
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Excusez moi, but is this topic in right forum or what?
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic