How to use java inner class by JavaScript?

46 views
Skip to first unread message

rui chen

unread,
May 7, 2015, 10:23:11 AM5/7/15
to mozill...@googlegroups.com
I have successfully created an object of class Out. But how to use the inner class In by javascript??

//java
public class Out{
   
public static class In {
       
public String test = "Hello";
   
}
}
//use inner class
Out.In in = new Out.In();
System.out.print(in.test); // successful!!


//js
var in = new Out.In(); // error here.


Error Message:
org.mozilla.javascript.Undefined@55516dbb is not a function, it is undefined

I have post my question on StackOverflow. Here is the Link

Thanks!!

Evgeny Shepelyuk

unread,
May 8, 2015, 2:51:56 AM5/8/15
to mozill...@googlegroups.com
Replied @ StackOverflow :)

четверг, 7 мая 2015 г., 17:23:11 UTC+3 пользователь rui chen написал:
Reply all
Reply to author
Forward
0 new messages