()
| 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(() -> { |
nothing calls this directly
no test coverage detected