BAEL-2323 Adding files for native keyword tutorial (#5913)
* BAEL-2323 Adding files for native keyword tutorial * junit test files and native library * update test method name
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
package com.baeldung.nativekeyword;
|
||||
|
||||
public class DateTimeUtils {
|
||||
|
||||
public native String getSystemTime();
|
||||
|
||||
static {
|
||||
System.loadLibrary("nativedatetimeutils");
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.baeldung.nativekeyword;
|
||||
|
||||
import com.baeldung.nativekeyword.DateTimeUtils;
|
||||
|
||||
public class NativeMainApp {
|
||||
public static void main(String[] args) {
|
||||
DateTimeUtils dateTimeUtils = new DateTimeUtils();
|
||||
String input = dateTimeUtils.getSystemTime();
|
||||
System.out.println("System time is : " + input);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user