• 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

calling a exe of fortran from java with a file as an input to the fortran exe

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am having an application of web enabling the
fortran programs..
This is like providing the user interface to enter
the required input's which will built a file as an input
file with .dat extension.. this file i should send
to fortran from java by calling the fortran program
using Runtime class..
here my case of invoking a fortran exe is some thing
like we will call the exe then the exe while
executing will prompt a message to enter the input file name..
in this case how i can give the input file to the
fortran program from java..
can anyone help me with a sample code for this..
like
d:\>sample (is an exe file of fortran)..
this while executing it will ask you to enter the
input file name..
Please enter the file name:
-------------
so please help me how to comeup with this sort of
application in java...
Thanks in advance
Bv
 
"The Hood"
Posts: 8521
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to create a class that has a main method (so it will run as an application). T
he main method need to have either a question written to the console and wait for System.in to get the answer, OR have a Dialog or JDialog (in swing) to take in the user input. In this case you can put the "Please enter the file name:" as the Title of the JDialog and wait for the user to respond.
 
reply
    Bookmark Topic Watch Topic
  • New Topic