java-os-detector

Java library which returns normalized OS and architecture name based on os.name and os.arch system properties.

Лицензия

Лицензия

Категории

Категории

Java Языки программирования
Группа

Группа

com.github.tnakamot
Идентификатор

Идентификатор

java-os-detector
Последняя версия

Последняя версия

0.2.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

java-os-detector
Java library which returns normalized OS and architecture name based on os.name and os.arch system properties.
Ссылка на сайт

Ссылка на сайт

https://github.com/tnakamot/java-os-detector
Организация-разработчик

Организация-разработчик

com.github.tnakamot
Система контроля версий

Система контроля версий

https://github.com/tnakamot/java-os-detector

Скачать java-os-detector

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.tnakamot/java-os-detector/ -->
<dependency>
    <groupId>com.github.tnakamot</groupId>
    <artifactId>java-os-detector</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.tnakamot/java-os-detector/
implementation 'com.github.tnakamot:java-os-detector:0.2.0'
// https://jarcasting.com/artifacts/com.github.tnakamot/java-os-detector/
implementation ("com.github.tnakamot:java-os-detector:0.2.0")
'com.github.tnakamot:java-os-detector:jar:0.2.0'
<dependency org="com.github.tnakamot" name="java-os-detector" rev="0.2.0">
  <artifact name="java-os-detector" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.tnakamot', module='java-os-detector', version='0.2.0')
)
libraryDependencies += "com.github.tnakamot" % "java-os-detector" % "0.2.0"
[com.github.tnakamot/java-os-detector "0.2.0"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.scala-lang : scala-library jar 2.12.10

Модули Проекта

Данный проект не имеет модулей.

java-os-detector

This is a Java library providing methods to get normalized OS and architecture name based on os.name and os.arch system properties. The normalized names provided by this library is useful for platform-dependent projects.

This is a repackage of os-maven-plugin, which is meant to be used in pom.xml. On the other hands, this library is very minimal and meant to be used in other Java programs.

Below is a quote from os-maven-plugin to explain the benefit of this library.

${os.name} and ${os.arch} are often subtly different between JVM and operating system
versions or they sometimes contain machine-unfriendly characters such as whitespaces.
This plugin tries to remove such fragmentation so that you can determine the current
operating system and architecture reliably.

Install

The packages of this library are distributed through Maven Central.

Maven

Add the following lines to your pom.xml.

<dependency>
  <groupId>com.github.tnakamot</groupId>
  <artifactId>java-os-detector</artifactId>
  <version>0.2.0</version>
  <type>pom</type>
</dependency>

sbt

To use this library in your sbt project, add the following sbt setting (e.g. in build.sbt).

libraryDependencies += "com.github.tnakamot" % "java-os-detector" % "0.2.0",

Usage

This library provides only one class Detector. First import this class in your Java program.

import com.github.tnakamot.os.Detector;

This class provides two static public methods.

Detector.getNormalizedOSName();
Detector.getNormalizedArchitectureName();

They return a String of the normalized OS and architecture name respectively. To know what actually the normalized OS and architecture names are, see the description about os.detected.name and os.detected.arch properties of os-maven-plugin.

Версии библиотеки

Версия
0.2.0
0.1.5
0.1.4