Watch, Follow, &
Connect with Us

Please visit our new home
community.embarcadero.com.


Welcome, Guest
Guest Settings
Help

Thread: Java2OP - class or Interface expected error



Permlink Replies: 3 - Last Post: May 21, 2017 9:26 PM Last Post By: Eli M Threads: [ Previous | Next ]
İbrahim Ak

Posts: 23
Registered: 5/23/16
Java2OP - class or Interface expected error
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 27, 2016 2:04 PM
Hi; I created a JAR file in Android Studio. I converted the jar file with Java2OP.exe. But I get the error and .pas file not exists.

Command for Java2OP : Java2OP.exe -jar ..\libmylib.jar -unit ..\Androidapi.JNI.MyLib
Output:
Warning: error opening ReservedWordsOP.txt
Warning: error opening ReservedWordsC.txt
Parsing xml: C:\Program Files (x86)\Embarcadero\Studio\18.0\bin\converters\java2op\bootclasses.xml
Parsing jar: ..\libmylib.jar
class or Interface expected

Why I get the error?
My Java Code in Jar file:
package com.example;

public class Test
{
public String work()
{
return "Hello World!";
}
}

Thanks.
Synaptica Srl U...

Posts: 14
Registered: 6/26/08
Re: Java2OP - class or Interface expected error
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 18, 2017 7:44 AM   in response to: İbrahim Ak in response to: İbrahim Ak
İbrahim Ak wrote:
Hi; I created a JAR file in Android Studio. I converted the jar file with Java2OP.exe. But I get the error and .pas file not exists.

Command for Java2OP : Java2OP.exe -jar ..\libmylib.jar -unit ..\Androidapi.JNI.MyLib
Output:
Warning: error opening ReservedWordsOP.txt
Warning: error opening ReservedWordsC.txt
Parsing xml: C:\Program Files (x86)\Embarcadero\Studio\18.0\bin\converters\java2op\bootclasses.xml
Parsing jar: ..\libmylib.jar
class or Interface expected

Why I get the error?
My Java Code in Jar file:
package com.example;

public class Test
{
public String work()
{
return "Hello World!";
}
}

Thanks.

I got the same problem!!

Erik Salaj

Posts: 135
Registered: 12/23/11
Re: Java2OP - class or Interface expected error
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 19, 2017 8:13 AM   in response to: Synaptica Srl U... in response to: Synaptica Srl U...
Hi; I created a JAR file in Android Studio. I converted the jar file with Java2OP.exe. But I get the error and .pas file not exists.
I got the same problem!!

try our JavaImport for Android utility:

http://winsoft.sk/jimport.htm

AIK there are also other similar utilities available.

Erik Salaj, WINSOFT
Eli M

Posts: 1,327
Registered: 11/9/13
Re: Java2OP - class or Interface expected error
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 21, 2017 9:26 PM   in response to: İbrahim Ak in response to: İbrahim Ak
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02