Getting started

167 views
Skip to first unread message

Joseph Sullivan

unread,
May 22, 2022, 2:48:01 PM5/22/22
to mozilla-rhino
I am trying to get started in Rhino without the benefit of Node.js, IntelliJ, or just about any modern tool.  I have access to Java, Python, C# and visual studio.

I need to access Rhino through the command line and through Rhino, access a proprietary Java package that I don’t have direct access to.

Would appreciate any assistance you can provide.


Joe

P

unread,
May 23, 2022, 3:39:07 AM5/23/22
to mozilla-rhino
If you want to use RHino from the commandline, you can use the Shell that ships with Rhino.

However: when you say you want to access a Java package you don't have direct access to, I'm wondering what you're trying to do and whether Rhino will helps you with that: In Rhino you can access Java packages/classes IF the encapsulation of those packages/classes would allow you to access them in plain Java as well

Beethoven63 Sullivan

unread,
Feb 18, 2023, 11:08:47 AM2/18/23
to mozilla-rhino
So far, I can use the following line to start rhino as long as I am in the correct directory.

java -jar ./buildGradle/libs/rhino-master-1.7.15-SNAPSHOT.jar -debug -version 200

However, I need to run it completely automatically.  So, I would like to use c# to access the rhino, but I want to pass a script to rhino and have rhino pass data back in the form of a file or object.  

Is this possible?

Joe

Beethoven63 Sullivan

unread,
Feb 19, 2023, 5:52:58 AM2/19/23
to mozill...@googlegroups.com
There is a separate development team that is providing an API through Rhino.

So, it looks like I need to generate rhino scripts from c#, then pass the script through the command line to Java.

There is a tutorial on 'embedding' within the rhino docs, which I am trying to understand.

Joe



--
You received this message because you are subscribed to a topic in the Google Groups "mozilla-rhino" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mozilla-rhino/sN8tYpFkWtY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mozilla-rhin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mozilla-rhino/098f8f7b-8736-4075-8dcc-79aa2f17ba83n%40googlegroups.com.

P

unread,
Oct 23, 2023, 9:12:51 AM10/23/23
to mozilla-rhino
Sry for the late reply

If you say you want to execute this from c#, I assume you'll want to execute something commandline and get the results back somehow

Using the shell as you've already done, you can pass in a script or a string of javascript code to execute, see https://rhino.github.io/tools/shell/

The javascript code you author can either write output to stdout or write a file to disk that you can then pick up.

The tutorial on 'embedding' is about enbedding Rhino inside Java, which I assume is not what you want to do 

Reply all
Reply to author
Forward
0 new messages