I have 2 JAR files coming from an SDK that I have to use.
Generation problem
I succeeded in generating the first .pas
file, but Java2OP fails to generate the second .pas
I need, with the message
Access violation at address 0042AF4A dans the 'Java2OP.exe' module. Read at address 09D00000
Would this come from a common issue? There's no other hints about what causes the problem in the SDK .jar
.
I'm using Java2OP located in C:\Program Files (x86)\Embarcadero\Studio\18.0\bin\converters\java2op
, but I had to first use the solutions in Delphi 10.1 Berlin - Java2OP: class or interface expected before generating the 1st file.
Compilation problem
Anyway, I tried to generate a .hpp
file from the generated .pas
.
I don't know much about Delphi. Does the problem come from the SDK itself, or the generation of the .pas
file?
1st issue solved
Java2OP included Androidapi.JNI.Java.Util
and not Androidapi.JNI.JavaUtil
. I had to import Androidapi.JNI.JavaUtil
myself, though it is present in the /Program Files(x86)/Embarcadero/...
folders.
2nd issue
The same 4 compilation errors happen multiple times across the .pas
file on parts using the word this
.
Do I have to replace every use of this
with self
?
Errors
E2023 The function require a type of result : Line 4 E2147 The property 'this' doesn't exist in the base class : Line 5 E2029 ',' or ':' awaited but found 'read' identificator : Line 5 E2029 ',' or ':' awaited but found number : Line 5
[JavaSignature('com/hsm/barcode/DecoderConfigValues$SymbologyFlags')]
JDecoderConfigValues_SymbologyFlags = interface(JObject)
['{BCF30FD2-B650-433C-8A4E-8B638A508487}']
function _Getthis$0: JDecoderConfigValues; cdecl;
property this$0: JDecoderConfigValues read _Getthis$0;
end;
[JavaSignature('com/hsm/barcode/ExposureValues$ExposureSettingsMinMax')]
JExposureValues_ExposureSettingsMinMax = interface(JObject)
['{A576F85F-A021-475C-9741-06D92DBC205F}']
function _Getthis$0: JExposureValues; cdecl;
property this$0: JExposureValues read _Getthis$0;
end;