File: installation.html

package info (click to toggle)
xml-security-c 1.2.1-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 24,472 kB
  • ctags: 6,673
  • sloc: cpp: 36,830; xml: 23,415; sh: 2,365; makefile: 340; perl: 221
file content (447 lines) | stat: -rw-r--r-- 14,188 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta content="Apache Forrest" name="Generator">
<meta name="Forrest-version" content="0.6">
<meta name="Forrest-skin-name" content="pelt">
<title>Installation - Java</title>
<link type="text/css" href="../skin/basic.css" rel="stylesheet">
<link media="screen" type="text/css" href="../skin/screen.css" rel="stylesheet">
<link media="print" type="text/css" href="../skin/print.css" rel="stylesheet">
<link type="text/css" href="../skin/profile.css" rel="stylesheet">
<script src="../skin/getBlank.js" language="javascript" type="text/javascript"></script><script src="../skin/getMenu.js" language="javascript" type="text/javascript"></script><script src="../skin/fontsize.js" language="javascript" type="text/javascript"></script>
</head>
<body onload="init()">
<script type="text/javascript">ndeSetTextSize();</script>
<div id="top">
<!--+
    |breadtrail
    +-->
<div class="breadtrail">
<a href="http://www.apache.org/">apache</a> &gt; <a href="http://xml.apache.org/">xml.apache</a><script src="../skin/breadcrumbs.js" language="JavaScript" type="text/javascript"></script>
</div>
<!--+
    |header
    +-->
<div class="header">
<!--+
    |start group logo
    +-->
<div class="grouplogo">
<a href="http:///xml.apache.org"><img class="logoImage" alt="Apache XML" src="../images/group-logo.gif"></a>
</div>
<!--+
    |end group logo
    +-->
<!--+
    |start Project Logo
    +-->
<div class="projectlogo">
<a href="http://xml.apache.org/security"><img class="logoImage" alt="Apache XML Security" src="../images/project-logo.gif"></a>
</div>
<!--+
    |end Project Logo
    +-->
<!--+
    |start Search
    +-->
<div class="searchbox">
<form action="http://www.google.com/search" method="get" class="roundtopsmall">
<input value="xml.apache.org/security" name="sitesearch" type="hidden"><input onFocus="getBlank (this, 'Search the site with google:');" value="Search the site with google:" size="25" name="q" id="query" type="text">&nbsp; 
                    <input name="Search" value="Search" type="submit">
</form>
</div>
<!--+
    |end search
    +-->
<!--+
    |start Tabs
    +-->
<ul id="tabs">
<li>
<a class="base-not-selected" href="../index.html">Home</a>
</li>
<li class="current">
<a class="base-selected" href="../Java/index.html">Java</a>
</li>
<li>
<a class="base-not-selected" href="../c/index.html">C++</a>
</li>
</ul>
<!--+
    |end Tabs
    +-->
</div>
</div>
<div id="main">
<div id="publishedStrip">
<!--+
    |start Subtabs
    +-->
<div id="level2tabs"></div>
<!--+
    |end Endtabs
    +-->
<script type="text/javascript" language="JavaScript"><!--
              document.write("Published: " + document.lastModified);
              //  --></script>
</div>
<!--+
    |breadtrail
    +-->
<div class="breadtrail">
             
             &nbsp;
           </div>
<!--+
    |start Menu, mainarea
    +-->
<!--+
    |start Menu
    +-->
<div id="menu">
<div onclick="SwitchMenu('menu_selected_1.1', '../skin/')" id="menu_selected_1.1Title" class="menutitle" style="background-image: url('../skin/images/chapter_open.gif');">Java</div>
<div id="menu_selected_1.1" class="selectedmenuitemgroup" style="display: block;">
<div class="menuitem">
<a title="" href="../Java/index.html">Index</a>
</div>
<div class="menupage">
<div class="menupagetitle">Installation</div>
</div>
<div class="menuitem">
<a title="" href="../Java/examples.html">Examples</a>
</div>
<div class="menuitem">
<a title="" href="../Java/faq.html">FAQs</a>
</div>
<div class="menuitem">
<a title="" href="../Java/api.html">API Docs</a>
</div>
<div class="menuitem">
<a title="" href="../Java/interop.html">Interoperability</a>
</div>
<div class="menuitem">
<a title="" href="http://lsd.student.utwente.nl/gump/xml-security/xml-security.html">Gump results</a>
</div>
<div class="menuitem">
<a title="" href="../Java/resolver.html">Resolvermania</a>
</div>
</div>
<div id="credit"></div>
<div id="roundbottom">
<img style="display: none" class="corner" height="15" width="15" alt="" src="../skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
<!--+
  |alternative credits
  +-->
</div>
<!--+
    |end Menu
    +-->
<!--+
    |start content
    +-->
<div id="content">
<div id="skinconf-txtlink"></div>
<h1>Installation - Java</h1> 
    
