Showing posts with label Windows 10. Show all posts
Showing posts with label Windows 10. Show all posts

Saturday, August 29, 2015

Get info of running jvm, os and cpu - tested on Windows 10

Java example to display information of running jvm, os and cpu:

package java_systemproperties;
 
/**
 * @web http://java-buddy.blogspot.com/
 */
public class Java_SystemProperties {
 
    public static void main(String[] args) {
        System.out.println("java.vm.name:\t" 
                + System.getProperty("java.vm.name"));
        System.out.println("java.vm.specification.name:\t" 
                + System.getProperty("java.vm.specification.name"));
        System.out.println("java.vm.specification.version:\t" 
                + System.getProperty("java.vm.specification.version"));
        System.out.println("java.vm.specification.vendor:\t" 
                + System.getProperty("java.vm.specification.vendor"));
        
        System.out.println("os.name:\t" + System.getProperty("os.name"));
        System.out.println("os.version:\t" + System.getProperty("os.version"));
        System.out.println("os.arch:\t" + System.getProperty("os.arch"));
        System.out.println("sun.arch.data.model:\t" 
                + System.getProperty("sun.arch.data.model") + " bit");
        
        System.out.println("PROCESSOR_IDENTIFIER:\t" 
                + System.getenv("PROCESSOR_IDENTIFIER"));
        System.out.println("PROCESSOR_ARCHITECTURE:\t" 
                + System.getenv("PROCESSOR_ARCHITECTURE"));
        System.out.println("NUMBER_OF_PROCESSORS:\t" 
                + System.getenv("NUMBER_OF_PROCESSORS"));

    }
}


Run on Windows 10, with Intel i5 64 bit CPU
Related: Get system properties with System.getProperties()

Install NetBeans IDE on Windows 10

This video show how to install NetBeans IDE (currently 8.0.2) on Microsoft Windows 10.




To download NetBeans IDE, visit https://netbeans.org/


Friday, August 28, 2015

Install JDK 8 on Windows 10, and set Path

Browse to Oracle Java SE Downloads (http://www.oracle.com/technetwork/java/javase/downloads/index.html) to download the latest JDK.


Check the option to Accept License Agreement, and select the download file. "jdk-8u60-windows-x64.exe" in my case.


Run the downloaded file after download completed. And follow the steps.


After installed JDK, you have to set Path to it.

To set path, search "Environment Variables", click "Edit the system environment variables".

Click on "Environment Variables..."

Select and edit Path

Add the  path of the bin folder of your JDK, "C:\Program Files\Java\jdk1.8.0_60\bin" in my case.


After path set, you can run javac in command prompt.