• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.script

 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone! Happy New Year!

I have terminal emulator with a built in script editor that is similar to Visual Basic. However, the scripting language is proprietary. I'd like to wrap this script engine with the javax.script package.

However, I'm not sure where to begin. I don't even know the name of the scripting engine. I'm thinking I will probably have to implement all the interfaces.

Has anyone had a similar problem? Any advice would be greatly appreciated.
 
Rob Spoor
Sheriff
Pie
Posts: 20671
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Claude Cundiff:
However, I'm not sure where to begin. I don't even know the name of the scripting engine. I'm thinking I will probably have to implement all the interfaces.

I'm afraid so. My 1.6.0_11 JRE only has support for JavaScript; anything else would have to be added from 3rd party libraries or manually written.

Although I have no experience with the entire package, it looks like all you need to do is implement ScriptEngineFactory, and the classes it needs to return. The first seems to be quite easy, it's ScriptEngine that will be harder. Fortunately there is AbstractScriptEngine that does some of the work for you, but the bindings and evaluation you will have to do yourself.


You could try to search for examples of (open source) script engines to see how they've done it. That's all the advice I can give you.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As it turns out, I am working on an implementation for Jess right now. There's not that much to it, really. There are many example engines available here, and if you have any specific questions, I can try to help.

I started with the ScriptEngineFactory class to get a feel for things; I think that's a good approach. If you're using any decent IDE, it can generate stubs for all the methods you need to implement.
[ January 02, 2009: Message edited by: Ernest Friedman-Hill ]
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you! With this info, let me see how far I can get.

Wish me luck
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like the scripting langauge is Visual Basic for Applications (VBA)...
 
Rob Spoor
Sheriff
Pie
Posts: 20671
65
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then it would surprise me if there is no 3rd party library that already supports the VBA engine.
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Again, I do apologize for my ignorance.

The terminal emulator is RUMBA. When I go to
C:\Program Files\NetManage\Rumba\System\ScriptEngine,

I see
WDScript.exe
dlgdsn32.exe
vse.exe
vsp.exe
Enable40.dll
NMFTPDLL.dll
nmolbn.dll
nmvbhcn.dll
RumbaScriptAT.dll
VSRecorder.dll
NMFTPLog.bin
KBDMAP.CFG
AttachGlobConst.gbl
nmvbhcn.gbl
nmdialn.inc
VBA.LIA
vbabin.lia

Does this help?
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
According to the Micro Focus site, the scripting language is "VBA-Compatible". I'm not sure what that means but there's a link immediately below where it says that entitled "Click here to order now or request more information".
 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unfortunetly, I tried contacting them with no luck. Our company doesn't have any agreements with NetManage.

...we shall see what happens.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic