views:

63

answers:

1

Hello, I want to create a java class in a script file (javax.script). please help

+1  A: 

Have you tried Google?

First 2 results:

http://java.sun.com/developer/technicalArticles/J2SE/Desktop/scripting/

http://java.sun.com/javase/6/docs/technotes/guides/scripting/programmer_guide/index.html

TheLQ
The thing that I want to do is creating a class in the script (in my script file, and use it like a java class) this is all what I need. I don't want to import a class from my project, but I need to create it in the script. how to do ???
taichimaro
The best that you can do is create a Javascript object, cast it to invokable, and do it from there. However unless your doing some kind of plugin system, you are kinda breaking some OOP rules
TheLQ