<a name="N1000D"></a><a name="Using+JDK+1.4.0"></a>
<h2 class="h3">Using JDK 1.4.0</h2>
<div class="section">
<p>
	After SUN released the 
	<a class="external" href="http://java.sun.com/j2se/1.4/index.html">
	  Java (TM) 2 Platform Standard Edition v1.4.0
	</a>, the xml-security package stopped working. This is a 
	<a class="external" href="http://developer.java.sun.com/developer/bugParade/bugs/4615582.html">
	  known
	</a> 
	problem: SUN packaged a beta of Xalan into the JDK 1.4.0, but the
	xml-security package requires a stable version of Xalan (v2.2.0 or
	later). To fix the problem, you have to put the xalan.jar into a
	special directory in your JDK:
	<span class="codefrag">j2sdk1.4.0/jre/lib/endorsed/xalan.jar</span> . If you installed
	an out-of-the-box JDK1.4 (e.g. on Windows 2000), the "endorsed"
	directory does not exist: you'll have to create it by hand. 
      </p>
<div class="frame warning">
<div class="label">Warning</div>
<div class="content">
	Putting this JAR to another location like <span class="codefrag">lib/ext</span> WILL
	NOT WORK.
      </div>
</div>
<p>
	For more on that, you can also check the 
	<a class="external" href="http://xml.apache.org/~edwingo/jaxp-faq.html#override">
	  Unofficial JAXP FAQ
	</a>.
      </p>
</div>

    
<a name="N1002F"></a><a name="Prerequisites"></a>
<h2 class="h3">Prerequisites</h2>
<div class="section">
<p>
	Make sure you get the Jakarta Ant Tool from 
	<a class="external" href="http://jakarta.apache.org/ant/index.html">http://jakarta.apache.org/ant/</a>
      
</p>
</div>

    
<a name="N1003D"></a><a name="Getting+the+source"></a>
<h2 class="h3">Getting the source</h2>
<div class="section">
<p>
	You can download the sources via WWW from the download page
	at 
	<a target="_top" href="../download.html">
	  http://xml.apache.org/security/download.html
	</a>
      
</p>
<p>
	This project's CVS repository can be checked out through anonymous
	(pserver) CVS with the following instruction set. The module you wish
	to check out must be specified as the modulename. When prompted for a
	password for anonymous, simply enter "anoncvs" without quotes: 
      </p>
<pre class="code">cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic login
	password: anoncvs
	cvs -d :pserver:anoncvs@cvs.apache.org:/home/cvspublic checkout
	xml-security
      </pre>
<p>
	A HTTP interface to browse the sources online is available via 
	<a class="external" href="http://cvs.apache.org/viewcvs/xml-security/">http://cvs.apache.org/viewcvs.cgi/xml-security/</a>
      
</p>
</div>
    
    
<a name="N10059"></a><a name="Compiling+the+source"></a>
<h2 class="h3">Compiling the source</h2>
<div class="section">
<p>
	At the command prompt type <span class="codefrag">ant test</span>. If you want to 
	use jikes instead of your default java compiler locate the <span class="codefrag">build.xml</span>
	file and replace the line
      </p>
<pre class="code">&lt;property name="build.compiler" value="classic"/&gt;</pre>
<p>
	with
      </p>
<pre class="code">&lt;property name="build.compiler" value="jikes"/&gt;</pre>
</div>
    
<!-- Uncommented in the original docs 
    <section> 
      <title>Unpacking the files</title> 
      <p>
	&packagename; is packaged as a ZIP file for all
	platforms and operating systems.  You can run the Java
	<ref>jar</ref> command to unpack the distribution.
      </p>
      <ul>
	<li>jar xf &packagename;-bin.&packageversion;.zip</li>
	<li>jar xf &packagename;-src.&packageversion;.zip</li>
	<li>This command creates a "&packagedirectory;" sub-directory in the
	  current directory containing all the files.</li>
      </ul>
    </section>
    
    <section> 
      <title>Files in the binary package release</title>
      <table>
	<tr><td>LICENSE</td><td>License for &packagename;</td></tr>
	<tr><td>Readme.html</td><td>Web page redirect to docs/html/index.html</td></tr>
	<tr><td>xerces.jar</td><td>Jar file containing all the parser class files</td></tr>
	<tr><td>xercesSamples.jar</td><td>Jar file containing all sample class files</td></tr>
	<tr><td>data/</td><td>Directory containing sample XML data files</td></tr>
	<tr><td>doc/html/</td><td>Directory containing documentation</td></tr>
	<tr><td>doc/html/api/</td><td>Directory containing Javadoc API</td></tr>
      </table>
      <note>To use &packagename; you do not need the source files.</note>
    </section>
-->
    
<a name="N10076"></a><a name="Testing+the+distibution"></a>
<h2 class="h3">Testing the distibution</h2>
<div class="section">
<p>
	The first way to ensure that everything is in place is to run the unit
	tests. This is simply done by typing <span class="codefrag">ant test</span>. This starts
	the included JUnit test cases. Actually, we do not have complete test
	coverage, but as a first start, it works.
      </p>
