I seem to be stuck with this one and need some help. We are currently in the process of developing a web application. The majority of the business logic will be developed in Java and we are using Struts for the interface. There are, however, several old programs, developed in C/C++, which at this stage cannot be redeveloped in Java (that's the future plan, though). They need to be started from the web front-end. In order to do that I'm using Runtime.exec() in one of the Action classes. Everything is fine, ie the programs execute and we can get the results (at least on some of them). Out problem is that the output from these programs goes to the Jboss console and as far as the input goes I'm not sure yet.
My questions are:
1. Is there any way to open a new window which will be on top of all other windows and will stay active during the execution of the C program?
2. How can I provide input to the program through that same window? Nothing fancy, just a few Y/N responses or pressing 'Enter'.
Our environment is Windows-based and consists of JDK 1.4.2, MyEclipse, Struts 1.2.
Any help will be greatly appreciated.
Your approach seems to need some revision... Suppose you actually CAN open a new Windows console... how is the web user going to access it???
Perhaps a web front-end is not quite right for your scenario...
Cheers and happy coding,
Thanks for your reply Martin.
The web front-end will be OK when everything is ported to Java. In that case the application will run on JBoss, access an Oracle DB and the users will be "happily browsing around":-)). Unfortunately, that nirvana is a bit far away.
I completely agree with you that the approach needs some revision, however, I am totally out of ideas. May be it's better if I explain in a bit more detail what I'm trying to do. The C/C++ program is reading files from a CD and then importing the data into an Oracle DB. I can run it now from within a Struts action and it works. The only problem is that the output is not visible to the users and the input from them cannot be accepted. I don't really need to open a new window (this is just one the (im)possible :-)) solutions). Any mechanism of displaying the output to the user should do, ie redirecting the output to a JSP or something else.
Thanks a lot,