This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Call external app

 
Robin Rodgers
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • 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!
 
Marco Barenkamp
Ranch Hand
Posts: 94
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic