-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use Java 22's foreign function API for Windows
- Loading branch information
Showing
15 changed files
with
545 additions
and
500 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
sbt.version=1.9.8 | ||
sbt.version=1.10.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
package dev.dirs; | ||
|
||
import java.util.Locale; | ||
|
||
public class Constants { | ||
|
||
static final String operatingSystemName = System.getProperty("os.name"); | ||
public static final char operatingSystem; | ||
static final char LIN = 'l'; | ||
static final char MAC = 'm'; | ||
static final char WIN = 'w'; | ||
static final char BSD = 'b'; | ||
static final char SOLARIS = 's'; | ||
static final char IBMI = 'i'; | ||
static final char AIX = 'a'; | ||
|
||
public static final String UTF8_BOM = "\ufeff"; | ||
|
||
static { | ||
final String os = operatingSystemName.toLowerCase(Locale.ROOT); | ||
if (os.contains("linux")) | ||
operatingSystem = LIN; | ||
else if (os.contains("mac")) | ||
operatingSystem = MAC; | ||
else if (os.contains("windows")) | ||
operatingSystem = WIN; | ||
else if (os.contains("bsd")) | ||
operatingSystem = BSD; | ||
else if (os.contains("sunos")) | ||
operatingSystem = SOLARIS; | ||
else if (os.contains("os/400") || os.contains("os400")) | ||
operatingSystem = IBMI; | ||
else if (os.contains("aix")) | ||
operatingSystem = AIX; | ||
else | ||
throw new UnsupportedOperatingSystemException("directories are not supported on " + operatingSystemName); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.