1 Replies - 458 Views - Last Post: 19 January 2012 - 10:40 AM Rate Topic: -----

Topic Sponsor:

#1 digithree  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 35
  • Joined: 20-September 07

How to import my own classes in Rhino

Posted 19 January 2012 - 10:38 AM

I hope it's okay to post this here, there's no Rhino specific forum and the Javascript forum is just for web programming it seems.

I'm trying import my own classes into Rhino and I'm running into some difficulty.

I'm using windows 7 and starting the Rhino command line with this

java -cp .;C:\path\myClasses.jar -jar js.jar
So far so good, I get the prompt. But I can't seem to use the classes. I've tried

Packages.java.mypackagename.MyClass.Method()

and also

importPackage(Packages.java.mypackagename)
MyClass.Method()

which also doesn't work. I've also tried ommiting mypackagename because I don't know if that's needed (eclipse forces lower case package names by default, is that important?)

What am I not getting right here?

Is This A Good Question/Topic? 0
  • +

Replies To: How to import my own classes in Rhino

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon


Reputation: 7517
  • View blog
  • Posts: 28,881
  • Joined: 27-December 08

Re: How to import my own classes in Rhino

Posted 19 January 2012 - 10:40 AM

*Moved to Other Languages*
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1