Your hunch on the classpath is correct, the one modification you need to
make to the commandline is to add the argument -cp foo.jar (where foo.jar is
the rhino jar):

java -cp [jar-file] [classname] [arguments]
java -cp rhino.jar org.mozilla.javascript.tools.shell.Main [options]
script-filename-or-url [script-arguments]

Alternatively, if the jar is built with the MainClass file specified in its
manifest (which you can determine by simply trying the command), you can run
it with:

java -jar [jar-file] [arguments]
java -jar rhino.jar [options] script-filename-or-url [script-arguments]

Marcello

On Tue, Sep 8, 2009 at 9:34 AM, mckyj57 <[email protected]> wrote:

> In downloading and inspecting Rhino from mozilla.com, I see no
> documentation regarding installation. Going to the web site, I see no
> section on installation. There is no INSTALL or README file. The
> index.html in the javadoc/ directory has no mention of installation.
>
> How is one to use this tool to do something as simple as syntax-
> checking
> a script segment in an editor. For instance, with vim and perl you can
> highlight a code segment and do:
>
>   !perl -wc
>
> I simply want to be able to do that for Javascript to catch those
> stupid
> syntax errors you are bound to have from so many levels of bracket.
>
> (Yes, I know about syntax coloring and definitions. I want more.)
>
> P.S. At the risk of alienating people here, I will speak my two cents.
> This is not the first time I have had this problem with an
> application written in Java. To my mind this is one of the constant
> lacks in Java-based applications. There is rarely an installation
> nor a regular command line script available for simple use. What is
> the deal? Is there some sort of initiation that Java people want to
> wreak on the world? Are you not deemed worthy enough to use Java
> apps if you haven't gone through some rite of passage? I am not
> surprised at the lack of traction Java has, based on this
> unfriendliness.
>
> --
> Mickey
>
> I don't want to get to the end of my life and find I have just
> lived the length of it. I want to have lived the width of it as
> well. -- Diane Ackerman
> _______________________________________________
> dev-tech-js-engine-rhino mailing list
> [email protected]
> https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino
>
_______________________________________________
dev-tech-js-engine-rhino mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-js-engine-rhino

Reply via email to