34
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. 2 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,

Install JDK

Embed Size (px)

Citation preview

Page 1: Install JDK

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.

2 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.

3 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:

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

Page 2: Install JDK

5 Select the little pull-down icon next to Demos and select Don't install this feature now.

6 Do the same for Source Code and Public JRE. These are not needed for StrongKey. Your panel should look like the following

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

8 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.

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

10 When the installation is complete, you should see the following

11 Click Finish to exit the wizard.

12 To add the Java executable to your Command Prompt path, open the Control Panel (from Start->Control Panel)

13 Select the System option and open its dialog panel. You should see

Page 3: Install JDK

14 Choose the Advanced tab. You should see

15 Click on Environment Variables. You should see

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

17 Click on the Edit button. You should see

18 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

19 Click OK to exit the Edit System Variable panel.

20 Click OK again to exit the Environment Variables panel.

21 Click OK to exit the System Properties panel.

22 Finally, exit the Control Panel.

23 Open a new Command Prompt window, and type the following:

java -version

You should see the following

Page 4: Install JDK

24 This indicates you have installed the JDK successfully.

25 Using the Windows Explorer, open the jce_policy-1_5_0.zip file. You should see

26 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.

27 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)

28 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

29 Click on Yes to All. You should see the following

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

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

32 Slide the slider down and select WordPad and click OK. You should see the text file open up inside the WordPad window.

33 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

Page 5: Install JDK

six JCE providers in the default JDK installation):

## List of providers and their preference orders (see above):#security.provider.1=sun.security.provider.Sunsecurity.provider.2=sun.security.rsa.SunRsaSignsecurity.provider.3=com.sun.net.ssl.internal.ssl.Providersecurity.provider.4=com.sun.crypto.provider.SunJCEsecurity.provider.5=sun.security.jgss.SunProvidersecurity.provider.6=com.sun.security.sasl.Providersecurity.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:

34 Save the file. You should see the following warning

35 Select Yes and exit WordPad.

36 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

37 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.

38 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.

39 After you have successfully added the Firefox directory to your PATH, open a new

Page 6: Install JDK

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.

40 At this point, you have successfully installed the JDK.

  Home Java

Frameworks

Database

Technology

Web Development

Build/Test Tools

Servers

PHP

Page 7: Install JDK

 

Home Java Beginners Beginners Java Tutorials - Installing JDK

 

 

Beginners Java Tutorials - Installing JDKPosted 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 PlatformTo 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 .

Page 8: Install JDK

Step 2

The custom setup screen appears as follows.

Page 9: Install JDK

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:

Page 10: Install JDK

Step 4

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

Page 11: Install JDK

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:

Page 12: Install JDK

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. 

Page 13: Install JDK

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

Page 14: Install JDK

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>javaUsage: 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.

Page 15: Install JDK

-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-searchinclude/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 | -enablesystemassertionsenable system assertions-dsa | -disablesystemassertionsdisable system assertions-agentlib:<libname>[=<options>]load native agent library <libname>, e.g. -agentlib:hprofsee also, -agentlib:jdwp=help and -agentlib:hprof=help-agentpath:<pathname>[=<options>]load native agent library by full pathname-javaagent:<jarpath>[=<options>]load Java programming language agent, see java.lang.instrument

Page 16: Install JDK

C:\Documents and Settings\Administrator>

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?

Page 17: Install JDK

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

Page 18: Install JDK

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

Page 19: Install JDK

Home Privacy Policy© All Rights are Reserved for Rose India