Coder Social home page Coder Social logo

Comments (3)

rlktradewright avatar rlktradewright commented on August 17, 2024

See this post in the IBC User Group (which I encourage you to join so you would receive this sort of information):

https://groups.io/g/ibcalpha/message/786

from ibc.

hokavs avatar hokavs commented on August 17, 2024

Thank you. I would like to point out that technically I'm not running TWS from icon or exe. I just run. I just run the script from Terminal (in Centos 7).

It is a strange experience to see some other program start TWS, and then actually alter TWS itself while doing so. But perhaps it's a clever trick from IB itself to prevent third-party apps like IBC to work.

TL:DR: I will join the group, and I hope a solution is found soon

from ibc.

rlktradewright avatar rlktradewright commented on August 17, 2024

Ok, the post I referred you to described the situation on Windows, where the installer creates an executable program file called Tws.exe, and places an icon on the desktop (which just runs the .exe).

The .exe file acts as a sort of 'front end' to the TWS jar files, which contain the compiled Java bytecode. These jar files are pure java, ie they're cross-platform and don't use anything that's platform specific: this means, of course, that IB only have one Java codebase to maintain that covers all platforms.

When you run the .exe on Windows, it starts a process in the same way as any other .exe file, and this process does some initial platform-specific stuff (such as DPI-awareness for high-resolution monitors, eg 4K screens) and, I presume, kicks off the mechanism for doing the auto-restart. It then loads the Java Virtual Machine (JVM) into the same process, and then calls the relevant Java TWS entrypoint: from that point on we're into the cross-platform stuff. This entrypoint is exactly the same as what IBC calls. So overall, our process now contains some platform-specific stuff in the form of Windows libraries AND the JVM running the TWS jars, all in the same address space and working independently. (This is quite a common arrangement for Java programs that run on Windows, for example the NetBeans IDE.)

I presume that the start script for TWS on Linux does equivalent platform-dependent things before entering the TWS jar files, but I haven't examined it in this 974 release.

Anyway the point is that when using IBC to start TWS, IBC, being Java itself, is what is loaded first into the JVM, and it then hooks up some low-level Java mechanisms that enable it to monitor the stream of UI events, and thus to intercept and interact with various dialogs on the user's behalf. Then it enters the TWS code at exactly the same entrypoint as mentioned above. This process doesn't (and cannot) do any of the stuff that the .exe (or the Linux script) does, so in particular the auto-restart functionality is not available.

I don't think anything in this alters TWS itself in any way. I presume that the bit that enables the auto-restart sets something in the environment that TWS can detect, to determine whether it should offer the auto-restart.

And I certainly don't think IB are trying clever tricks to prevent IBC from working. This new functionality from IB is long overdue (years overdue one could say!), and for people that can live without auto-login or some of the other IBC functions it largely makes IBC redundant. That's fine with me!

Just for completeness, it's worth stating that on Linux, it would perhaps be possible to incorporate whatever IB's script does into the IBC script, and then it might be possible to make the auto-restart option available. But I have no particular wish to spend my time investigating this, because doing a daily restart using IBC and Task Scheduler or crontab is pretty straightforward and has much the same effect.

However, if anyone else wants to look into this, feel free...

from ibc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.