I'm getting further and further to figuring out how my java program can read from my console application written in vb.net, i have some of my class here that i found on a site:
This is mainly to do with reading numbers from input but il change it later.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DecimalFormat;
import java.text.ParseException;
public class InputHandler{
public static void main(String[] args) {
System.out.println("Reading from console.");
double numberFromConsole;
try {
InputStreamReader isr = new InputStreamReader(System.in);
BufferedReader br = new BufferedReader(isr);
String s = br.readLine();
DecimalFormat df = new DecimalFormat();
Number n = df.parse(s);
numberFromConsole = n.doubleValue();
} catch (IOException e) {
numberFromConsole = 0;
} catch (ParseException e) {
numberFromConsole = 0;
}
System.out.println(numberFromConsole );
}
}
This reads input from my console application but how do i call it from my main process so that the user can type away into the console and the java program picks up the input and then puts it into a string.
I know if this seems basic but I'm really not that good with java, I'm mainly used to programming in vb, vb.net and C#.