MCPcopy Create free account
hub / github.com/HumbleUI/Skija / Main

Method Main

examples/kwinit/src_java/Main.java:42–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40 public String os;
41
42 public Main() {
43 var osName = System.getProperty("os.name").toLowerCase();
44 String library;
45 if (osName.contains("mac") || osName.contains("darwin")) {
46 os = "macOS";
47 library = "target/release/libkwinit.dylib";
48 } else if (osName.contains("windows")) {
49 os = "Windows";
50 library = "target\\release\\kwinit.dll";
51 } else if (osName.contains("nux") || osName.contains("nix")) {
52 os = "Linux";
53 library = "target/release/libkwinit.so";
54 } else
55 throw new RuntimeException("Unknown operation system");
56
57 System.load(java.nio.file.Path.of(library).toAbsolutePath().toString());
58 }
59
60 public void run() {
61 new Thread(() -> {

Callers

nothing calls this directly

Calls 4

getPropertyMethod · 0.80
loadMethod · 0.80
toStringMethod · 0.65
containsMethod · 0.45

Tested by

no test coverage detected