Created
August 12, 2016 09:26
-
-
Save ruan65/1143258ca18f156a1a480d76ffb1fb55 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
public static void main(String[] args) { | |
ClassLoader loader = ClassLoader.getSystemClassLoader(); | |
File f = new File(loader.getResource("file_name.txt").getFile()); | |
try (Scanner scanner = new Scanner(f)){ | |
scanner.useDelimiter(";"); | |
String jsonString = scanner.next(); | |
print(jsonString); | |
} catch (FileNotFoundException e) { | |
e.printStackTrace(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment