I can't get some of the examples from the Rhino tutorials to work. I
specifically want to figure out how to create a simple Java object be able
to call it from within a javascript. I downloaded the Rhino source version
rhino1_7R1 and I'm trying to run some of the example commands from a Windows
cmd prompt.
I was able to get the commands to work that create a Java frame that pops up
a window with an OK button. What I want to get working is the Counter
example. Here's my results...notice I had to add the .; to get the
classpath to work.
C:\Rhino>java -cp '.;js.jar;examples'
org.mozilla.javascript.tools.shell.Main
Rhino 1.7 release 1 2008 03 06
js> defineClass("Counter")
js: "<stdin>", line 2: Class "Counter" not found.
at <stdin>:2
js>
I'm able to compile the CounterTest.java file and execute it which created a
Counter.class file. I've tried copying the Counter.java and Counter.class
files up into the directory I'm executing from...I just can't find anything
that get's this counter class to work from the shell or from within a .js
file.
Gil
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino