summaryrefslogtreecommitdiffstats
path: root/java/project/src/main/ch
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2017-02-20 10:33:44 +0100
committerJérémy Zurcher <jeremy@asynk.ch>2017-02-20 10:33:44 +0100
commit25bf80f2c6c3c6784f78d9d41b5e38a5273a00fe (patch)
treee0125ce43205e48c0b14faacca248e58037e6479 /java/project/src/main/ch
parent348663665082107181968a76fd14c2491b4f51e2 (diff)
downloadshare-25bf80f2c6c3c6784f78d9d41b5e38a5273a00fe.zip
share-25bf80f2c6c3c6784f78d9d41b5e38a5273a00fe.tar.gz
java : add project (ant,ivy,junit,logback)
Diffstat (limited to 'java/project/src/main/ch')
-rw-r--r--java/project/src/main/ch/asynk/Main.java22
-rw-r--r--java/project/src/main/ch/asynk/MyClass.java25
-rw-r--r--java/project/src/main/ch/asynk/MyException.java11
3 files changed, 58 insertions, 0 deletions
diff --git a/java/project/src/main/ch/asynk/Main.java b/java/project/src/main/ch/asynk/Main.java
new file mode 100644
index 0000000..bb187bf
--- /dev/null
+++ b/java/project/src/main/ch/asynk/Main.java
@@ -0,0 +1,22 @@
+package ch.asynk;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Main
+{
+ private static Logger logger = null;
+
+ public static void main(String [] args )
+ {
+ logger = LoggerFactory.getLogger(Main.class);
+ System.out.println("System.out");
+ System.err.println("System.err");
+ logger.trace("trace");
+ logger.debug("debug");
+ logger.info("info");
+ logger.warn("warn");
+ logger.error("error");
+ System.exit(0);
+ }
+}
diff --git a/java/project/src/main/ch/asynk/MyClass.java b/java/project/src/main/ch/asynk/MyClass.java
new file mode 100644
index 0000000..57ef46f
--- /dev/null
+++ b/java/project/src/main/ch/asynk/MyClass.java
@@ -0,0 +1,25 @@
+package ch.asynk;
+
+import lombok.Getter;
+
+public class MyClass
+{
+ static private String msg = "Hello World";
+
+ private @Getter int n;
+
+ public MyClass()
+ {
+ n = 666;
+ }
+
+ public void print()
+ {
+ System.err.println(msg);
+ }
+
+ public void exception() throws MyException
+ {
+ throw new MyException("it's mine");
+ }
+}
diff --git a/java/project/src/main/ch/asynk/MyException.java b/java/project/src/main/ch/asynk/MyException.java
new file mode 100644
index 0000000..06203ae
--- /dev/null
+++ b/java/project/src/main/ch/asynk/MyException.java
@@ -0,0 +1,11 @@
+package ch.asynk;
+
+public class MyException extends Exception
+{
+ private static final long serialVersionUID = 01235;
+
+ public MyException(String message)
+ {
+ super(message);
+ }
+}