[fpc-pascal] Create and use a wrapper class in java

Ewald ewald at yellowcouch.org
Sun Apr 27 23:52:25 CEST 2014


On 27 Apr 2014, at 23:40, fredvs wrote:

> Hello Stephano.
> 
>>> Did you put each class in a separate file? 
> 
> Yes, of course, it is the goal :
> => a separate wrapper class (TheWrapper.java), with all the methods defined
> to use the library,
> => and the main class (test.java) who uses that wrapper class.
> 
> So, the same wrapper class way be used by other main class...
> 
> But impossible to find how to do that... ;-( 

Just a guess here, but what command did you use to "run" the `main class`? Something like `java test` of rather `java TheWrapper`? From the message you get it seems to me you ran the latter. If true then try the former. Finally, instead of immediately going for the JNI approach, try to get the wrapper class working with something that simply prints something to stdout (System.Out.println() if I'm not mistaking?). Your chances of getting help with some extremely simple bit of java code are a lot better that case IMHO.

--
Ewald




More information about the fpc-pascal mailing list