You are on page 1of 30

HOWTO: Install JDK 5.0 (jdk1.5.

0_0x) on Windows (TEST environment) StrongKey has been tested with JDK versions 1.5.0_06, 1.5.0_07 and 1.5.0_08. Depending on which version you have, or which version you download, please substitute the 0x in the documentation with your version of the JDK. StrongKey makes the assumption that the JDK is installed in the c:/usr/local/jdk1.5.0_0x directory. You can, however choose to install it in another location. Whichever location you choose, this documentation will also refer to it as $JAVA_HOME. You must have Firefox 1.5.x installed on your machine to take advantage of certain cryptographic modules that come bundled with that product. If you do not have Firefox installed, please download it from http://www.mozilla.com/firefox and install it. If the images on this page are not clear, right-click on the image and choose View Image to see a larger rendition. 1 As the symkey user, download the free JDK 5.0 also known as J2SE5 - from Sun's website and store it in a temporary directory (c:\tmp). Download the standalone version of the J2SE and not the ones bundled with NetBeans or with Java EE. The instructions below apply only to the standalone version of the JDK. If you are in a country where it is available, download the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 5.0 from the same page on the website. Save this file in the temporary directory (c:\tmp). If you cannot download this file, you will not be able to use any symmetric key whose size is greater than 128-bits. Go to the c:\tmp directory and install the JDK by executing the downloaded binary file using jdk-1_5_0_0x-windows-i586-p.exe You should see the start of the installation wizard:

Select I accept the terms in the license agreement and click Next to continue. You should see:

5 6

Select the little pull-down icon next to Demos and select Don't install this feature now. Do the same for Source Code and Public JRE. These are not needed for StrongKey. Your panel should look like the following

Click the Change... button on the panel. You should see:

Change the default Folder name to C:\usr\local\jdk1.5.0_0x\ and click OK. You may need to click on Development Tools first before the Change... button is activated. You should see: Note: The \usr\local\jdk1.5.0_0x directory does not exist at this stage, so you will not be able to select it from the GUI. You will have to type it in into the Folder Name field at the bottom of the wizard, as shown below.

Click Next to continue. You should see a Progress panel that takes a few minutes to go through the installation.

1 0

When the installation is complete, you should see the following

1 1 1 2 1 3

Click Finish to exit the wizard. To add the Java executable to your Command Prompt path, open the Control Panel (from Start->Control Panel) Select the System option and open its dialog panel. You should see

1 4

Choose the Advanced tab. You should see

1 5

Click on Environment Variables. You should see

1 6

Slide the slider in the System variables section till you see the Path variable. Highlight it, as follows:

1 7

Click on the Edit button. You should see

1 8

Press the Home key on your PC to go to the beginning, and add the following to the Variable value c:\usr\local\jdk1.5.0_0x\bin; When completed, it should resemble the following

1 9 2 0 2 1 2 2 2 3

Click OK to exit the Edit System Variable panel. Click OK again to exit the Environment Variables panel. Click OK to exit the System Properties panel. Finally, exit the Control Panel. Open a new Command Prompt window, and type the following: java -version You should see the following

2 4 2 5

This indicates you have installed the JDK successfully. Using the Windows Explorer, open the jce_policy-1_5_0.zip file. You should see

2 6

Select jce to explore that folder. You should see Note: Depending on the view of your Explorer, you might see this as a List, or Icons or Detailed List. Regardless of the view, please select the local_policy.jar and the US_export_policy.jar files for copying.

2 7 2 8

