KimHJ 2 Posted November 8 I create a JavaInterface file using java2op, but I have problems when I use it. I have attached the JavaInterface.pas I get this error when it execute printText. First chance exception at $8689BB93. Exception class EJNIFatal with message 'Java type recieptservice/com/recieptservice/PrinterInterface could not be found'. Process ComcaH10.apk (6409) What is missing? Tanks for any help. uses JavaInterfaces; procedure TMainForm.PrintThis; var Myprinter: JPrinterInterface; begin MyPrinter := TJPrinterInterface.Create; MyPrinter.printText(StringToJString('This Is A Test')); MyPrinter.endWork; end; JavaInterfaces.pas Share this post Link to post
Dave Nottage 554 Posted November 8 1 minute ago, KimHJ said: Exception class EJNIFatal with message 'Java type recieptservice/com/recieptservice/PrinterInterface could not be found' That usually means you have not added the required .jar file (the one you ran Java2OP on) to the project. In Project Manager: Expand the Android 32-bit target Right-click on Libraries Click Add.. Select the .jar file Click OK Note that the .jar will be compiled in regardless of whether you compile for 32-bit or 64-bit. Share this post Link to post
KimHJ 2 Posted Friday at 07:26 PM (edited) You are right, I didn't know I had to include the jar file. I have a aidl and a jar, I made the JavaInterface.pas from the aidl, do I need to add that as well? Thanks. Edited Friday at 07:28 PM by KimHJ Share this post Link to post