1 *****************************************************************************
3 * This file is part of the BeanShell Java Scripting distribution. *
4 * Documentation and updates may be found at http://www.beanshell.org/ *
6 * Sun Public License Notice: *
8 * The contents of this file are subject to the Sun Public License Version *
9 * 1.0 (the "License"); you may not use this file except in compliance with *
10 * the License. A copy of the License is available at http://www.sun.com *
12 * The Original Code is BeanShell. The Initial Developer of the Original *
13 * Code is Pat Niemeyer. Portions created by Pat Niemeyer are Copyright *
14 * (C) 2000. All Rights Reserved. *
16 * GNU Public License Notice: *
18 * Alternatively, the contents of this file may be used under the terms of *
19 * the GNU Lesser General Public License (the "LGPL"), in which case the *
20 * provisions of LGPL are applicable instead of those above. If you wish to *
21 * allow use of your version of this file only under the terms of the LGPL *
22 * and not to allow others to use your version of this file under the SPL, *
23 * indicate your decision by deleting the provisions above and replace *
24 * them with the notice and other provisions required by the LGPL. If you *
25 * do not delete the provisions above, a recipient may use your version of *
26 * this file under either the SPL or the LGPL. *
28 * Patrick Niemeyer (pat@pat.net) *
29 * Author of Learning Java, O'Reilly & Associates *
30 * http://www.pat.net/~pat/ *
32 *****************************************************************************
35 SUN PUBLIC LICENSE Version 1.0
39 1.0.1. "Commercial Use" means distribution or otherwise making the
40 Covered Code available to a third party.
42 1.1. "Contributor" means each entity that creates or contributes to
43 the creation of Modifications.
45 1.2. "Contributor Version" means the combination of the Original Code,
46 prior Modifications used by a Contributor, and the Modifications made
47 by that particular Contributor.
49 1.3. "Covered Code" means the Original Code or Modifications or the
50 combination of the Original Code and Modifications, in each case
51 including portions thereof and corresponding documentation released
54 1.4. "Electronic Distribution Mechanism" means a mechanism generally
55 accepted in the software development community for the electronic
58 1.5. "Executable" means Covered Code in any form other than Source
61 1.6. "Initial Developer" means the individual or entity identified as
62 the Initial Developer in the Source Code notice required by Exhibit A.
64 1.7. "Larger Work" means a work which combines Covered Code or
65 portions thereof with code not governed by the terms of this License.
67 1.8. "License" means this document.
69 1.8.1. "Licensable" means having the right to grant, to the maximum
70 extent possible, whether at the time of the initial grant or
71 subsequently acquired, any and all of the rights conveyed herein.
73 1.9. "Modifications" means any addition to or deletion from the
74 substance or structure of either the Original Code or any previous
75 Modifications. When Covered Code is released as a series of files, a
78 A. Any addition to or deletion from the contents of a file containing
79 Original Code or previous Modifications.
81 B. Any new file that contains any part of the Original Code or
82 previous Modifications.
84 1.10. "Original Code" means Source Code of computer software code
85 which is described in the Source Code notice required by Exhibit A as
86 Original Code, and which, at the time of its release under this
87 License is not already Covered Code governed by this License.
89 1.10.1. "Patent Claims" means any patent claim(s), now owned or
90 hereafter acquired, including without limitation, method, process, and
91 apparatus claims, in any patent Licensable by grantor.
93 1.11. "Source Code" means the preferred form of the Covered Code for
94 making modifications to it, including all modules it contains, plus
95 any associated documentation, interface definition files, scripts used
96 to control compilation and installation of an Executable, or source
97 code differential comparisons against either the Original Code or
98 another well known, available Covered Code of the Contributor's
99 choice. The Source Code can be in a compressed or archival form,
100 provided the appropriate decompression or de-archiving software is
101 widely available for no charge.
103 1.12. "You" (or "Your") means an individual or a legal entity
104 exercising rights under, and complying with all of the terms of, this
105 License or a future version of this License issued under Section 6.1.
106 For legal entities, "You" includes any entity which controls, is
107 controlled by, or is under common control with You. For purposes of
108 this definition, "control" means (a) the power, direct or indirect, to
109 cause the direction or management of such entity, whether by contract
110 or otherwise, or (b) ownership of more than fifty percent (50%) of the
111 outstanding shares or beneficial ownership of such entity.
113 2. Source Code License.
115 2.1 The Initial Developer Grant.
117 The Initial Developer hereby grants You a world-wide, royalty-free,
118 non-exclusive license, subject to third party intellectual property
121 (a) under intellectual property rights (other than patent or
122 trademark) Licensable by Initial Developer to use, reproduce, modify,
123 display, perform, sublicense and distribute the Original Code (or
124 portions thereof) with or without Modifications, and/or as part of a
127 (b) under Patent Claims infringed by the making, using or selling of
128 Original Code, to make, have made, use, practice, sell, and offer for
129 sale, and/or otherwise dispose of the Original Code (or portions
132 (c) the licenses granted in this Section 2.1(a) and (b) are effective
133 on the date Initial Developer first distributes Original Code under
134 the terms of this License.
136 (d) Notwithstanding Section 2.1(b) above, no patent license is
137 granted: 1) for code that You delete from the Original Code; 2)
138 separate from the Original Code; or 3) for infringements caused by:
139 i) the modification of the Original Code or ii) the combination of the
140 Original Code with other software or devices.
142 2.2. Contributor Grant.
144 Subject to third party intellectual property claims, each Contributor
145 hereby grants You a world-wide, royalty-free, non-exclusive license
147 (a) under intellectual property rights (other than patent or
148 trademark) Licensable by Contributor, to use, reproduce, modify,
149 display, perform, sublicense and distribute the Modifications created
150 by such Contributor (or portions thereof) either on an unmodified
151 basis, with other Modifications, as Covered Code and/or as part of a
154 (b) under Patent Claims infringed by the making, using, or selling of
155 Modifications made by that Contributor either alone and/or in
156 combination with its Contributor Version (or portions of such
157 combination), to make, use, sell, offer for sale, have made, and/or
158 otherwise dispose of: 1) Modifications made by that Contributor (or
159 portions thereof); and 2) the combination of Modifications made by
160 that Contributor with its Contributor Version (or portions of such
163 (c) the licenses granted in Sections 2.2(a) and 2.2(b) are effective
164 on the date Contributor first makes Commercial Use of the Covered
167 (d) notwithstanding Section 2.2(b) above, no patent license is
168 granted: 1) for any code that Contributor has deleted from the
169 Contributor Version; 2) separate from the Contributor Version; 3) for
170 infringements caused by: i) third party modifications of Contributor
171 Version or ii) the combination of Modifications made by that
172 Contributor with other software (except as part of the Contributor
173 Version) or other devices; or 4) under Patent Claims infringed by
174 Covered Code in the absence of Modifications made by that Contributor.
176 3. Distribution Obligations.
178 3.1. Application of License.
180 The Modifications which You create or to which You contribute are
181 governed by the terms of this License, including without limitation
182 Section 2.2. The Source Code version of Covered Code may be
183 distributed only under the terms of this License or a future version
184 of this License released under Section 6.1, and You must include a
185 copy of this License with every copy of the Source Code You
186 distribute. You may not offer or impose any terms on any Source Code
187 version that alters or restricts the applicable version of this
188 License or the recipients' rights hereunder. However, You may include
189 an additional document offering the additional rights described in
192 3.2. Availability of Source Code.
194 Any Modification which You create or to which You contribute must be
195 made available in Source Code form under the terms of this License
196 either on the same media as an Executable version or via an accepted
197 Electronic Distribution Mechanism to anyone to whom you made an
198 Executable version available; and if made available via Electronic
199 Distribution Mechanism, must remain available for at least twelve (12)
200 months after the date it initially became available, or at least six
201 (6) months after a subsequent version of that particular Modification
202 has been made available to such recipients. You are responsible for
203 ensuring that the Source Code version remains available even if the
204 Electronic Distribution Mechanism is maintained by a third party.
206 3.3. Description of Modifications.
208 You must cause all Covered Code to which You contribute to contain a
209 file documenting the changes You made to create that Covered Code and
210 the date of any change. You must include a prominent statement that
211 the Modification is derived, directly or indirectly, from Original
212 Code provided by the Initial Developer and including the name of the
213 Initial Developer in (a) the Source Code, and (b) in any notice in an
214 Executable version or related documentation in which You describe the
215 origin or ownership of the Covered Code.
217 3.4. Intellectual Property Matters.
219 (a) Third Party Claims.
221 If Contributor has knowledge that a license under a third party's
222 intellectual property rights is required to exercise the rights
223 granted by such Contributor under Sections 2.1 or 2.2, Contributor
224 must include a text file with the Source Code distribution titled
225 "LEGAL'' which describes the claim and the party making the claim in
226 sufficient detail that a recipient will know whom to contact. If
227 Contributor obtains such knowledge after the Modification is made
228 available as described in Section 3.2, Contributor shall promptly
229 modify the LEGAL file in all copies Contributor makes available
230 thereafter and shall take other steps (such as notifying appropriate
231 mailing lists or newsgroups) reasonably calculated to inform those who
232 received the Covered Code that new knowledge has been obtained.
234 (b) Contributor APIs.
236 If Contributor's Modifications include an application programming
237 interface ("API") and Contributor has knowledge of patent licenses
238 which are reasonably necessary to implement that API, Contributor must
239 also include this information in the LEGAL file.
243 Contributor represents that, except as disclosed pursuant to Section
244 3.4(a) above, Contributor believes that Contributor's Modifications
245 are Contributor's original creation(s) and/or Contributor has
246 sufficient rights to grant the rights conveyed by this License.
248 3.5. Required Notices.
250 You must duplicate the notice in Exhibit A in each file of the Source
251 Code. If it is not possible to put such notice in a particular Source
252 Code file due to its structure, then You must include such notice in a
253 location (such as a relevant directory) where a user would be likely
254 to look for such a notice. If You created one or more Modification(s)
255 You may add your name as a Contributor to the notice described in
256 Exhibit A. You must also duplicate this License in any documentation
257 for the Source Code where You describe recipients' rights or ownership
258 rights relating to Covered Code. You may choose to offer, and to
259 charge a fee for, warranty, support, indemnity or liability
260 obligations to one or more recipients of Covered Code. However, You
261 may do so only on Your own behalf, and not on behalf of the Initial
262 Developer or any Contributor. You must make it absolutely clear than
263 any such warranty, support, indemnity or liability obligation is
264 offered by You alone, and You hereby agree to indemnify the Initial
265 Developer and every Contributor for any liability incurred by the
266 Initial Developer or such Contributor as a result of warranty,
267 support, indemnity or liability terms You offer.
269 3.6. Distribution of Executable Versions.
271 You may distribute Covered Code in Executable form only if the
272 requirements of Section 3.1-3.5 have been met for that Covered Code,
273 and if You include a notice stating that the Source Code version of
274 the Covered Code is available under the terms of this License,
275 including a description of how and where You have fulfilled the
276 obligations of Section 3.2. The notice must be conspicuously included
277 in any notice in an Executable version, related documentation or
278 collateral in which You describe recipients' rights relating to the
279 Covered Code. You may distribute the Executable version of Covered
280 Code or ownership rights under a license of Your choice, which may
281 contain terms different from this License, provided that You are in
282 compliance with the terms of this License and that the license for the
283 Executable version does not attempt to limit or alter the recipient's
284 rights in the Source Code version from the rights set forth in this
285 License. If You distribute the Executable version under a different
286 license You must make it absolutely clear that any terms which differ
287 from this License are offered by You alone, not by the Initial
288 Developer or any Contributor. You hereby agree to indemnify the
289 Initial Developer and every Contributor for any liability incurred by
290 the Initial Developer or such Contributor as a result of any such
295 You may create a Larger Work by combining Covered Code with other code
296 not governed by the terms of this License and distribute the Larger
297 Work as a single product. In such a case, You must make sure the
298 requirements of this License are fulfilled for the Covered Code.
300 4. Inability to Comply Due to Statute or Regulation.
302 If it is impossible for You to comply with any of the terms of this
303 License with respect to some or all of the Covered Code due to
304 statute, judicial order, or regulation then You must: (a) comply with
305 the terms of this License to the maximum extent possible; and (b)
306 describe the limitations and the code they affect. Such description
307 must be included in the LEGAL file described in Section 3.4 and must
308 be included with all distributions of the Source Code. Except to the
309 extent prohibited by statute or regulation, such description must be
310 sufficiently detailed for a recipient of ordinary skill to be able to
313 5. Application of this License.
315 This License applies to code to which the Initial Developer has
316 attached the notice in Exhibit A and to related Covered Code.
318 6. Versions of the License.
322 Sun Microsystems, Inc. ("Sun") may publish revised and/or new versions
323 of the License from time to time. Each version will be given a
324 distinguishing version number.
326 6.2. Effect of New Versions.
328 Once Covered Code has been published under a particular version of the
329 License, You may always continue to use it under the terms of that
330 version. You may also choose to use such Covered Code under the terms
331 of any subsequent version of the License published by Sun. No one
332 other than Sun has the right to modify the terms applicable to Covered
333 Code created under this License.
335 6.3. Derivative Works.
337 If You create or use a modified version of this License (which you may
338 only do in order to apply it to code which is not already Covered Code
339 governed by this License), You must: (a) rename Your license so that
340 the phrases "Sun," "Sun Public License," or "SPL" or any confusingly
341 similar phrase do not appear in your license (except to note that your
342 license differs from this License) and (b) otherwise make it clear
343 that Your version of the license contains terms which differ from the
344 Sun Public License. (Filling in the name of the Initial Developer,
345 Original Code or Contributor in the notice described in Exhibit A
346 shall not of themselves be deemed to be modifications of this
349 7. DISCLAIMER OF WARRANTY.
351 COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS'' BASIS,
352 WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
353 WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
354 DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
355 THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
356 IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
357 YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
358 COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
359 OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
360 ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
364 8.1. This License and the rights granted hereunder will terminate
365 automatically if You fail to comply with terms herein and fail to cure
366 such breach within 30 days of becoming aware of the breach. All
367 sublicenses to the Covered Code which are properly granted shall
368 survive any termination of this License. Provisions which, by their
369 nature, must remain in effect beyond the termination of this License
372 8.2. If You initiate litigation by asserting a patent infringement
373 claim (excluding declaratory judgment actions) against Initial Developer
374 or a Contributor (the Initial Developer or Contributor against whom
375 You file such action is referred to as "Participant") alleging that:
377 (a) such Participant's Contributor Version directly or indirectly
378 infringes any patent, then any and all rights granted by such
379 Participant to You under Sections 2.1 and/or 2.2 of this License
380 shall, upon 60 days notice from Participant terminate prospectively,
381 unless if within 60 days after receipt of notice You either: (i)
382 agree in writing to pay Participant a mutually agreeable reasonable
383 royalty for Your past and future use of Modifications made by such
384 Participant, or (ii) withdraw Your litigation claim with respect to
385 the Contributor Version against such Participant. If within 60 days
386 of notice, a reasonable royalty and payment arrangement are not
387 mutually agreed upon in writing by the parties or the litigation claim
388 is not withdrawn, the rights granted by Participant to You under
389 Sections 2.1 and/or 2.2 automatically terminate at the expiration of
390 the 60 day notice period specified above.
392 (b) any software, hardware, or device, other than such Participant's
393 Contributor Version, directly or indirectly infringes any patent, then
394 any rights granted to You by such Participant under Sections 2.1(b)
395 and 2.2(b) are revoked effective as of the date You first made, used,
396 sold, distributed, or had made, Modifications made by that
399 8.3. If You assert a patent infringement claim against Participant
400 alleging that such Participant's Contributor Version directly or
401 indirectly infringes any patent where such claim is resolved (such as
402 by license or settlement) prior to the initiation of patent
403 infringement litigation, then the reasonable value of the licenses
404 granted by such Participant under Sections 2.1 or 2.2 shall be taken
405 into account in determining the amount or value of any payment or
408 8.4. In the event of termination under Sections 8.1 or 8.2 above, all
409 end user license agreements (excluding distributors and resellers)
410 which have been validly granted by You or any distributor hereunder
411 prior to termination shall survive termination.
413 9. LIMITATION OF LIABILITY.
415 UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
416 (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
417 DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
418 OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
419 ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
420 CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
421 WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
422 COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
423 INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
424 LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
425 RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
426 PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
427 EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
428 THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
430 10. U.S. GOVERNMENT END USERS.
432 The Covered Code is a "commercial item," as that term is defined in 48
433 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer software"
434 and "commercial computer software documentation," as such terms are
435 used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R.
436 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all
437 U.S. Government End Users acquire Covered Code with only those rights
442 This License represents the complete agreement concerning subject
443 matter hereof. If any provision of this License is held to be
444 unenforceable, such provision shall be reformed only to the extent
445 necessary to make it enforceable. This License shall be governed by
446 California law provisions (except to the extent applicable law, if
447 any, provides otherwise), excluding its conflict-of-law provisions.
448 With respect to disputes in which at least one party is a citizen of,
449 or an entity chartered or registered to do business in the United
450 States of America, any litigation relating to this License shall be
451 subject to the jurisdiction of the Federal Courts of the Northern
452 District of California, with venue lying in Santa Clara County,
453 California, with the losing party responsible for costs, including
454 without limitation, court costs and reasonable attorneys' fees and
455 expenses. The application of the United Nations Convention on
456 Contracts for the International Sale of Goods is expressly excluded.
457 Any law or regulation which provides that the language of a contract
458 shall be construed against the drafter shall not apply to this
461 12. RESPONSIBILITY FOR CLAIMS.
463 As between Initial Developer and the Contributors, each party is
464 responsible for claims and damages arising, directly or indirectly,
465 out of its utilization of rights under this License and You agree to
466 work with Initial Developer and Contributors to distribute such
467 responsibility on an equitable basis. Nothing herein is intended or
468 shall be deemed to constitute any admission of liability.
470 13. MULTIPLE-LICENSED CODE.
472 Initial Developer may designate portions of the Covered Code as
473 "Multiple-Licensed". Multiple-Licensed means that the Initial
474 Developer permits you to utilize portions of the Covered Code under
475 Your choice of the alternative licenses, if any, specified by the
476 Initial Developer in the file described in Exhibit A.
478 Exhibit A -Sun Public License Notice.
480 The contents of this file are subject to the Sun Public License
481 Version 1.0 (the "License"); you may not use this file except in
482 compliance with the License. A copy of the License is available at
485 The Original Code is _________________. The Initial Developer of the
486 Original Code is ___________. Portions created by ______ are Copyright
487 (C)_________. All Rights Reserved.
489 Contributor(s): ______________________________________.
491 Alternatively, the contents of this file may be used under the terms
492 of the _____ license (the [___] License), in which case the
493 provisions of [______] License are applicable instead of those above.
494 If you wish to allow use of your version of this file only under the
495 terms of the [____] License and not to allow others to use your
496 version of this file under the SPL, indicate your decision by deleting
497 the provisions above and replace them with the notice and other
498 provisions required by the [___] License. If you do not delete the
499 provisions above, a recipient may use your version of this file under
500 either the SPL or the [___] License."
502 [NOTE: The text of this Exhibit A may differ slightly from the text of
503 the notices in the Source Code files of the Original Code. You should
504 use the text of this Exhibit A rather than the text found in the
505 Original Code Source Code for Your Modifications.]