In the JavaScript they have an if check around EncryptPINcode and only call getRsaEncrypt3DES if that call succeeded. It might help to call getErrorString if it fails and get more details of what is going wrong. But yes, your Perl code does parallel the JavaScript code and so looks like it should work.

Anyways my guess is that you have a system administration issue more than a coding issue. For instance you may be on a Linux system, Perl is using the crap java implementation that comes out of GNU while your browser is using a better one from Sun. A sanity check is to run the command java -version and see if it says anything about the Free Software Foundation. If it does then go to http://java.com/en/, get a better version of Java, install it somewhere, then follow the instructions in the README to install Inline::Java to use that version and see if the problems go away.


In reply to Re: Problem about NullPointerException when using Inline::Java and Jar file by tilly
in thread Problem about NullPointerException when using Inline::Java and Jar file by macpaul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.