Actually I am using the Rhino plugin in Eclipse. To use a Java class in JavaScript there is no problem when I just use class which is in RT.JAR.
But whenever I want to use my class' "custom classes" then the problem begins due to the classpath.
Steps made by me
The error
js: uncaught JavaScript runtime exception: ReferenceError: "Temp" is not defined.
JavaScript file
importPackage(java.lang);
importPackage(Packages.my);
var a=new Temp();
System.out.println(java.lang.System.getProperty("java.class.path"));
My view :-
ECLIPSE_HOME
, JRE_LIB
, JRE_ext
. So only the value of these variables are used by the Rhino debugger.classpath
by using the Systemclass
function, and then only print the classpath of the Rhino JAR file which is in the Eclipse/plugin folder.Now, what should I do?
The problem has been solved. The edited source of Rhino is uploaded back to Eclipse, so soon it may be the part of Eclipse.