org.lwjgl.system.Configuration Maven / Gradle / Ivy
Show all versions of org.lwjgl.lwjgl Show documentation
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
*/
package org.lwjgl.system;
import org.lwjgl.system.MemoryUtil.*;
import javax.annotation.*;
import java.io.*;
import java.util.function.*;
/**
* This class can be used to programmatically set the LWJGL runtime configuration. It is an alternative to using system properties.
*
* Care must be taken when setting static options. Such options are only read once or cached in {@code static final} fields. They must be
* configured through this class before touching any other LWJGL class.
*/
public class Configuration {
/**
* Takes priority over {@code java.library.path}. It may contain one or more directory paths, separated by {@link File#pathSeparator}.
*
*
* Property: org.lwjgl.librarypath
* Usage: Dynamic
*/
public static final Configuration LIBRARY_PATH = new Configuration<>("org.lwjgl.librarypath", StateInit.STRING);
/**
* Sets the mapping algorithm used to resolve the name of bundled shared libraries. Supported values:
*
*
* - default - Maps {@code
} to {@code }.
* - legacy - Maps {@code
} to {@code is64bit(arch) ? : 32}.
* - <classpath> - A class that implements the {@link Function Function<String, String>} interface. It will be instantiated using reflection.
*
*
* When set programmatically, it can also be a {@link Function Function<String, String>} instance.
*
*
* Property: org.lwjgl.system.bundledLibrary.nameMapper
* Type: String or a {@link Function Function<String, String>} instance
* Usage: Static
*/
public static final Configuration