-2

This may be a silly question but I've just downloaded Rhino on my Windows 7 machine and I'm trying to run some of the examples. However, it says package org.mozilla.javascript does not exists

Here's the exact context (running through Git Bash)

Mike@WORK-MACHINE /c/users/mike/documents/rhino/examples
$ javac RunScript.java
RunScript.java.7: package org.mozilla.javascript does not exist
... Error stuff ...
6 errors

What am I doing wrong here?

Mike Cluck
  • 31,869
  • 13
  • 80
  • 91
  • Have you forgotten to include a directory on your classpath? Possible duplicate: http://stackoverflow.com/questions/6375179/java-package-does-not-exist-error – Duncan Jones Nov 16 '12 at 15:34
  • I couldn't tell you. I've written in Java before but it's far from my forte. I can try looking in to that. – Mike Cluck Nov 16 '12 at 15:35
  • @DuncanJones Oh man, don't I feel silly lol If you post that as an answer I'll accept it. Thanks for exposing my ignorance :). – Mike Cluck Nov 16 '12 at 15:38

1 Answers1

1

It's likely you've missed a directory from your classpath. Try something like the following:

java -cp /some/dir/ RunScript.java

where /som/dir/ contains the definition of the package you need.

Duncan Jones
  • 67,400
  • 29
  • 193
  • 254