• 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

Call external app

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi. I have a J2EE app where I am keeping versions of a text field in a database, and I need to be able to view the differences between the versions and merge them where necessary. I thought about using WinMerge (free) and writing temp files for the text fields, but I don't know how to open WinMerge from within my app. Would this work from within a J2EE app? How would I start it from my program? (I am using Spring throughout and JSPs on the front end.) Thanks!
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, you may use ProcessBuilder (Java5) or java.lang.Runtime (Java1.4)
to invoke the program. But beware: You are not allowed to inkoke
that program from within your J2EE App (acc. to the spec.), but you
may implement a JCA connector or a MBean (hope, you have an MBean server in your apserver) that provides the invocation.
(or use JNI if you are able to implement C code and you have a static library or dll, you can adopt)
 
Robin Rodgers
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the quick response. I have a couple more questions (all this is new to me.) If I use, say, an MBean, would it invoke WinMerge on the server or on the user's machine? If on the server, would the user see it? What benefits would using an MBean have, e.g., knowing when WinMerge closes maybe? Are there any other diff tools for use in internet apps? Thanks!
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The process would run in the server, because the MBean lives inside the
AppServer. Due to the fact, that the MBean owns the process of the
win32 application, you are able to get to know whether the process is still
alive or not.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic