Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

exec() with arguments to open a file

 
Alex Hollis
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I have a third party CRM system which I would like to integrate with. I really want to launch into a particular record from my java app.

The system includes notifications where the following text file is sent...



... with a file name of my.prospectproblem where .prospectproblem is associated with the program.

I have two problems, the first is I need to know how to pass this to the program without creating the file if possible and secondly how to prevent the program launching twice.

I realise this might involve a step into the native code but any pointers would be great.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you start the program from the command line? What does that look like? I'm afraid it might be:

myprogram my.prospectproblem

If so myprogram is probably using file IO to read the file and I don't know any way to fool it into reading from elsewhere.
 
Alex Hollis
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for replying Stan, I will try passing the arguments in that manner tomorrow. But I would need to create a file temporally and pass that which I am trying to avoid if possible.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
THen again if the command is

myprogram < my.prospectproblem

we got it made in the shade. Let us know what you find.
 
Alex Hollis
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Very confusing, I can't pass it the arguments.

I can double click on the my.prospectproblem and it will open the system (or use the already open one). I might ask the vendor if they have command line arguments for passing the information.
Thanks for the advice.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic