Subj : Problem with 'defineClass'. To : netscape.public.mozilla.jseng From : Christopher M. Balz Date : Tue Apr 19 2005 05:24 pm In fact, the 'jsdoc.js' line ('defineClass("File");') references a non-J2SE 'File' object! I thought that it was trying to reference the regular J2SE 'java.io.File' class, which is most definitely in my class path. The 'File' '.java' file for the class that the line in question is referencing in fact lives in the Rhino 'examples' directory right along with 'jsdoc.js'! It just needs to be compiled. - Chris --- Martin Honnen wrote: > > > Christopher M. Balz wrote: > > > Why would the js interpreter in Rhino (lRhino 1.6 > > release 1 2004 11 30) give the following error > message > > (note that Rhino JS is working as demonstrated by > the > > call to 'print')? > > > > js> print("Hi"); > > Hi > > js> load("c:/Program > > > Files/Java/lib/interpreters/rhino1_6R1/examples/jsdoc.js") > > js: "C:\Program > > > Files\Java\lib\interpreters\rhino1_6R1\examples\jsdoc.js", > > line 46: Class "File" not found. > > What does line 46 in jsdoc.js look like? Does it try > to load a Java > class that is not in the classpath? > > Is that jsdoc.js from the Rhino examples? Then I > think the line is > defineClass("File") > so you need to make sure the directory with > File.class is on the > classpath when you run the shell. > > -- > > Martin Honnen > http://JavaScript.FAQTs.com/ > _______________________________________________ > mozilla-jseng mailing list > mozilla-jseng@mozilla.org > http://mail.mozilla.org/listinfo/mozilla-jseng > Christopher M Balz http://treelogic-swe.com 160 Lincoln Avenue, Palo Alto, CA 94301-2437, USA (h) 650.327.0367 / (w) 650.965.2900x207 cbalz@andrew.cmu.edu christophermbalz@stanfordalumni.org chris@treelogic-swe.com ". . . / This Cabinet is formd of Gold / And Pearl & Crystal shining bright And within it opens into a World / . . . Another England there I saw / Another London with its Tower Another Thames & other Hills / And another pleasant Surrey Bower . . ." - from "The Crystal Cabinet", a poem by William Blake. .