|
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.
linux java command to run API |
bobuc
|
Post subject: linux java command to run API |
Post rating: 0
|
Posted: Wed 27 Jun, 2012, 15:50
|
|
User rating: 0
Joined: Wed 27 Jun, 2012, 15:37 Posts: 11
|
Hi, Please, what the full linux command to run API java pkg_main example, with last JForex 2.6.72, like "java -classpath [..] :JForex [..]  D2 [..] :slf4j [..] etc" ? Thanks
|
|
|
|
 |
API Support
|
Post subject: Re: linux java command to run API |
Post rating: 0
|
Posted: Thu 28 Jun, 2012, 07:24
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
bobuc wrote: java pkg_main example Please elaborate which example you refer to.
|
|
|
|
 |
bobuc
|
Post subject: Re: linux java command to run API |
Post rating: 0
|
Posted: Thu 28 Jun, 2012, 19:36
|
|
User rating: 0
Joined: Wed 27 Jun, 2012, 15:37 Posts: 11
|
Last JForexClientLibrary.zip contains src/singlejartest/Main.java, that I want run, via linux command line.
Thks
|
|
|
|
 |
Balazs
|
Post subject: Re: linux java command to run API |
Post rating: 2
|
Posted: Thu 28 Jun, 2012, 22:19
|
|
User rating: 6
Joined: Sat 03 Mar, 2012, 10:29 Posts: 9
|
Well, I suppose it's the same for (compiling and) running any other .java file. I don't want to be rude, but this is not a Linux support forum.
|
|
|
|
 |
bobuc
|
Post subject: Re: linux java command to run API |
Post rating: 0
|
Posted: Fri 29 Jun, 2012, 13:00
|
|
User rating: 0
Joined: Wed 27 Jun, 2012, 15:37 Posts: 11
|
1) The run command was shown by Dukascopy in a prior version of API. 2) It is helpfull because it changes at each version and is not so simple.
|
|
|
|
 |
API Support
|
Post subject: Re: linux java command to run API |
Post rating: 0
|
Posted: Wed 04 Jul, 2012, 16:08
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
bobuc wrote: 1) The run command was shown by Dukascopy in a prior version of API. Please specify in which API version and exactly where did you find it?
|
|
|
|
 |
bobuc
|
Post subject: Re: linux java command to run API |
Post rating: 0
|
Posted: Thu 05 Jul, 2012, 10:30
|
|
User rating: 0
Joined: Wed 27 Jun, 2012, 15:37 Posts: 11
|
I look for the run command for the last version 2.6.72, as mentioned in my first post.
For info, the script for a prior version, and which does not work now anymore: pkg="pkg_main" jv="/usr/bin/java" pa="/workspace/dukascopy_api/" li=$pa"libs/" log=$pa$(date +"%Y%m%d")".log" jfx="jForex-2.4.0.jar" jfxapi="JForex-API-2.6.7.jar" dds="DDS2-Connector-1.1.1.jar" $jv -classpath $pa"bin":$li$jfx:$li$jfxapi:$li$dds:$li"nlink-1.jar":$li"log4j-1.2.14.jar":$li"mina-core-1.1.7.jar":$li"mina-filter-ssl-1.1.7.jar":$li"slf4j-api-1.5.8.jar":$li"slf4j-log4j12-1.5.8.jar":$li"ta-lib-0.4.4dc.jar":$li"7zip-4.65.jar":$li $pkg.Main >> $log &
|
|
|
|
 |
API Support
|
Post subject: Re: linux java command to run API |
Post rating: 0
|
Posted: Thu 05 Jul, 2012, 11:14
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
Consider updating the parameters jfx, jfxapi, dds, -classpath according to the versions that can be found in the standalone libs directory. Mind that jForex is now called DDS2-jClient and DDS2-Connector is MQL4Connector.
|
|
|
|
 |
bobuc
|
Post subject: Re: linux java command to run API |
Post rating: 0
|
Posted: Thu 05 Jul, 2012, 13:33
|
|
User rating: 0
Joined: Wed 27 Jun, 2012, 15:37 Posts: 11
|
I get the error: Quote: Exception in thread "main" java.lang.ClassNotFoundException: com.dukascopy.api.impl.connect.DCClientImpl at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at com.dukascopy.api.system.ClientFactory.getDefaultInstance(ClientFactory.java:26) at duka.Main.main(Main.java:73) with this script: pkg="pkg_duka" jv="/usr/bin/java" pa=$HOME"/dukascopy/" li=$pa"libs/" log=$pa"log/"$(date +"%Y%m%d")"_java" jfx="DDS2-jClient-JForex-2.17.12.jar" jfxapi="JForex-API-2.6.72.jar" mql4="MQL4Connector-2.6.72.jar" $jv -classpath $pa"bin":$li$jfx:$li$jfxapi:$li$mql4:$li"nlink-1.2.jar":$li"log4j-1.2.14.jar":$li"mina-core-1.1.7.jar":$li"mina-filter-ssl-1.1.7dc.1.jar":$li"slf4j-api-1.5.8.jar":$li"slf4j-log4j12-1.5.8.jar":$li"ta-lib-0.4.4dc.jar":$li"7zip-4.65.jar":$li $pkg.Main >> $log & Thanks
|
|
|
|
 |
API Support
|
Post subject: Re: linux java command to run API |
Post rating: 0
|
Posted: Thu 05 Jul, 2012, 13:35
|
|
User rating: ∞
Joined: Fri 31 Aug, 2007, 09:17 Posts: 6139
|
You should add all jars from the libs directory to the classpath.
|
|
|
|
 |
|
Pages: [
1
]
|
|
|
|
|