aboutsummaryrefslogtreecommitdiff
path: root/pdf-as-lib/src/main/java
diff options
context:
space:
mode:
authorAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-24 12:10:22 +0200
committerAndreas Fitzek <andreas.fitzek@iaik.tugraz.at>2014-10-24 12:10:22 +0200
commit394f409032f5af13a34faac251d9929ef64729d1 (patch)
treee86972f62fe8461ad2019fd84c886e484a7debe4 /pdf-as-lib/src/main/java
parent0a291a645e91294553c3171b9291fbf60ee3fae2 (diff)
downloadpdf-as-4-394f409032f5af13a34faac251d9929ef64729d1.tar.gz
pdf-as-4-394f409032f5af13a34faac251d9929ef64729d1.tar.bz2
pdf-as-4-394f409032f5af13a34faac251d9929ef64729d1.zip
Output System informations
Diffstat (limited to 'pdf-as-lib/src/main/java')
-rw-r--r--pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java
index acfb7ef5..ae5d7aca 100644
--- a/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java
+++ b/pdf-as-lib/src/main/java/at/gv/egiz/pdfas/lib/api/PdfAsFactory.java
@@ -32,6 +32,9 @@ import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
+import java.lang.management.ManagementFactory;
+import java.lang.management.OperatingSystemMXBean;
+import java.lang.management.RuntimeMXBean;
import java.security.Provider;
import java.security.Security;
import java.util.zip.ZipEntry;
@@ -119,6 +122,27 @@ public class PdfAsFactory implements IConfigurationConstants {
logger.info(str);
}
+ private static void showRuntimeInformation() {
+ try {
+ RuntimeMXBean runtimeBean = ManagementFactory.getRuntimeMXBean();
+ OperatingSystemMXBean osBean = ManagementFactory.getOperatingSystemMXBean();
+ teeInformation("+ OS Name: " + osBean.getName());
+ teeInformation("+ OS Version: " + osBean.getVersion());
+ teeInformation("+ OS Arch: " + osBean.getArch());
+ teeInformation("+ JAVA Version: " + runtimeBean.getSystemProperties().get("java.runtime.version"));
+ teeInformation("+ JAVA Spec ----------------------------------------------------------");
+ teeInformation("+ JAVA Spec Name: " + runtimeBean.getSpecName());
+ teeInformation("+ JAVA Spec Version: " + runtimeBean.getSpecVersion());
+ teeInformation("+ JAVA Spec Vendor: " + runtimeBean.getSpecVendor());
+ teeInformation("+ JAVA VM ----------------------------------------------------------");
+ teeInformation("+ JAVA VM Name: " + runtimeBean.getVmName());
+ teeInformation("+ JAVA VM Version: " + runtimeBean.getVmVersion());
+ teeInformation("+ JAVA VM Vendor: " + runtimeBean.getVmVendor());
+ } catch(Throwable e) {
+ teeInformation("+ Failed to show runtime informations");
+ }
+ }
+
/**
* Configure log.
*
@@ -134,6 +158,7 @@ public class PdfAsFactory implements IConfigurationConstants {
teeInformation("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
teeInformation("+ PDF-AS: " + getVersion());
teeInformation("+ PDF-AS SCM Revision: " + getSCMRevision());
+ showRuntimeInformation();
registerSecurityProvider(configuration);
teeInformation("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");