Dukascopy
 
 
Wiki JStore Search Login

Attention! Read the forum rules carefully before posting a topic.

    Try to find an answer in Wiki before asking a question.
    Submit programming questions in this forum only.
    Off topics are strictly forbidden.

Any topics which do not satisfy these rules will be deleted.

jforex api without ide
 Post subject: jforex api without ide Post rating: 0   New post Posted: Sun 04 Jun, 2017, 00:04 
User avatar

User rating: 0
Joined: Sat 25 Mar, 2017, 19:13
Posts: 6
Location: RomaniaRomania
I am trying to use the jar file for the api in a standalone script without the use of an ide like eclipse or netbeans.

I tried to compile and run with classpath but the ClientFactory.getDefaultInstance() throws the ClassNotFoundException

I am new to java. Any ideas how to fix this?


 
 Post subject: Re: jforex api without ide Post rating: 0   New post Posted: Tue 06 Jun, 2017, 16:51 
User avatar

User rating: 0
Joined: Sat 25 Mar, 2017, 19:13
Posts: 6
Location: RomaniaRomania
I added the whole folder of jars to classpath and no more problems.


 
 Post subject: Re: jforex api without ide Post rating: 0   New post Posted: Wed 07 Jun, 2017, 14:33 
User avatar

User rating: 0
Joined: Wed 07 Jun, 2017, 14:26
Posts: 3
Hi nen, I have the same issue. Could you give me an example of the syntax you used to fix the problem? Thanks, Chris.


 
 Post subject: Re: jforex api without ide Post rating: 0   New post Posted: Sun 18 Jun, 2017, 19:48 
User avatar

User rating: 0
Joined: Sat 25 Mar, 2017, 19:13
Posts: 6
Location: RomaniaRomania
I downloaded jforex-sdk.zip from https://www.dukascopy.com/client/jforexlib/

I don't know if this is the easiest way because I don't know much about maven repositories.

Unzip and then run mvn clean install (on linux) where the extracted files are. Maven installation will create a folder with all the jar files. I watched the messages from the installation to see where that folder is. I took those jar files and copied them in the folder where my .java file was and compiled the file with javac -cp .:./* myfile.java on linux

if you are on windows the command should be javac -cp ./*; myfile.java. I don't know the exact way to use maven on windows, but a little time spend on google should make it clear for you as that's how i figured out how to do it on linux.


 

Jump to:  

  © 1998-2025 Dukascopy® Bank SA
On-line Currency forex trading with Swiss Forex Broker - ECN Forex Brokerage,
Managed Forex Accounts, introducing forex brokers, Currency Forex Data Feed and News
Currency Forex Trading Platform provided on-line by Dukascopy.com