diff options
author | Petr Mrázek <peterix@gmail.com> | 2016-04-10 15:53:05 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2016-05-01 00:00:14 +0200 |
commit | b6d455a02bd338e9dc0faa09d4d8177ecd8d569a (patch) | |
tree | 41982bca1ede50049f2f8c7109dd18edeefde6d0 /libraries/javacheck | |
parent | 47e37635f50c09b4f9a9ee7699e3120bab3e4088 (diff) | |
download | MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.tar MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.tar.gz MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.tar.lz MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.tar.xz MultiMC-b6d455a02bd338e9dc0faa09d4d8177ecd8d569a.zip |
NOISSUE reorganize and document libraries
Diffstat (limited to 'libraries/javacheck')
-rw-r--r-- | libraries/javacheck/.gitignore | 6 | ||||
-rw-r--r-- | libraries/javacheck/CMakeLists.txt | 13 | ||||
-rw-r--r-- | libraries/javacheck/JavaCheck.java | 24 |
3 files changed, 43 insertions, 0 deletions
diff --git a/libraries/javacheck/.gitignore b/libraries/javacheck/.gitignore new file mode 100644 index 00000000..cc1c52bf --- /dev/null +++ b/libraries/javacheck/.gitignore @@ -0,0 +1,6 @@ +.idea +*.iml +out +.classpath +.idea +.project diff --git a/libraries/javacheck/CMakeLists.txt b/libraries/javacheck/CMakeLists.txt new file mode 100644 index 00000000..9768650e --- /dev/null +++ b/libraries/javacheck/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.1) +project(launcher Java) +find_package(Java 1.6 REQUIRED COMPONENTS Development) + +include(UseJava) +set(CMAKE_JAVA_JAR_ENTRY_POINT JavaCheck) +set(CMAKE_JAVA_COMPILE_FLAGS -target 1.6 -source 1.6 -Xlint:deprecation -Xlint:unchecked) + +set(SRC + JavaCheck.java +) + +add_jar(JavaCheck ${SRC}) diff --git a/libraries/javacheck/JavaCheck.java b/libraries/javacheck/JavaCheck.java new file mode 100644 index 00000000..11420b86 --- /dev/null +++ b/libraries/javacheck/JavaCheck.java @@ -0,0 +1,24 @@ +import java.lang.Integer; + +public class JavaCheck +{ + private static final String[] keys = {"os.arch", "java.version"}; + public static void main (String [] args) + { + int ret = 0; + for(String key : keys) + { + String property = System.getProperty(key); + if(property != null) + { + System.out.println(key + "=" + property); + } + else + { + ret = 1; + } + } + + System.exit(ret); + } +} |