How to get operating system name and version in java

This example shows you to get the operating system information from java programme. To get the operating system information throw java programme, you can use the some system property like ‘os.name’, ‘os.version’, ‘os.arch’. Below is the example code of getting operating system information from java. package com.java.connect.lang; //How to get operating system name and version […]

Continue reading


How to get Java Home directory

This example shows you how to get the java home directory in java programme. To get Java Home directory we can obtain it from system properties using the ‘java.home’ key. Below is the example code for getting the java home directory. package com.java.connect.lang; //How to get Java Home directory public class JavaHomeDirectoryExample { public static […]

Continue reading


How to execute external window application from java

This example shows how you can execute external window application from java. You can run any external application throw java programme also. The below example code of java allows you run other application in your operating system. package com.java.connect.lang; //How to execute external window application from java import java.io.IOException; public class ApplicationExecutionExample { public static […]

Continue reading