io.github.rmuhamedgaliev.service.OS.impl.OSInformationImpl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SystemInformation Show documentation
Show all versions of SystemInformation Show documentation
Library for getting information about local computer implemented on java. Used 2 Linux commands, other implemented on Java.
package io.github.rmuhamedgaliev.service.OS.impl;
import io.github.rmuhamedgaliev.service.OS.OSInformation;
import org.springframework.stereotype.Service;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Developer: Muhamedgaliev Rinat
* Date: 5/1/13
* Time: 12:34 PM
*/
@Service(value = "osInformation")
public class OSInformationImpl implements OSInformation {
@Override
public String getOSVersion() {
return System.getProperty("os.version");
}
@Override
public String getOSArch() {
return System.getProperty("os.arch");
}
@Override
public String getOSDate() {
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
Date date = new Date();
return dateFormat.format(date);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy