ForexConnect API 1.4.1 beta

Moderator: Moderator

Re: ForexConnect API 1.4.1 beta

Postby vetocch » Mon Dec 12, 2016 4:20 am

hi, Sergey.Konovalov,

thanks for your reply. I followed all steps , and tried everything I could do. still can not make it work.
however, eclipse works . so ... I change to eclipse .
vetocch
 
Posts: 3
Joined: Mon Nov 28, 2016 10:00 pm

Re: ForexConnect API 1.4.1 beta

Postby kmmtidev » Mon Dec 19, 2016 12:31 pm

Julia CJ wrote:Hi Triplepointdev,

1)We recommend you to use build scripts ( you can take as a basis ant-scripts in the samples). Using them will be easier to reference the libraries after build.

2) If you want to use the command line, you need to add classpath instead of Djava.library.path by using appropriate command. For example,

- the compilation: javac *.java -classpath /home/computer/user/build/www-fxcorporate-com/ForexConnectAPI-1.4/ForexConnectAPI-1.4-Linux-x86_64/lib/java/fxcore2.jar

- launch: java -cp /home/computer/user/build/www-fxcorporate-com/ForexConnectAPI-1.4/ForexConnectAPI-1.4-Linux-x86_64/lib/java/fxcore2.jar: forexconnect_check.Trader

3)In any case, if you can launch any sample (for example, login), it means forexconnect is compiled correctly. If you see “java.lang.NoClassDefFoundError” , it indicates the existence of some problem in local environment and the way was written incorrectly somewhere or the connection of libraries was made in a wrong way.


Hi,

I'm running this on Mac OSX 10.11 El Capitan.

(1) I followed these steps and I get the error:

Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: no fxcore2 in java.library.path
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at com.fxcore2.O2GTransport.<clinit>(Unknown Source)
   at com.markettraders.product.AutoReconciliation.run(AutoReconciliation.java:45)
   at com.markettraders.product.AutoReconciliation.main(AutoReconciliation.java:19)


(2) If I add to launch:

- launch: java -Djava.library.path=/Users/kmmtidev/Downloads/ForexConnectAPI-1.4.1-Darwin-x86_64/lib:/Users/kmmtidev/Downloads/ForexConnectAPI-1.4.1-Darwin-x86_64/lib/java -cp /Users/kmmtidev/Downloads/ForexConnectAPI-1.4.1-Darwin-x86_64/lib/java/fxcore2.jar: forexconnect_check.Trader

I get this error:

Code: Select all
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/kmmtidev/Downloads/ForexConnectAPI-1.4.1-Darwin-x86_64/lib/java/libfxcore2.dylib.1.4.1: dlopen(/Users/kmmtidev/Downloads/ForexConnectAPI-1.4.1-Darwin-x86_64/lib/java/libfxcore2.dylib.1.4.1, 1): Library not loaded: @rpath/libForexConnect.dylib
  Referenced from: /Users/kmmtidev/Downloads/ForexConnectAPI-1.4.1-Darwin-x86_64/lib/java/libfxcore2.dylib.1.4.1
  Reason: image not found
   at java.lang.ClassLoader$NativeLibrary.load(Native Method)
   at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
   at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1857)
   at java.lang.Runtime.loadLibrary0(Runtime.java:870)
   at java.lang.System.loadLibrary(System.java:1122)
   at com.fxcore2.O2GTransport.<clinit>(Unknown Source)
   at com.markettraders.product.AutoReconciliation.run(AutoReconciliation.java:45)
   at com.markettraders.product.AutoReconciliation.main(AutoReconciliation.java:19)
kmmtidev
 
Posts: 2
Joined: Mon Dec 19, 2016 12:13 pm

Re: ForexConnect API 1.4.1 beta

Postby kmmtidev » Tue Dec 20, 2016 4:28 pm

Resolved the issue by copying the contents of ForexConnectAPI-1.4.1-Darwin-x86_64/lib to /usr/local/lib directory.

I would still like to know how to reference the libraries in an arbitrary directory other than the system defined paths.
kmmtidev
 
Posts: 2
Joined: Mon Dec 19, 2016 12:13 pm

Previous

Return to ForexConnect API

Who is online

Users browsing this forum: No registered users and 5 guests