Stack Overflow with ActiveX Controls
You are using J-Integra to embed an ActiveX component into a Swing component. When you do an operation with the ActiveX component, the application suddenly crashes and displays:
If you have Visual Studio installed and you click Cancel, eventually the application displays:
CauseThe ActiveX component may require a much larger per-thread stack size. This unfortunately is determined by the executable when it is launched (java.exe).
Until a better solution from Sun is found, the current solution is to "hack" the java.exe binary to start with a larger stack size. The default is 128Kb, which (if you experience this error message) is not enough for the ActiveX component. The steps are:
- You need Visual Studio 6 on your machine, or at least the editbin.exe tool that is included with it.
- At the command prompt, change to your JDK1.3.1\bin directory and execute the following command which will increase the stack size to 2Mb:
editbin.exe /STACK:2000000 java.exe
Once the modification is complete, try running the application again and it should work.