Select the two files local_policy.jar and US_export_policy.jar and copy them (either by typing Ctrl-C together, or by choosing Edit->Copy from the menu) Navigate the explorer to the c:\usr\local\jdk1.5.0_0x\jre\lib\security folder and paste the copied files (either using Ctrl-V together or by choosing Edit->Paste from the menu. You should see

2 9

Click on Yes to All. You should see the following

3 0

From the same explorer window, click on java.security. If the file does not automatically open in WordPad, you should see:

3 1

Choose Select the program from a list and click on OK. You should see

Slide the slider down and select WordPad and click OK. You should see the text

2 3 3

file open up inside the WordPad window. Find the following section and add the line highlighted in red color in this instruction to the previous security.providers in the file. (You should already have six JCE providers in the default JDK installation): # # List of providers and their preference orders (see above): # security.provider.1=sun.security.provider.Sun security.provider.2=sun.security.rsa.SunRsaSign security.provider.3=com.sun.net.ssl.internal.ssl.Provider security.provider.4=com.sun.crypto.provider.SunJCE security.provider.5=sun.security.jgss.SunProvider security.provider.6=com.sun.security.sasl.Provider security.provider.7=sun.security.pkcs11.SunPKCS11 /usr/local/etc/symkey/pkcs11/jdk5-nss-windows.cfg Bear in mind that each provider is on a separate line, and that the line for provider #7 is really one, unbroken line. To avoid typographical errors, please copy the red line and paste it into your java.security file. Your finished edit should look like the following:

3 4

Save the file. You should see the following warning

3 5 3 6

Select Yes and exit WordPad. Display the c:\usr\local\etc/symkey\pkcs11\jdk5-nss-windows.cfg file and review its contents. One of the lines in there states: library = /Program Files/Mozilla Firefox/softokn3.dll

3 7

Verify that you do have such a file in that location on your machine in the C:\Program Files\Mozilla Firefox directory. If it does not, then it is probably because you do not have Firefox installed. In this case, please install Firefox 1.5.x first, and continue from step #36 above. You can get Firefox for free at http://www.mozilla.com/firefox. Using the steps described from step #13 to step #22, add the C:\Program Files\Mozilla Firefox directory to the PATH variable of your environment. The only difference is that where you added the JDK path to the environment earlier, you will add the Firefox path this time. After you have successfully added the Firefox directory to your PATH, open a new Command Prompt window and type set You should see a number of environment variables and their values displayed on the screen. Find the PATH environment variable and ensure that the Firefox directory location is in it. If not, please retrace step #38 to ensure you have the correct location in the PATH variable). If the library is available in the location specified by the library parameter in the jdk5-nss-windows.cfg file, then it is OK.

3 8

3 9

4 0

At this point, you have successfully installed the JDK.

Home Java Frameworks Database Technology Web Development Build/Test Tools Servers PHP

Home Java Beginners Beginners Java Tutorials - Installing JDK

Beginners Java Tutorials - Installing JDK Posted on: June 1, 2007 at 12:00 AM In this beginners java Tutorial ,We will first download, install and configure the J2SE development environment.

Beginners Java Tutorials - Installing JDK


In this beginners java Tutorial ,We will first download, install and configure the J2SE development environment.

Downloading and Installing J2SE Software on Windows Platform To download J2SE for development visit http://www.java.sun.com/j2se and download J2SE on your machine. In this tutorial we have used jdk-1_5_0_06-windows-i586.exe.The java 2Platform or (JDK) can be downloaded from the sun. Formerly Known as the java Development kit ,or JDK, Downloading java is really about downloading the java 2 plat form that comes in three editions , J2ME, J2SE and J2EE , if you are learning java, then, you should start by downloading J2EE. Once you have downloaded the j2se on your system, you are ready to install . In the following section we will learn how to install jdk development environment on your machine. here are the step to install JDK on your windows machine. Step 1 Double click the JDK down loaded file, the executable extracts the required Contents to the temporary directory and then License agreement screen appears. On the license agreement page read and accept the license and the click the next button .

Step 2 The custom setup screen appears as follows.

Step 3 Click on the change button to change the installation directory to "c:\jdk1.5.0_06" as shown in the following screen.

and click on the "OK" button. After clicking on the "OK" button installation begins:

Step 4

In the next window installer asks for the installing the runtime as shown in the following screen:

Step 5 Click on next button install the J2SE runtime on your machine. Next screen shows the browser selection:

Click on the "Next" button. Step 6 Once the installation is finished it shows you the final screen indications the success. Now you have successfully installed J2SE on your machine. Installer shows the following final confirmation window as shown below:

Click on the "Finish" button to exit from the installer. Configuring the installation on windows machine: In this Section we will add some settings to the windows environment so that the java compiler and runtime becomes available for compiling and running the java application. Go to the control panel and double click on "System Properties" and to to the advance tab.

and add "c:\jdk1.5.0_06" to path variable:

and click on ok button. To save the setting click on "OK" button. This will make the java environment available for development. Open the dos prompt and type javac on the console, it should show the following output:

Microsoft Windows 2000 [Version 5.00.2195] (C) Copyright 1985-2000 Microsoft Corp. C:\Documents and Settings\Administrator>java Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -client to select the "client" VM -server to select the "server" VM -hotspot is a synonym for the "client" VM [deprecated] The default VM is client. -cp <class search path of directories and zip/jar files> -classpath <class search path of directories and zip/jar files> A ; separated list of directories, JAR archives, and ZIP archives to search for class files. -D<name>=<value> set a system property -verbose[:class|gc|jni] enable verbose output -version print product version and exit -version:<value> require the specified version to run -showversion print product version and continue -jre-restrict-search | -jre-no-restrict-search include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:<packagename>...|:<classname>] -enableassertions[:<packagename>...|:<classname>] enable assertions -da[:<packagename>...|:<classname>] disableassertions[:<packagename>...|:<classname>] disable assertions -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:<libname>[=<options>]

Now your development environment is ready for development. Related Tags for Beginners Java Tutorials - Installing JDK: java, windows, c, http, mac, learning, com, orm, j2ee, development, j2me, form, io, download, load, sed, window, vi, tutorial, ria, this, loading, sun, exe, tar, platform, jdk, edit, start, if, for, www, to, edi, learn, j2se, ld, ws, sh, ear, e, it, can, machine, use, ul, downloading, dev, from, art, in, no, rm, real, as, sta, m, nt, out, ca, j, ad, es, all, me, hr, do, down, tor, s, xe, su, ee, edition, star, at, k, loaded, i5, is, ha, ll, kit, erl, erl, develop, ea, and, ar, tform, tf, rt, va, tt, tutor, s, s, ri, th, sho, av, st, chi, .com, .exe, ab, 6, hat, pl, nd, on, om, o, nl Previous Index Next

Ask Questions?

Discuss: Beginners Java Tutorials - Installing JDK View All Comments

Post your Comment

Your Name (*) : Your Email : Subject (*):


Your Comment (*):

Ask Questions? If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions. Tutorial Topics

Hibernate Framework( 1057 ) Struts Framework( 836 ) Spring Framework( 567 ) XML( 196 ) Ajax( 528 ) JavaScript( 109 ) Java( 1806 ) Web Services( 71 ) Database( 145 ) Technology( 90 ) Web Development( 503 ) PHP( 406 )

Services Software Solutions


JSF Development Outsourcing ERP M-Commerce Flex Development Website Development

Web Designing Web Redesigning Web Development Logo Design Web Design Packages Domain Registration Web Promotion Services

SEO Services Search Eng. Optimization Search Eng. Submission SEO Tips SEO Portfolio Web Promotion Plans Content Development

Content Development Article Writing Blog Writing News Writing SEO Copywriting Technical Documentation Article Marketing Web Hosting Services

ASP.NET Hosting Unix Hosting E-Commerce Hosting Windows Hosting Hosting Plan E-Commerce Solutions

CRM

Home Privacy Policy All Rights are Reserved for Rose India

You might also like