From 5a2a1694e3790e97da5933ac66ff68fb3170c8f0 Mon Sep 17 00:00:00 2001 From: William Carroll Date: Sat, 25 Jan 2020 19:39:49 +0000 Subject: [PATCH] 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 ` outputs. --- .gitignore | 1 + java/Another.java | 5 +++++ java/Main.java | 6 ++++++ 3 files changed, 12 insertions(+) create mode 100644 java/Another.java create mode 100644 java/Main.java diff --git a/.gitignore b/.gitignore index 51eb9644a..12ecf28fd 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 000000000..e431e1573 --- /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 000000000..0bfa9ebc2 --- /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()); + } +}