Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java read file from command line argument

import java.util.Scanner;
import java.io.File;
Scanner input = new Scanner(new File(args[0])); //Where args[0] is the cmd argument, the file name
 
PREVIOUS NEXT
Tagged: #java #read #file #command #line #argument
ADD COMMENT
Topic
Name
7+3 =