Newbie- java


#1

I am evaluating the java version of words.

I need to call the methods from my DB application (4th Dimension). There is a plugin for 4D that allows me to call java methods. I can call sample methods from other jar files, but not from aspose.words.jar.



In my test I am simply trying to instatiate a document.



The plugin syntax is: JEX Call class method ( ClassName; MethodName; Params ) --> Status



In parameter 1 I am to pass the class name, then in 2 the method name. Params is an array of pointer, where each element is a pointer to another data object containing the various parameters.



I’m pretty sure my problem is in params 1 & 2. I’m guessing I’m not calling it right, cause I get an error from my plugin: Invalid class name.



Here is my call:



$Err:=JEX Call class method (“com.aspose.words”;“Document”;$Parameters)



My plugin works calling some other sample .jar files I have, and the aspose.words.jar file is installed in the same place.



Does anything look wrong to anybody? Is there some other call to aspose.words that I need to call first? From the examples it looks like they start write off creating a blank document.



Thanks.


#2

Looking at your example

"com.aspose.words" is not a class name, its a package name.

"com.aspose.words.Document" is a full class name. "Document" is not a method name.

How do you call a constructor using your jex? Essentially you need to do this:

Document doc = new Document();

or

Document doc = new Document("path and filename.doc");