TWS on Linux - What Am I Doing Wrong?

Discussion in 'Trading Software' started by canuck, Apr 26, 2014.

  1. canuck

    canuck

    Okay, completely new to Linux (Ubuntu)

    I followed IB's instructions and found a post about installing java using the
    > sudo apt-get install openjdk-6-jre

    I then did > cd IBJts

    which seems fine, but when I enter

    "To run TWS type - java -cp jts.jar:total.2013.jar -Xmx512M -XX:MaxPermSize=128M jclient.LoginFrame. "

    I get


    Exception in thread "main" java.lang.NoClassDefFoundError: jclient/LoginFrame
    Caused by: java.lang.ClassNotFoundException: jclient.LoginFrame
    at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:323)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:268)
    Could not find the main class: jclient.LoginFrame. Program will exit.


    Does this mean I don't have Java installed?

    I apprecaite any input, thanks!
     
  2. baglunch

    baglunch

    It is the jclient/LoginFrame that is not found, it is probably in the jts.jar. Make sure the jts.jar is in the same directory that you ran the java command. Also make sure there is a space between the "." at the end and the word before it (maybe that's just a typo in your post).
     
  3. vanv0029

    vanv0029

  4. If you are serious about trading why bother with Linux. You spend more time trying to figure what is wrong than figuring what to trade.
     
  5. bawr

    bawr

    If you are serious about trading, you shouldn't be afraid of learning new things, including figuring out how to do a simple thing in Linux.
     
  6. canuck

    canuck

    I agree, and I think the benefits (when I have it up and running) will be worth it. Overall, I really like Linux, this has been really my only hurdle (so far anyway)

    btw: CrazyTrader, pick up an old computer and install Linux on it, you'll be amazed at how fast everything is on it, plus more secure etc... yes it is a pain but better than MS's bloated OS. That's how I got the taste, an old slow laptop is now amazingly fast.

    EDITED: woohoo, I got it working!

    I re-checked all the directories and moved all the files into IBJts folder and now she works!

    Now I get to have fun with Ninja LoL - I did find a post on another thread, hopefully that works out reasonably well.

    Thanks for all the help!
     
  7. Catoosa

    Catoosa

    Canuck,

    Did you install Java from the Sun/Oracle website? Did you install the JRE or did you stay with the JDK you had previously installed through package management. I have installed and tried many different linux distributions over a number of years and have always found they were not ready for my daily use desktop. Most recently, I installed Mint 16 Cinnamon, OpenSuse 13.1 KDE, and PCLinuxOS 2013.12 KDE. Over the years, the PCLinuxOS is the distro I have always found to come the closest to meeting my needs but never quite ready. The PCLinuxOS 2013.12 I think is ready for my daily use. I am now planing to install TWS and multi-monitors in PCLinuxOS 2013.12. So far, all hardware including my MFC printer/copier/fax have been recognized and setup by PCLinuxOS 2013.12 during the initial OS install or when connected after the initial OS install. I now think the time has come for me to spend some of my time to learn how to use linux. I do not like Microsoft's current vision of their place in the world and do not see me ever using any OS resembling Windows 8. Keep us posted on your progress with your TWS on Linux install.
     
  8. canuck

    canuck

    Initially I ran JDK, but I kept getting errors so I did the entire process again (thinking perhaps I misplaced some of the files) - so this is not to say that JDK won't work, but I probably screwed up the extraction process. (I'm pretty sure it would work, but again I wanted to start over and do it fresh)

    When I d/l again I used the JRE package. I then followed the installation method from the thread posted earlier, (thanks again BTW) and ran it with the syntax given from IB. Just make sure the files are in the correct folders!

    I've had it up and running all day today (since I posted anyway) and it hasn't crashed and remained up and stable. I didn't trade, as I wanted to make sure everything was running fine.

    So far, I can't see any issues with the install. I'll have it running all week to test it and let you know if I find any problems.

    When you say "not ready for desktop use", what type of issue were you having?

    Btw: I have had no problem at all with anything else, multiple monitors, printer etc... everything is running perfectly, and much faster btw on Linux (I'm using ubuntu fyi, perhaps you might try mint etc...) I'm switching all my computers and laptops to ubuntu.

    My next challenge will be to get Ninjatrader to work, that's on my plate for tomorrow. :D Hopefully in a day or two I'll be up and trading once again!

    Cheers

     
  9. canuck

    canuck

    and just to make myself clear, in no way am I an expert on anything related to linux, tws or any other computer software, so take everything I say with a large grain of salt :D
     
  10. contra

    contra

    You have to use Oracle (Sun) java (JRE) last time I checked, the openJDK java wasn't working at the time for some of the trading java software. I had no problem running java on linux and some windows apps with wine, some of which required you to have the .dll files from windows apps.

    Would be cool if they would have kept development of OpenSolaris, or more production on the development of OpenIndiana. You could try OpenIndiana on an old computer laying around though.
     
    #10     Apr 28, 2014