• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Running a program from Java

 
Greenhorn
Posts: 19
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a program that records and reruns network traffic. It was developed in C and runs in my case under Windows 7 Professional but will run almost anywhere. I have observed a lack of stability.

First I have a JAVA stand alone GUI program that runs the program as follows:



Basically it launches the executable t3drive, hangs arounf so it gets a chance to start, and then connect to it via the embedded browser.

It frequently works, sometimes launches in the browser but then freezes, and sometimes fails to start at all.

t3drive works 100% of the time if I run it under cygwin and I can reliably connect to it using any browser.

Anyone any thoughts on why this might not be stable? Just looking for a direction of what to try next.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I notice that the code does not connect to all the Process's streams. Make sure to follow all the advice given in this article.
 
Nigel Hoath
Greenhorn
Posts: 19
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ulf Dittmer wrote:I notice that the code does not connect to all the Process's streams. Make sure to follow all the advice given in this article.



Ulf many thanks for that. It helped me set up a test and get a better idea of what is going on. Clearly the problem is the communication between the java embedded browser and the C program.

It also highlighted my problem with running a different mode of the C program :

C;\\Users\\User\\PWBtest_base\\testproject001\\bin\\t3drive -v4 java2 1 1 1 java2.msg > java2.log 2>&1

The redirect appears to terminate the command line. But with the info on the end of your link I can at least redirect everything to a text box.


A step nearer so Cheers and enjoy your evening. Nigel
reply
    Bookmark Topic Watch Topic
  • New Topic