trading-shim Frequently Asked Questions
Certain recurring questions tend to come up in mailing list and support
contexts; the links below address or point to further resources about
the most common areas of inquiry.
The Sun java, version 1.4 series Software Development Kit (SDK) was initially
used in the development and operation of the IB tws, so near as we can
determine. Accordingly our
development was started against the j2sdk1.4.2 variants.
As we got familiar with the TWS, it became clear that the JDK ("Java
Development Kit ") was more appropriate for our needs, and so
we have first moved to the Java 1.5 series (Sun for some (marketing<?>)
reason has chosen to drop the leading '1.'
and calls that series the '5.0' 'jdk',
and installs itself, calling itself: jdk-1.5.0_10-fcs ).
So, as of 1 January 2008, we use
JDK 1.6 in both our development and production
recommends 'Java 5.0 or higher' as of
1 April 2008.
Versions actually in daily use by the developers
(last updated 080402)
| Centos || Sun jdk or sdk used || Notes |
|5|| j2sdk-1.4.2_09-fcs || OBSOLETE in 2008 PER IB |
|5||jdk-6u5-linux|| 32 bit CentOS installation |
|5||jdk-6u5-linux-x64|| 64 bit CentOS installation |
Note: As a matter of history, we started development of the trading shim
using the IBM Java implementation, but that product
yielded us obscure errors in the TWS' operation.
We finally traced our errors back to differing behaviors of the TWS under
the IBM implementation compared to that of the Sun JDK,
and so we abandoned the IBM product.
An archive of older JDK's is maintained by Sun at:
which we point to, as it offers a full collection on one web page, of Sun's
offerings over time. We do NOT recommend these in preference, but rather
point out an easy to navigate archive.
Additionally the current Sun JDK offerings are here,
but as we find the selection mechanism less clear to a person
doing their first JDK installation, we list it second:
purpose here is to help a person get a JDK installation set up under Linux,
Once it is working, it is then appropriate to cut over to the latest.
We have no objection to using the current Sun releases. Indeed, as
security issues appear [see e.g., CVE-2007-3005]
from time to time in the JDK's, we recommend using
the patched current releases initially. The potential problem
is that they may not be
the recommended or tested version for the TWS.
We have tested these instructions with these package versions,
and verified with various TWS clients, that they are functional:
[herrold@xeon Java]$ ls -1 *bin
How to install the sdk or jdk under Linux for console use
Note: We are of course aware of ways to do path fix-up other than in
/etc/profile, and of 're-sourcing' the file to avoid
the log-out and log-in steps. We found going through such details confused our
end users, in testing with them. We choose
this approach for simplicity of explanation. If you know enough to
'carp', you already understand 'nix PATH variable model
more than we choose to document here. But it would be nice for Sun's RPM
packager to use: /etc/profile.d/ and remove the need for this
- Download the proper package from Sun. The 'package' name will vary over
time, of course; Both 'j2sdk', and 'jdk' prefixes refer to the Java SDK.
(Note: we have always used 'wget' to
retrieve the Java binary from the Sun site,
once its URL had been discerned with a graphical
browser. We have received reports that using a GUI browser can sometimes
'lock' or leave a failed download in place.)
- Use chmod that package to 755 to make it 'executable'
- Run the binary: ./binary to extract it into binary RPM form
- Install it using the rpm package manager: sudo rpm -Uvh jdk*rpm (sample session)
- Fix up the binary search path in /etc/profile (this for
a jdk1.6.0_03 package ...)
... perhaps pedantically, this stanza has to be before the
'unset pathmunge' (which removed the function) and also before the 'export
PATH' in /etc/profile (which makes the revised PATH available later) as well.
pathmunge $JPATH/bin before
- Log out and in again to make the changes in the paths take effect
Over time, as new SDK's are issued, the exact JPATH variable value
will change; on another machine, a slightly older version was present.
As an example, using the facility of the rpm packaging tool to list
all of the
files and directories under its management, and looking for a unique program
(here, javac), we find:
[herrold@centos-4 ~]$ rpm -ql j2sdk | grep 'javac$'
so in our example, we would use the trimmed base directory path:
/usr/java/j2sdk1.4.2_09 for that release of the SDK.
Happily, in recent versions of its Java packaging, Sun has added a 'courtesy'
path: /usr/java/latest to its RPM packagings, and so one can the
and thereafter one no longer needs to edit /etc/profile, as new jdk are
pathmunge $JPATH/bin before
This may be confirmed as properly installed by this command:
(The 'missing' files are from a haphazard upstream packaging, and are a
[herrold@centos-4 ~]$ rpm -V j2sdk
Adding Java to the web browsers
Adding links to the plug-in for the Mozilla / Firefox / SeaMonkey [RHEL]
browsers is also useful. The links need to end up in the common directory
used by these browsers, which is: /usr/lib/mozilla/plugins/ .
Determining which particular Java library to link is somewhat
dependent on the libraries present; which of the following to use is
determined by reference to the upstream documentation. Find the candidates
[herrold@centos-4 ~]$ rpm -ql j2sdk | grep plug | grep so$
and then as root, link as appropriate into /usr/lib/mozilla/plugins/
... so ... did I get it installed right?
We can re-source the profile to update the PATH,
and then test it this way:
[herrold@centos-5 ~]$ . /etc/profile
[herrold@centos-5 ~]$ java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
Jump Links: [ Text (console) ] |
[ Web browsers ]
Last modified: Wed, 08 Oct 2008 17:56:16 -0400
[ Home |
Interior documentation |
Screen shots ]
[ Contact Us |
Site Map |
Mailing List Archives: (Main) |
Copyright (c) 2006 ... 2009 trading-shim.com, LLC, Columbus, OH