aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKostya <mail@sartin.in>2026-07-25 08:25:53 +0000
committerKostya <mail@sartin.in>2026-07-25 08:25:53 +0000
commit0290b3ea1c810f21ce29efc3b7f24969aeeba9c4 (patch)
treea23e2d7cf10168b28d689181a4530720476a914b
parent5504ca88e98f8451a6dc1c719862f32ca54bfc50 (diff)
downloadjava-bootstrap-0290b3ea1c810f21ce29efc3b7f24969aeeba9c4.tar.gz
java-bootstrap-0290b3ea1c810f21ce29efc3b7f24969aeeba9c4.tar.xz
java-bootstrap-0290b3ea1c810f21ce29efc3b7f24969aeeba9c4.zip
build scripts
-rw-r--r--.classpath20
-rw-r--r--.project28
-rw-r--r--run.bat2
-rw-r--r--run.sh2
-rw-r--r--src/main/java/com/example/App.java7
-rw-r--r--src/test/java/com/example/AppTest.java3
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>
diff --git a/run.bat b/run.bat
index 73d3903..6d3f6e6 100644
--- a/run.bat
+++ b/run.bat
@@ -4,7 +4,7 @@ rmdir /s /q bin
4mkdir bin 4mkdir bin
5 5
6:: compile source files and include libraries 6:: compile source files and include libraries
7javac -d bin -cp "lib/*" src/com/example/App.java 7javac -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
10if %errorlevel% equ 0 ( 10if %errorlevel% equ 0 (
diff --git a/run.sh b/run.sh
index 173c155..d50ae4d 100644
--- a/run.sh
+++ b/run.sh
@@ -4,7 +4,7 @@
4rm -rf bin && mkdir bin 4rm -rf bin && mkdir bin
5 5
6# run the app if compilation succeeded 6# run the app if compilation succeeded
7if javac -d bin -cp "lib/*" src/com/example/App.java; then 7if 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
10else 10else
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 @@
1package com.example;
2
3public 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 @@
1package com.example;
2
3public class AppTest {}