softwarespartan / IB4m

Interactive Brokers API for Matlab
GNU General Public License v2.0
62 stars 21 forks source link

Undefined variable "TWS" or class "TWS.Session.getInstance" #33

Open roughtrader opened 6 years ago

roughtrader commented 6 years ago

Hi Abel,

Thanks for putting this all together. I have used IB4m in the past successfully, but in my new setup it seems matlab cannot read TWS973.jar.

I have placed IB4m-master folder in my working area. Just running the following code presents the error posted in the title:

tws_jar_path = fullfile(pwd, 'IB4m-master', 'Jar', 'TWS973.jar'); javaaddpath(tws_jar_path); session = TWS.Session.getInstance();

I am running R2018a Linux if that helps.

Thanks!

roughtrader commented 6 years ago

I think I have solved the problem. I did not add the IB4m-master folder into matlab path. When I entered into IB4m-master as the current folder in matlab, the TWS.Session.getInstance() works.

Thanks.

softwarespartan commented 6 years ago

No problem. Don’t hesitate to reach out if you need anything additional

Cheers -abel

Sent from my iPhone

On Aug 30, 2018, at 3:36 PM, roughtrader notifications@github.com wrote:

I think I have solved the problem. I did not add the IB4m-master folder into matlab path. When I entered into IB4m-master as the current folder in matlab, the TWS.Session.getInstance() works.

Thanks.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.