Last active
December 30, 2016 09:50
-
-
Save enif-lee/635a8b22ff9105306cc3d8684f3fe30c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
/** | |
* Created by Jinseoung on 2016-12-30. | |
*/ | |
public class ClasspathLoaderSample { | |
// if file is existed in src/main/resource/path/to/prob.testcase | |
static Scanner sc = new Scanner(ClassLoader.getSystemResourceAsStream("path/to/prob.testcase")); | |
public static void main(String[] args) { | |
while(sc.hasNext()){ | |
System.out.println(sc.nextLine()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment