You are here

Install JDK

The Alfresco SDK is based on Maven, which requires the JDK to be installed. This topic steps you through installing the JDK and verifying its installation.
There are no pre-requisites for this tutorial.
To use the Alfresco SDK most effectively you need to have Oracle JDK 1.7 installed. Maven requires that the JDK be installed - the Java run-time alone is not sufficient.

Checking for the availability of JDK.

  1. Check if you have the JDK already installed. Go to your command line and type the following command:

                            
    javac -version                        
                            
                        

    You will see a message such as the following, if you have the JDK installed:

                            
    javac 1.7.0_12-ea                        
                            
                        

    If you get "command not found" you need to install the JDK. Also if you have a version of the JDK prior to 1.7 you will need to install 1.7 or above. It is possible to have multiple versions of the JDK installed (and multiple Java run-times). You will later see how you can configure your JAVA_HOME variable so that Maven uses the correct version of the JDK.

Downloading the JDK.

  1. Download the JDK 7 from the Oracle JDK site.

Installing the JDK.

  1. Carefully review the Oracle JDK installation guide as appropriate for your system.
  2. Install the JDK, following the Oracle instructions.

Verifying the JDK is successfully installed.

  1. Go to your command line and type the following command:

                            
    javac -version                        
                            
                        

    This will display information such as the following:

                            
    javac 1.7.0_12-ea                        
                            
                        

    To be extra sure you should also check your Java run-time by entering the following command:

                            
    java -version                        
                            
                        

    This will display information such as the following:

                            
    java version "1.7.0_12-ea"
    Java(TM) SE Runtime Environment (build 1.7.0_12-ea-b08)
    Java HotSpot(TM) 64-Bit Server VM (build 24.0-b28, mixed mode)                        
    
                        

    Double check that the version of Java installed is correct (1.7 or above).

You now have JDK 1.7 installed and you have verified that you are running the correct version of Java.

Sending feedback to the Alfresco documentation team

You don't appear to have JavaScript enabled in your browser. With JavaScript enabled, you can provide feedback to us using our simple form. Here are some instructions on how to enable JavaScript in your web browser.