ForexConnectAPI issue: java.lang.NoClassDefFoundError

Various questions related to programming, testing, deployment and support.

Moderator: admin

ForexConnectAPI issue: java.lang.NoClassDefFoundError

Postby Georgeh » Sat Apr 01, 2023 6:39 am

Hi everyone,
I just followed the instruction to using ForexConnectAPI 1.6.5 and met a small issue.
Is there someone could help me to solve it.
IDE: Eclipse 2023-3
Language: Java JDK-19
Java.library.path: .;.\bin;C:\Program Files\Candleworks\ForexConnectAPIx64\bin\java;C:\Program Files\Candleworks\ForexConnectAPIx64\bin
Java class.path: C:\Users\guest\eclipse-workspace\Forex\bin
Java working directory: C:\Users\guest\eclipse-workspace\Forex
Add external JARs: C:\Program Files\Candleworks\ForexConnectAPI\bin\java\fxcore2.jar
Code:
public static void main(String[] args) {
O2GSession session = O2GTransport.createSession();
...
}
Issue: java.lang.NoClassDefFoundError: com/fxcore2/O2GTransport at Test.main(Test.java:28)

I tried same code in MacOS/Ubuntu/Win11 and med the same issue.

Kind regards,
George
Georgeh
 
Posts: 5
Joined: Sat Apr 01, 2023 3:32 am

Re: ForexConnectAPI issue: java.lang.NoClassDefFoundError

Postby Georgeh » Mon Apr 03, 2023 11:55 pm

Hi,
Another test, when i put the foxcore2.jar in classpath, the error changed to:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no fxcore2 in java.library.path.
But it is actually in java.library.path.

Thanks,
George
Georgeh
 
Posts: 5
Joined: Sat Apr 01, 2023 3:32 am

Re: ForexConnectAPI issue: java.lang.NoClassDefFoundError

Postby Georgeh » Tue Apr 04, 2023 12:07 am

hi,
Just checked that ForexConnectAPI has two version:
1) ForexConnectAPI-1.6.5-win64.exe
2) ForexConnectAPI-1.6.5-Linux-x86_64.tar
Can this API be used in MacOS (M1) ?
And dose this java api need .so files or just fxcore2.jar?
Thanks,
George
Georgeh
 
Posts: 5
Joined: Sat Apr 01, 2023 3:32 am


Return to Development

Who is online

Users browsing this forum: No registered users and 1 guest