# Untitled

`compile group: 'org.slf4j', name: 'slf4j-api', version: '2.0.0-alpha1'` -> `slf4j-api-2.0.0-alpha1.jar`

testCompile group: 'org.slf4j', name: 'slf4j-simple', version: '2.0.0-alpha1'

This <https://crunchify.com/how-to-add-resources-folder-properties-at-runtime-into-intellijs-classpath-adding-property-files-to-classpath/> help me added a resources folder in intellij project

{% embed url="<https://www.pixelstech.net/article/1549365534-The-difference-between-System-load-and-System-loadLibrary-in-Java#comment_zone>" %}

Get OS type:

```java
  private static final int osType;
  
  String osName = System.getProperty("os.name");
  if (osName.startsWith("Linux")) {
      if ("dalvik".equals(System.getProperty("java.vm.name").toLowerCase())) {
          osType = ANDROID;
          // Native libraries on android must be bundled with the APK
          System.setProperty("jna.nounpack", "true");
      }
      else {
          osType = LINUX;
      }
  }
  else if (osName.startsWith("AIX")) {
      osType = AIX;
  }
  else if (osName.startsWith("Mac") || osName.startsWith("Darwin")) {
      osType = MAC;
  }
  else if (osName.startsWith("Windows CE")) {
      osType = WINDOWSCE;
  }
  else if (osName.startsWith("Windows")) {
      osType = WINDOWS;
  }
  else if (osName.startsWith("Solaris") || osName.startsWith("SunOS")) {
      osType = SOLARIS;
  }
  else if (osName.startsWith("FreeBSD")) {
      osType = FREEBSD;
  }
  else if (osName.startsWith("OpenBSD")) {
      osType = OPENBSD;
  }
  else if (osName.equalsIgnoreCase("gnu")) {
      osType = GNU;
  }
  else if (osName.equalsIgnoreCase("gnu/kfreebsd")) {
      osType = KFREEBSD;
  }
  else if (osName.equalsIgnoreCase("netbsd")) {
      osType = NETBSD;
  }
  else {
      osType = UNSPECIFIED;
  }
  boolean hasBuffers = false;
  try {
      Class.forName("java.nio.Buffer");
      hasBuffers = true;
  }
  catch(ClassNotFoundException e) {
  }
  // NOTE: we used to do Class.forName("java.awt.Component"), but that
  // has the unintended side effect of actually loading AWT native libs,
  // which can be problematic
  HAS_AWT = osType != WINDOWSCE && osType != ANDROID && osType != AIX;
  HAS_JAWT = HAS_AWT && osType != MAC;
  HAS_BUFFERS = hasBuffers;
  RO_FIELDS = osType != WINDOWSCE;
  C_LIBRARY_NAME = osType == WINDOWS ? "msvcrt" : osType == WINDOWSCE ? "coredll" : "c";
  MATH_LIBRARY_NAME = osType == WINDOWS ? "msvcrt" : osType == WINDOWSCE ? "coredll" : "m";
  HAS_DLL_CALLBACKS = osType == WINDOWS;
  ARCH = getCanonicalArchitecture(System.getProperty("os.arch"), osType);
  RESOURCE_PREFIX = getNativeLibraryResourcePrefix();
}
```

\`

```java
String osName = System.getProperty("os.name");
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ref.gitbook.io/notes/java/untitled.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
