java help???


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users java help???
# 1  
Old 06-06-2007
java help???

hi
i am getting following error when i tying to run cobol program that calls java code although its working fine when tried at some other location.

error:
Exception 65538 not trapped by the class javaexceptionmanager.
Description: "Java runtime exception"
Method 'setVal' with signature Ljava/lang/String; not found
Hit T to terminate program. Hit any other key to continue.


after i press enter it works fine.
this is the java code

Code:
   class CallExample1 {
   private int x;

   public CallExample1(){
        this.x=0;
   }

   public CallExample1(int value){
        this.x=value;
   }

   public void setVal(int value){
        this.x=value;
   }

   public int getVal(){
        return this.x;
   }
}

i was confused in which section i should put this question......if this is not the rigth section mods plz move it to appropriate section.
# 2  
Old 06-06-2007
Quote:
Originally Posted by zedex
Method 'setVal' with signature Ljava/lang/String; not found
Hit T to terminate program. Hit any other key to continue.
Are you using JNI? By the way, the message seems to suggest setVal() is a method which accepts a String object, but setVal() in your code accepts an int. Probably this is why the message comes up?
Login or Register to Ask a Question

Previous Thread | Next Thread
Login or Register to Ask a Question