• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

exec() with arguments to open a file

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic