Extract /Sanity/build-java-project out of /Sanity/smoke

/Sanity/smoke is intended to work with all possible Java versions,
JDK, JRE, or even minimal Java installations created with jlink.
This commit is contained in:
Mikolaj Izdebski 2024-12-02 09:08:33 +01:00
commit 367b225f17
7 changed files with 47 additions and 31 deletions

View file

@ -0,0 +1,28 @@
package tt;
/** Very sophisticated functionality.
@author Mikolaj Izdebski
*/
public class My {
/** Some non-trivial code here.
@param x first substrate
@param y second substrate
@return sum of the two
*/
public int add(int x, int y) {
return x + y;
}
/** Maint entry point.
@arg args string arguments
*/
public static void main(String[] args) {
String s1 = args[0];
String s2 = args[1];
int i1 = Integer.parseInt(s1);
int i2 = Integer.parseInt(s2);
My adder = new My();
int result = adder.add(i1, i2);
System.out.println("RESULT is " + result);
}
}