I have been Googling (and still am), but thought I'd just ask.
I have an application that needs a scripting language. I have
written my own interpreted language (a small subset of C++),
but am considering using Java as an alternative.
I need a hint on the following: How can I make Java use the
named objects within my application. For example, my current
language (ClearScript) might have the following code:
void foo( void )
{
Record newrec = NewRecord( 12 ); // New record of type 12.
newrec.Name = "Something"; // Change the 'Name' field of the record.
newrec.Data = Globals.Functions.Calculate();
newrec.Id = Globals.States.CurrentId++;
}
Most of these identifiers are user controlled. 'Record' is a
type that has hard-coded meaning to the application. 'NewRecord()'
is a function supplied by the application to create 'Record's.
'Calculate()' is user-written.
I would like similer code to work in Java, but I can't
find if it's possible to expose these objects to Java.
Any hints would be helpful.
William Korvine
PS: My experience with Java is minimal. I am a C++ Windows programmer.