1.. _mozilla_projects_nss_jss_build_instructions_for_jss_4_3_x:
2
3Build instructions for JSS 4.3.x
4================================
5
6.. _build_instructions_for_jss_4.3.x:
7
8`Build Instructions for JSS 4.3.x <#build_instructions_for_jss_4.3.x>`__
9------------------------------------------------------------------------
10
11.. container::
12
13   Newsgroup: `mozilla.dev.tech.crypto <news://news.mozilla.org/mozilla.dev.tech.crypto>`__
14
15   Before building JSS, you need to set up your system as follows:
16
17   #. Build NSPR/NSS by following the
18      :ref:`mozilla_projects_nss_reference_building_and_installing_nss_build_instructions`,
19   #. To check that NSS built correctly, run ``all.sh`` (in ``mozilla/security/nss/tests``) and
20      examine the results (in
21      ``mozilla/test_results/security/``\ *computername*.#\ ``/results.html``.
22   #. Install a Java compiler and runtime. JSS supports Java version 1.5 or later. We suggest you
23      use the latest.
24   #. You must have Perl version 5.005 or later.
25
26   Now you are ready to build JSS. Follow these steps:
27
28   #. Switch to the appropriate directory and check out JSS from the root of your source tree.
29
30      .. code:: notranslate
31
32         cvs co -r JSS_4_3_1_RTM mozilla/security/jss
33
34      or
35
36      .. code:: notranslate
37
38         cvs co -r JSS_4_3_RTM mozilla/security/jss
39
40   #. Setup environment variables needed for compiling Java source. The ``JAVA_HOME`` variable
41      indicates the directory containing your Java SDK installation. Note, on Windows platforms it
42      is best to have JAVA_HOME set to a directory path that doest not have spaces. 
43
44      **Unix**
45
46      .. code:: notranslate
47
48         setenv JAVA_HOME /usr/local/jdk1.5.0 (or wherever your JDK is installed)
49
50      **Windows**
51
52      .. code:: notranslate
53
54         set JAVA_HOME=c:\programs\jdk1.5.0 (or wherever your JDK is installed)
55
56      **Windows (Cygnus)**
57
58      .. code:: notranslate
59
60         JAVA_HOME=/cygdrive/c/programs/jdk1.5.0 (or wherever your JDK is installed)
61         export JAVA_HOME
62
63      | **Windows build Configurations WINNT vs WIN95**
64
65      .. code:: notranslate
66
67         As of NSS 3.15.4, NSPR/NSS/JSS build generates a "WIN95" configuration by default on Windows.
68         We recommend most applications use the "WIN95" configuration. If you want JSS to be used
69         with your applet and the Firefox browser than you must build WIN95. (See JSS FAQ)
70         The "WIN95" configuration supports all versions of Windows. The "WIN95" name is historical;
71         it should have been named "WIN32".
72         To generate a "WINNT" configuration, set OS_TARGET=WINNT and build NSPR/NSS/JSS WIN95.
73
74      | Mac OS X
75      | It has been recently reported that special build instructions are necessary to succeed
76        building JSS on OSX. Please
77        see `HOWTO_successfully_compile_JSS_and_NSS_for_32_and_64_bits_on_OSX_10.6_(10.6.7) </HOWTO_successfully_compile_JSS_and_NSS_for_32_and_64_bits_on_OSX_10.6_(10.6.7)>`__
78        for contributed instructions.
79      |  
80
81   #. Build JSS.
82
83         .. code:: notranslate
84
85            cd mozilla/security/jss
86            gmake
87
88   #. Sign the JSS jar.
89
90         .. code:: notranslate
91
92            If you're intention is to modify and build the JSS source you
93            need to Apply for your own  JCE code-signing certificate
94
95            If you made no changes and your goal is to build JSS you can use the
96            signed binary release of the jss4.jar from ftp.mozilla.org.
97            with your built jss4 JNI shared library.
98
99   Next, you should read the instructions on `using JSS <Using_JSS>`__.