From b51bc8d1204668ab4928c94bf35fdfee8daf2dd6 Mon Sep 17 00:00:00 2001 From: Sage The DM Date: Tue, 22 Oct 2024 09:44:07 +0200 Subject: [PATCH] Added a new Project --- .../src/main/java/com/example/App.java | 3 +- .../target/classes/com/example/App.class | Bin 1237 -> 1237 bytes Code/ost/_01_hello_world/pom.xml | 46 ++++++++++++++++++ .../src/main/java/com/example/App.java | 30 ++++++++++++ .../src/main/java/com/example/SystemInfo.java | 13 +++++ .../src/main/java/module-info.java | 4 ++ .../target/classes/com/example/App.class | Bin 0 -> 1723 bytes .../classes/com/example/SystemInfo.class | Bin 0 -> 561 bytes .../target/classes/module-info.class | Bin 0 -> 200 bytes 9 files changed, 95 insertions(+), 1 deletion(-) create mode 100644 Code/ost/_01_hello_world/pom.xml create mode 100644 Code/ost/_01_hello_world/src/main/java/com/example/App.java create mode 100644 Code/ost/_01_hello_world/src/main/java/com/example/SystemInfo.java create mode 100644 Code/ost/_01_hello_world/src/main/java/module-info.java create mode 100644 Code/ost/_01_hello_world/target/classes/com/example/App.class create mode 100644 Code/ost/_01_hello_world/target/classes/com/example/SystemInfo.class create mode 100644 Code/ost/_01_hello_world/target/classes/module-info.class diff --git a/Code/ost/_00_hello_world/src/main/java/com/example/App.java b/Code/ost/_00_hello_world/src/main/java/com/example/App.java index d2930cc..dbf87b2 100644 --- a/Code/ost/_00_hello_world/src/main/java/com/example/App.java +++ b/Code/ost/_00_hello_world/src/main/java/com/example/App.java @@ -10,7 +10,8 @@ import javafx.stage.Stage; * JavaFX App */ public class App extends Application { - + // Method start is already defined int the library Application so we have to + // Override it @Override public void start(Stage stage) { diff --git a/Code/ost/_00_hello_world/target/classes/com/example/App.class b/Code/ost/_00_hello_world/target/classes/com/example/App.class index 247092fa86f69777bf59cee48b7fc9e1590a1fe1..65da2494513d87dd149f33ffb17dd97ca7095d3a 100644 GIT binary patch delta 47 zcmcc0d6jd67K@}10}F#N0|$dBkQ8GuVi0GrV31(2VUV2c%u>iI3zU_aypu%+0I-+` A3IG5A delta 47 zcmcc0d6jd67K@}H0}F!?0|$c$gD`_AgAs!mg9U>)gAIekWM`H_RvDnI^yHl^G61j5 B2LS*8 diff --git a/Code/ost/_01_hello_world/pom.xml b/Code/ost/_01_hello_world/pom.xml new file mode 100644 index 0000000..1ca6d84 --- /dev/null +++ b/Code/ost/_01_hello_world/pom.xml @@ -0,0 +1,46 @@ + + 4.0.0 + com.example + _01_hello_world + 1.0-SNAPSHOT + + UTF-8 + 11 + 11 + + + + org.openjfx + javafx-controls + 13 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.0 + + 11 + + + + org.openjfx + javafx-maven-plugin + 0.0.6 + + + + + default-cli + + com.example.App + + + + + + + diff --git a/Code/ost/_01_hello_world/src/main/java/com/example/App.java b/Code/ost/_01_hello_world/src/main/java/com/example/App.java new file mode 100644 index 0000000..f7f7cfc --- /dev/null +++ b/Code/ost/_01_hello_world/src/main/java/com/example/App.java @@ -0,0 +1,30 @@ +package com.example; + +import javafx.application.Application; +import javafx.scene.Scene; +import javafx.scene.control.Label; +import javafx.scene.layout.StackPane; +import javafx.stage.Stage; + + +/** + * JavaFX App + */ +public class App extends Application { + + @Override + public void start(Stage stage) { + var javaVersion = SystemInfo.javaVersion(); + var javafxVersion = SystemInfo.javafxVersion(); + + var label = new Label("Hello, JavaFX " + javafxVersion + ", running on Java " + javaVersion + "."); + var scene = new Scene(new StackPane(label), 640, 480); + stage.setScene(scene); + stage.show(); + } + + public static void main(String[] args) { + launch(); + } + +} \ No newline at end of file diff --git a/Code/ost/_01_hello_world/src/main/java/com/example/SystemInfo.java b/Code/ost/_01_hello_world/src/main/java/com/example/SystemInfo.java new file mode 100644 index 0000000..b566a3e --- /dev/null +++ b/Code/ost/_01_hello_world/src/main/java/com/example/SystemInfo.java @@ -0,0 +1,13 @@ +package com.example; + +public class SystemInfo { + + public static String javaVersion() { + return System.getProperty("java.version"); + } + + public static String javafxVersion() { + return System.getProperty("javafx.version"); + } + +} \ No newline at end of file diff --git a/Code/ost/_01_hello_world/src/main/java/module-info.java b/Code/ost/_01_hello_world/src/main/java/module-info.java new file mode 100644 index 0000000..5918012 --- /dev/null +++ b/Code/ost/_01_hello_world/src/main/java/module-info.java @@ -0,0 +1,4 @@ +module com.example { + requires javafx.controls; + exports com.example; +} diff --git a/Code/ost/_01_hello_world/target/classes/com/example/App.class b/Code/ost/_01_hello_world/target/classes/com/example/App.class new file mode 100644 index 0000000000000000000000000000000000000000..7559e7ff2cedaa0a9abc15626d8fcc34fed4bd61 GIT binary patch literal 1723 zcmZuxZC4XV6n=)hY>c5uj9`4BQL!a}Zd+TiL@gSMU<1;IMpOG`SjJ>!Gn2EsvGS## z`Xl-``UN<0^au1u_4Ll}N_K^uli7K>_qoq~?w$Gfzjq%1EZ}zoBMf7f>Y3s#@AVyF zKI-=kq#34O^Edp}Ta)+uj%{(@R#KmRoHJza+tT(QGNfjzErxVm?T9>5I8#6dSwd~t zQfv%*+rr)A+m2u;Hk8Gk7I$sEjyBVN*Y+638=sJzETC0aDm~h_HGH+qZ}AYGt~gjbhzvgmTSvSO+!r9}l8{#lxQZzv+T**Tt|ZCz-1fUPBf`?B^zMZz zBx0UqaVoJgDq7KN3>QuTskRKo0_J9n+#VI`wrhz17GWB?QU{y@+B#sFxd#I zIE|`~IjgmQc`SaAyfz^1vrB(b;`GZd{TWX3xQ?&1*Vm-iuwsGJCU=GOYs<^JXm{|P zfp24+hea*mE*2Pap74Vl615MIg6*L8ckq1yi@MX&URV7Qwo8ZFtaMCx2u$5nJgGPN zIJ$-mSB`yxD2WOOov63t&@nPZpvP_MtcgggM3r@ceq=bORgNFz!SJMjRn+M!IeZ|k zE&*}3L)~&d)I4rZB=Su)a4oT7>${YryLek;67*xGe9w1ze_i-pwd3XS3_ly#WSAaC zwdEVNtM88P_pnD-xaBK%PdD!`41dSFE3ys&SGnAAgg4z#YIo4DozyY5lW^SH>x)y& zR6zcSod6^^6kD^Dryl@}E@UvURgQaTkSgUt%N z%}`jAQn+=8d!FzNykNL_LWR@vGVojU>V>)|GKnOhQiUSm8kH{sT4>7TEgmU}V{5xC* z4)FP6`UuzCN0@G>-{XsRs+?{fV5Wq*5^f#9T+GasGyC{vZXfrCk*5OWaimcs^pbw! z=;5Eh15Dx(tu&*DVbq8b#YYYIiBp`fs5{D}7gpj! literal 0 HcmV?d00001 diff --git a/Code/ost/_01_hello_world/target/classes/com/example/SystemInfo.class b/Code/ost/_01_hello_world/target/classes/com/example/SystemInfo.class new file mode 100644 index 0000000000000000000000000000000000000000..487f8e1ef68812d4c9105ba77a7d5fed29e78421 GIT binary patch literal 561 zcmZut%TB^j5Iw`IP>LWT;%niCfD5{GfpKGEV$!GyhJC3Qyo9!-6as&xD~$_3z>hM{ zZBaCKGjr$MbLPy<$LHHSfHNFxND=Ce@0wz1yVHpYse5PV|!tn6Wbe^ zw}Y{8LPG9bdNRBqq+9JiA#>?J2pwq@3}lfblr8Cro4Gp>!M#102tw8J9edKZ1F7mY zm-MfUM^6raZCVh`kYqhP-FugF4-l&_$Ho;JEXAu*1>|j?z?a%1(QU>bS zY>m*H|fPaX$^tr+^YCg?qX9ysDks;$eLQ+5;)C*Yg$ z-NBL6tvG62nVgAp_Vfk$XMUuhb5!4oTI6WN1kNR{3fMxK5hZR$Kg_OHUQvBwScu|~Xqt=)Yq1`Xk1LQs#iecmihA}3N8$>~7m