diff options
| -rw-r--r-- | .classpath | 20 | ||||
| -rw-r--r-- | .project | 28 | ||||
| -rw-r--r-- | run.bat | 2 | ||||
| -rw-r--r-- | run.sh | 2 | ||||
| -rw-r--r-- | src/main/java/com/example/App.java | 7 | ||||
| -rw-r--r-- | src/test/java/com/example/AppTest.java | 3 |
6 files changed, 60 insertions, 2 deletions
diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..7f8bc25 --- /dev/null +++ b/.classpath | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <classpath> | ||
| 3 | <!-- Defines your source folder --> | ||
| 4 | <classpathentry kind="src" output="bin/classes" path="src/main/java"> | ||
| 5 | <attributes> | ||
| 6 | <attribute name="optional" value="true"/> | ||
| 7 | </attributes> | ||
| 8 | </classpathentry> | ||
| 9 | <classpathentry kind="src" output="bin/test-classes" path="src/test/java"> | ||
| 10 | <attributes> | ||
| 11 | <attribute name="optional" value="true"/> | ||
| 12 | <attribute name="test" value="true"/> | ||
| 13 | </attributes> | ||
| 14 | </classpathentry> | ||
| 15 | <!-- Defines the standard Java System Library --> | ||
| 16 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
| 17 | <!-- Defines where compiled .class files go --> | ||
| 18 | <classpathentry kind="output" path="bin"/> | ||
| 19 | </classpath> | ||
| 20 | |||
diff --git a/.project b/.project new file mode 100644 index 0000000..c3b90e2 --- /dev/null +++ b/.project | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <projectDescription> | ||
| 3 | <name>App</name> | ||
| 4 | <comment></comment> | ||
| 5 | <projects> | ||
| 6 | </projects> | ||
| 7 | <buildSpec> | ||
| 8 | <buildCommand> | ||
| 9 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
| 10 | <arguments> | ||
| 11 | </arguments> | ||
| 12 | </buildCommand> | ||
| 13 | </buildSpec> | ||
| 14 | <natures> | ||
| 15 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
| 16 | </natures> | ||
| 17 | <filteredResources> | ||
| 18 | <filter> | ||
| 19 | <id>1784965956299</id> | ||
| 20 | <name></name> | ||
| 21 | <type>30</type> | ||
| 22 | <matcher> | ||
| 23 | <id>org.eclipse.core.resources.regexFilterMatcher</id> | ||
| 24 | <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments> | ||
| 25 | </matcher> | ||
| 26 | </filter> | ||
| 27 | </filteredResources> | ||
| 28 | </projectDescription> | ||
| @@ -4,7 +4,7 @@ rmdir /s /q bin | |||
| 4 | mkdir bin | 4 | mkdir bin |
| 5 | 5 | ||
| 6 | :: compile source files and include libraries | 6 | :: compile source files and include libraries |
| 7 | javac -d bin -cp "lib/*" src/com/example/App.java | 7 | javac -d bin -cp "lib/*" src/main/java/com/example/App.java |
| 8 | 8 | ||
| 9 | :: run the application if compilation succeeded | 9 | :: run the application if compilation succeeded |
| 10 | if %errorlevel% equ 0 ( | 10 | if %errorlevel% equ 0 ( |
| @@ -4,7 +4,7 @@ | |||
| 4 | rm -rf bin && mkdir bin | 4 | rm -rf bin && mkdir bin |
| 5 | 5 | ||
| 6 | # run the app if compilation succeeded | 6 | # run the app if compilation succeeded |
| 7 | if javac -d bin -cp "lib/*" src/com/example/App.java; then | 7 | if javac -d bin -cp "lib/*" src/main/java/com/example/App.java; then |
| 8 | echo "--- Running Application ---" | 8 | echo "--- Running Application ---" |
| 9 | java -cp "bin:lib/*" com.example.App | 9 | java -cp "bin:lib/*" com.example.App |
| 10 | else | 10 | else |
diff --git a/src/main/java/com/example/App.java b/src/main/java/com/example/App.java new file mode 100644 index 0000000..5777405 --- /dev/null +++ b/src/main/java/com/example/App.java | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | package com.example; | ||
| 2 | |||
| 3 | public class App { | ||
| 4 | public static void main() { | ||
| 5 | IO.println("Hello World"); | ||
| 6 | } | ||
| 7 | } | ||
diff --git a/src/test/java/com/example/AppTest.java b/src/test/java/com/example/AppTest.java new file mode 100644 index 0000000..0b08c28 --- /dev/null +++ b/src/test/java/com/example/AppTest.java | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | package com.example; | ||
| 2 | |||
| 3 | public class AppTest {} | ||