diff options
author | William Carroll <wpcarro@gmail.com> | 2020-01-25T19·39+0000 |
---|---|---|
committer | William Carroll <wpcarro@gmail.com> | 2020-01-25T19·39+0000 |
commit | 5a2a1694e3790e97da5933ac66ff68fb3170c8f0 (patch) | |
tree | b3138875ec6528b9c4e870395640e319129b967d | |
parent | 143fc970322237963d5358ae832fd18ea045d67a (diff) |
Support java directory
Add an example of two java files, Main.java and Another.java, where Main.java depends on Another.java. This is part of a larger example of attempting to use Nix to package these. Also ignoring the *.class files that `javac <filename>` outputs.
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | java/Another.java | 5 | ||||
-rw-r--r-- | java/Main.java | 6 |
3 files changed, 12 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore index 51eb9644acd7..12ecf28fd42f 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ # Python __pycache__ +*.class diff --git a/java/Another.java b/java/Another.java new file mode 100644 index 000000000000..e431e157336b --- /dev/null +++ b/java/Another.java @@ -0,0 +1,5 @@ +public class Another { + public static String whatis() { + return "Testing"; + } +} diff --git a/java/Main.java b/java/Main.java new file mode 100644 index 000000000000..0bfa9ebc2a34 --- /dev/null +++ b/java/Main.java @@ -0,0 +1,6 @@ +public class Main { + public static void main(String[] args) { + System.out.println(System.getProperty("java.class.path")); + System.out.println(Another.whatis()); + } +} |