1 Reply Latest reply: Dec 14, 2009 2:43 AM by 807580 RSS

    Calling method in wrapper class in packaged jar causes EXCEPTION_ACCESS_VIO

    807580
      i am developing a smart card solution in windows and got a driver whic can only run in non-packaged classes. To by-pass this, i compiled the JNI calling class and the wrapper class in version 1.3.1 and created a jar file. This jar file i included it in libraries in my app in version 1.6. The wrapper class has two inner classes which i need to call but on running it causes
      # An unexpected error has been detected by Java Runtime Environment:
      #
      #  EXCEPTION_ACCESS_VIOLATION........
      The following is the structure
      package com.x.y;
      class WrapperClass{
      
           public class class1{
               public class1(){
      
              }
              public mwthod1(){
      
              }        
          }
         
          public class class2{
               public class2(){
      
              }
              public mwthod1(){
      
              }        
          }
      }
      i compile with 1.3 this class and put it in a jar which i include in the following app in jdk1.6
          com.x.y.WrapperClass.class1 myClass = com.x.y.WrapperClass.class1();
      The above says "class1" is not accessible and if i create an instance of it inside WrapperClass, it doesnt compile and complains
      class com.x.y.WrapperClass$class1 not found

      How can i access class1 as above? Please assist
        • 1. Re: Calling method in wrapper class in packaged jar causes EXCEPTION_ACCESS_VIO
          807580
          For one thing you know that the methods in the inner classes aren't declared correctly, right? No return values.

          Those nested classes are inner classes, which means that they have a reference to the nested class, and so you can't instantiate them without one.

          Apart from that... it's impossible to diagnose your issue without more info. Try writing a small, self-contained, compilable (or as close as you can come to it) example, that expresses the issue you're having. And post that and any error messages.