</div>

    
<a name="N10083"></a><a name="Playing+around+with+the+examples+"></a>
<h2 class="h3">Playing around with the examples </h2>
<div class="section">
<p>
	To see how the distribution works, simply run <span class="codefrag">ant
	  mega-sample</span> to let ant execute several examples from the
	<span class="codefrag">src_samples/</span> directory. 
      </p>
</div>
    
<a name="N10093"></a><a name="Files+in+the+source+package+release"></a>
<h2 class="h3">Files in the source package release</h2>
<div class="section">
<table class="ForrestTable" cellspacing="1" cellpadding="4">
	
<tr>
	  
<td colspan="1" rowspan="1">build.xml</td>
	  <td colspan="1" rowspan="1">Top level <a class="external" href="http://jakarta.apache.org/ant/index.html">Ant</a> Makefile -- read README
	    file before building</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">LICENSE.txt</td>
	  <td colspan="1" rowspan="1">License for the software</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">README</td>
	  <td colspan="1" rowspan="1">Build instructions</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">Readme.html</td>
	  <td colspan="1" rowspan="1">Web page redirect required for building documentation</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">STATUS</td>
	  <td colspan="1" rowspan="1">Current source code status information</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">data/</td>
	  <td colspan="1" rowspan="1">Directory containing sample data files and test vectors for the unit tests</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">doc/xml/</td>
	  <td colspan="1" rowspan="1">Directory containing documentation, in XML form</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">src/</td>
	  <td colspan="1" rowspan="1">Directory containing source code for the core library</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">src_samples/</td>
	  <td colspan="1" rowspan="1">Directory containing source code for samples</td>
	
</tr>
	
<tr>
	  
<td colspan="1" rowspan="1">src_unitTests/</td>
	  <td colspan="1" rowspan="1">Directory containing source code for unit tests</td>
	
</tr>
      
</table>
</div>

    
<a name="N10123"></a><a name="Where+is+my+JCE%3F"></a>
<h2 class="h3">Where is my JCE?</h2>
<div class="section">
<p>
	There is <em>no</em> JCE bundled together with this
	distribution. Living in Germany, I had no problem to include the JCE in
	this software package but then I realized that the Apache Project is
	hosted in the US where some export restrictions apply to the
	cryptographic primitives. 
      </p>
<p>
	Well, how do we solve this problem? The nice guys from the <a class="external" href="http://www.bouncycastle.org/">Bouncy Castle</a> where so
	helpful to supply the JAR that you need to create HMAC integrity checks
	on their web site. When you use the ant makefile <span class="codefrag">build.xml</span>
	and simply say <span class="codefrag">ant compile</span> or <span class="codefrag">ant get-jce</span>,
	<span class="codefrag">ant</span> tries to fetch this JAR from the australian
	server. After that step, the compilation works completely. 
      </p>
<p></p>
<p>
	The ant make tools initiates an automated download of the BouncyCastle
	JCE. The file is downloaded into the libs/ directory and a "bc-" is
	prepended to the filename. This is done because we want the provider
	name (bc means BouncyCastle) being visible in the JAR's filename. 
      </p>
<p></p>
<p>
	If you are a little paranoid like all security people and don't want
	ant to make automated downloads or your firewall doesn't permit it
	(preventing programs "phoning home"), look in the
	<span class="codefrag">./build.xml</span> file for the properties called
      </p>
<p></p>
<pre class="code">
	&lt;property name="jce.download.file" value="jce-jdk13-124.jar /&gt;
	&lt;property name="jce.download" 
	          value="http://www.bouncycastle.org/download/${jce.download.file}" /&gt;
	&lt;property name="lib.jce" value="${libs}/bc-${jce.download.file}" /&gt;
	</pre>
<p>
	Here you can see that the file 
	<a class="external" href="http://www.bouncycastle.org/download/jce-jdk13-124.jar">jce-jdk13-124.jar</a>
	 is downloaded and stored in the location <span class="codefrag">./libs/bc-jce-jdk13-124.jar</span>
      
</p>
<p>
	If you do this by hand (pointing you favourite web browser and download
	it yourself), simply put a "<span class="codefrag">bc-</span>" in front of the filename
	and put it to <span class="codefrag">./libs/</span>, then ant won't try to make a
	download.
      </p>
</div>
  
</div>
<!--+
    |end content
    +-->
<div class="clearboth">&nbsp;</div>
</div>
<div id="footer">
<!--+
    |start bottomstrip
    +-->
<div class="lastmodified">
<script type="text/javascript"><!--
document.write("Last Published: " + document.lastModified);
//  --></script>
</div>
<div class="copyright">
 Copyright &copy; 2002-2005 The Apache Software Foundation.</div>
<!--+
    |end bottomstrip
    +-->
</div>
</body>
</html>