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
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.
"JavaRanch, where the deer and the Certified play" - David O'Meara
subject: calling a exe of fortran from java with a file as an input to the fortran exe