diff options
Diffstat (limited to 'java/07-simple-objects-better-use-jar/myapp')
3 files changed, 27 insertions, 0 deletions
diff --git a/java/07-simple-objects-better-use-jar/myapp/.gitignore b/java/07-simple-objects-better-use-jar/myapp/.gitignore new file mode 100644 index 0000000..6b468b6 --- /dev/null +++ b/java/07-simple-objects-better-use-jar/myapp/.gitignore @@ -0,0 +1 @@ +*.class diff --git a/java/07-simple-objects-better-use-jar/myapp/AccountApp.java b/java/07-simple-objects-better-use-jar/myapp/AccountApp.java new file mode 100644 index 0000000..3399770 --- /dev/null +++ b/java/07-simple-objects-better-use-jar/myapp/AccountApp.java @@ -0,0 +1,16 @@ +public class AccountApp { + + /** + * @param args + */ + public static void main(String[] args) { + AccountManager accountManager = new AccountManager(); + + System.out.println(accountManager.getBalance(2)); + + accountManager.deposit(2, 2.0); + + System.out.println(accountManager.getBalance(2)); + } + +} diff --git a/java/07-simple-objects-better-use-jar/myapp/README b/java/07-simple-objects-better-use-jar/myapp/README new file mode 100644 index 0000000..80ed401 --- /dev/null +++ b/java/07-simple-objects-better-use-jar/myapp/README @@ -0,0 +1,10 @@ +# NOTE: +# On Windows, +# 1. Instead of using ':' as the classpath seperator, use ';'. +# 2. Use \ as the directory seperator. + +# Compile +javac -cp ../myaccountslib/dist/myaccountslib.jar:. AccountApp.java + +# Run +java -cp ../myaccountslib/dist/myaccountslib.jar:. AccountApp |
