Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29243 Discussions

passing arguments to *.exe file from command prompt

ritesh_agrawal
Beginner
1,123 Views
hello

I have a fortran code and and its executable file. I am using java to run the executable file. Now my problem is to pass some variables from java to exe file. Is there any way I can do it.

One possible way was to write the values in a file and read that file but this is not possible in given circumstance so I am looking for another option.

The other option I am trying to explore is like passing the string from java containing the exe file name and arguments as given below

icfm.exe -I infile.txt -O outfile.txt

Now I have to write a fortran code that can read this line from commnad prompt and take input from infile.txt and write final results to outfile.txt

Thanks in advance
Ritesh Agrawal
0 Kudos
1 Reply
rahzan
New Contributor I
1,123 Views
Is GETARG not working for some reason?

Tim

ps,
I have actually done this way back in the jurassic w java 1.0beta and MSPS4!
0 Kudos
Reply