aboutsummaryrefslogtreecommitdiff
path: root/src/share/classes/com/sun
diff options
context:
space:
mode:
Diffstat (limited to 'src/share/classes/com/sun')
-rw-r--r--src/share/classes/com/sun/java/util/jar/pack/Constants.java7
-rw-r--r--src/share/classes/com/sun/java/util/jar/pack/Package.java17
-rw-r--r--src/share/classes/com/sun/java/util/jar/pack/PropMap.java6
-rw-r--r--src/share/classes/com/sun/servicetag/Registry.java34
-rw-r--r--src/share/classes/com/sun/servicetag/resources/jdk_header.pngbin19005 -> 8705 bytes
-rw-r--r--src/share/classes/com/sun/servicetag/resources/register.html24
-rw-r--r--src/share/classes/com/sun/servicetag/resources/register_ja.html12
-rw-r--r--src/share/classes/com/sun/servicetag/resources/register_zh_CN.html12
8 files changed, 61 insertions, 51 deletions
diff --git a/src/share/classes/com/sun/java/util/jar/pack/Constants.java b/src/share/classes/com/sun/java/util/jar/pack/Constants.java
index a9deb0cd8..19ce04cf5 100644
--- a/src/share/classes/com/sun/java/util/jar/pack/Constants.java
+++ b/src/share/classes/com/sun/java/util/jar/pack/Constants.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -47,10 +47,13 @@ interface Constants {
public final static short JAVA5_MAX_CLASS_MAJOR_VERSION = 49;
public final static short JAVA5_MAX_CLASS_MINOR_VERSION = 0;
- // NOTE: ASSUMED for now
+
public final static short JAVA6_MAX_CLASS_MAJOR_VERSION = 50;
public final static short JAVA6_MAX_CLASS_MINOR_VERSION = 0;
+ public final static short JAVA7_MAX_CLASS_MAJOR_VERSION = 51;
+ public final static short JAVA7_MAX_CLASS_MINOR_VERSION = 0;
+
public final static int JAVA_PACKAGE_MAGIC = 0xCAFED00D;
public final static int JAVA5_PACKAGE_MAJOR_VERSION = 150;
public final static int JAVA5_PACKAGE_MINOR_VERSION = 7;
diff --git a/src/share/classes/com/sun/java/util/jar/pack/Package.java b/src/share/classes/com/sun/java/util/jar/pack/Package.java
index ad7fdbaa5..1ea04690e 100644
--- a/src/share/classes/com/sun/java/util/jar/pack/Package.java
+++ b/src/share/classes/com/sun/java/util/jar/pack/Package.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2001, 2005, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2010, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -57,8 +57,8 @@ class Package implements Constants {
// These fields can be adjusted by driver properties.
short min_class_majver = JAVA_MIN_CLASS_MAJOR_VERSION;
short min_class_minver = JAVA_MIN_CLASS_MINOR_VERSION;
- short max_class_majver = JAVA6_MAX_CLASS_MAJOR_VERSION;
- short max_class_minver = JAVA6_MAX_CLASS_MINOR_VERSION;
+ short max_class_majver = JAVA7_MAX_CLASS_MAJOR_VERSION;
+ short max_class_minver = JAVA7_MAX_CLASS_MINOR_VERSION;
short observed_max_class_majver = min_class_majver;
short observed_max_class_minver = min_class_minver;
@@ -122,13 +122,16 @@ class Package implements Constants {
void choosePackageVersion() {
assert(package_majver <= 0); // do not call this twice
int classver = getHighestClassVersion();
- if (classver != 0 &&
- (classver >>> 16) < JAVA6_MAX_CLASS_MAJOR_VERSION) {
- // There are only old classfiles in this segment.
+ if (classver == 0 || (classver >>> 16) < JAVA6_MAX_CLASS_MAJOR_VERSION) {
+ // There are only old classfiles in this segment or resources
package_majver = JAVA5_PACKAGE_MAJOR_VERSION;
package_minver = JAVA5_PACKAGE_MINOR_VERSION;
+ } else if ((classver >>> 16) == JAVA6_MAX_CLASS_MAJOR_VERSION) {
+ package_majver = JAVA6_PACKAGE_MAJOR_VERSION;
+ package_minver = JAVA6_PACKAGE_MINOR_VERSION;
} else {
- // Normal case. Use the newest archive format.
+ // Normal case. Use the newest archive format, when available
+ // TODO: replace the following with JAVA7* when the need arises
package_majver = JAVA6_PACKAGE_MAJOR_VERSION;
package_minver = JAVA6_PACKAGE_MINOR_VERSION;
}
diff --git a/src/share/classes/com/sun/java/util/jar/pack/PropMap.java b/src/share/classes/com/sun/java/util/jar/pack/PropMap.java
index c5eb8d75d..6b92236f8 100644
--- a/src/share/classes/com/sun/java/util/jar/pack/PropMap.java
+++ b/src/share/classes/com/sun/java/util/jar/pack/PropMap.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003,2010 Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -90,8 +90,8 @@ class PropMap extends TreeMap {
props.put(Utils.PACK_DEFAULT_TIMEZONE,
String.valueOf(Boolean.getBoolean(Utils.PACK_DEFAULT_TIMEZONE)));
- // Limit segment size to less than a megabyte.
- props.put(Pack200.Packer.SEGMENT_LIMIT, ""+(1*1000*1000));
+ // The segment size is unlimited
+ props.put(Pack200.Packer.SEGMENT_LIMIT, "");
// Preserve file ordering by default.
props.put(Pack200.Packer.KEEP_FILE_ORDER, Pack200.Packer.TRUE);
diff --git a/src/share/classes/com/sun/servicetag/Registry.java b/src/share/classes/com/sun/servicetag/Registry.java
index 68386ce67..14ad2fd62 100644
--- a/src/share/classes/com/sun/servicetag/Registry.java
+++ b/src/share/classes/com/sun/servicetag/Registry.java
@@ -67,7 +67,6 @@ public class Registry {
// The stclient output has to be an exported interface
private static final String INSTANCE_URN_DESC = "Product instance URN=";
private static boolean initialized = false;
- private static boolean supportsHelperClass = true; // default
private static File stclient = null;
private static String stclientPath = null;
private static Registry registry = new Registry();
@@ -81,17 +80,6 @@ public class Registry {
private synchronized static String getSTclient() {
if (!initialized) {
- // the system property always overrides the default setting
- if (System.getProperty(SVCTAG_STHELPER_SUPPORTED) != null) {
- supportsHelperClass = Boolean.getBoolean(SVCTAG_STHELPER_SUPPORTED);
- }
-
- // This is only used for testing
- stclientPath = System.getProperty(SVCTAG_STCLIENT_CMD);
- if (stclientPath != null) {
- return stclientPath;
- }
-
// Initialization to determine the platform's stclient pathname
String os = System.getProperty("os.name");
if (os.equals("SunOS")) {
@@ -108,10 +96,26 @@ public class Registry {
initialized = true;
}
+ boolean supportsHelperClass = true; // default
+ if (System.getProperty(SVCTAG_STHELPER_SUPPORTED) != null) {
+ // the system property always overrides the default setting
+ supportsHelperClass = Boolean.getBoolean(SVCTAG_STHELPER_SUPPORTED);
+ }
+
+ if (!supportsHelperClass) {
+ // disable system registry
+ return null;
+ }
+
+ // This is only used for testing
+ String path = System.getProperty(SVCTAG_STCLIENT_CMD);
+ if (path != null) {
+ return path;
+ }
+
// com.sun.servicetag package has to be compiled with JDK 5 as well
// JDK 5 doesn't support the File.canExecute() method.
// Risk not checking isExecute() for the stclient command is very low.
-
if (stclientPath == null && stclient != null && stclient.exists()) {
stclientPath = stclient.getAbsolutePath();
}
@@ -142,8 +146,8 @@ public class Registry {
* @return {@code true} if the {@code Registry} class is supported;
* otherwise, return {@code false}.
*/
- public static boolean isSupported() {
- return (getSTclient() != null && supportsHelperClass);
+ public static synchronized boolean isSupported() {
+ return getSTclient() != null;
}
private static List<String> getCommandList() {
diff --git a/src/share/classes/com/sun/servicetag/resources/jdk_header.png b/src/share/classes/com/sun/servicetag/resources/jdk_header.png
index 011cfd4cd..ccfe6dad8 100644
--- a/src/share/classes/com/sun/servicetag/resources/jdk_header.png
+++ b/src/share/classes/com/sun/servicetag/resources/jdk_header.png
Binary files differ
diff --git a/src/share/classes/com/sun/servicetag/resources/register.html b/src/share/classes/com/sun/servicetag/resources/register.html
index 7684268eb..cc1dee262 100644
--- a/src/share/classes/com/sun/servicetag/resources/register.html
+++ b/src/share/classes/com/sun/servicetag/resources/register.html
@@ -53,13 +53,13 @@ a:visited,a:visited code{color:#917E9C}
</tr>
<tr>
<td>&nbsp;</td>
- <td><p class="style1">Thank you for installing the
+ <td><p class="style1">Thank you for installing the
<strong> Java Development Kit @@JDK_VERSION@@ </strong>
- from Sun Microsystems. </p>
+ from Oracle Corporation. </p>
<p class="style1">Registering your product will give you the following benefits:</p>
<ul class="style1">
<li> Notification of new versions, patches, and updates</li>
- <li> Special offers on Sun developer products, services and training </li>
+ <li> Special offers on Oracle developer products, services and training </li>
<li> Access to early releases and documentation </li>
</ul>
<p class="style1">Product registration is FREE, quick and easy!</p>
@@ -68,11 +68,11 @@ a:visited,a:visited code{color:#917E9C}
<table width="708" border="0" cellspacing="0" cellpadding="3">
<tr valign="top">
<td width="126" height="35">
- <form name="form1" method="post" action="@@REGISTRATION_URL@@">
+ <form name="form1" method="post" action="@@REGISTRATION_URL@@" enctype="text/xml">
<input type="hidden" name="servicetag_payload" value="@@REGISTRATION_PAYLOAD@@">
<input type="submit" name="Submit"border="0" class="buttonblue" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';" value="Register My JDK">
</form></td>
- <td width="570"><span class="style3">You need to be connected to the Internet to register this Sun product. </span></td>
+ <td width="570"><span class="style3">You need to be connected to the Internet to register this Oracle product. </span></td>
</tr>
</table>
</blockquote>
@@ -81,16 +81,16 @@ a:visited,a:visited code{color:#917E9C}
<tr>
<td>&nbsp;</td>
<td bgcolor="#f1f7df">
- <p class="style3">Sun Microsystems, Inc. respects your privacy.
- We will use your personal information for communications
- and management of your Sun Online Account, the services
- and applications you access using your Sun Online Account,
+ <p class="style3">Oracle Corporation respects your privacy.
+ We will use your personal information for communications
+ and management of your Sun Online Account, the services
+ and applications you access using your Sun Online Account,
and the products and systems you register with your Sun Online Account.</p>
- <p class="style3">For more information on the data that will be collected as
+ <p class="style3">For more information on the data that will be collected as
part of the registration process and how it will be managed <br>
- see <a href="http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html</a>. <br>
+ see <a href="http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html</a>. <br>
<br>
- For more information on Sun's Privacy Policy see <a href="http://www.sun.com/privacy/">http://www.sun.com/privacy/</a> or contact <a class="moz-txt-link-rfc2396E" href="mailto:privacy@sun.com">privacy@sun.com.</a></p></td>
+ For more information on Oracle's Privacy Policy see <a href="http://www.oracle.com/html/privacy.html">http://www.oracle.com/html/privacy.html</a> or contact <a class="moz-txt-link-rfc2396E" href="mailto:privacy_ww@oracle.com">privacy_ww@oracle.com.</a></p></td>
</tr>
<tr>
<td>&nbsp;</td>
diff --git a/src/share/classes/com/sun/servicetag/resources/register_ja.html b/src/share/classes/com/sun/servicetag/resources/register_ja.html
index dae437712..3da70723e 100644
--- a/src/share/classes/com/sun/servicetag/resources/register_ja.html
+++ b/src/share/classes/com/sun/servicetag/resources/register_ja.html
@@ -50,11 +50,11 @@ a:visited,a:visited code{color:#917E9C}
<tr>
<td>&nbsp;</td>
- <td><p class="style1">Sun Microsystems の<strong> Java Development Kit @@JDK_VERSION@@ </strong>をインストールしていただき、ありがとうございます。 </p>
+ <td><p class="style1">Oracle Corporation の<strong> Java Development Kit @@JDK_VERSION@@ </strong>をインストールしていただき、ありがとうございます。 </p>
<p class="style1">製品登録をすると、次のような特典を受けることができます。</p>
<ul class="style1">
<li> 最新のバージョン、パッチ、および更新についての通知</li>
- <li> Sun の開発者向け製品、サービス、およびトレーニングの特別販売 </li>
+ <li> Oracle の開発者向け製品、サービス、およびトレーニングの特別販売 </li>
<li> アーリーリリースおよびドキュメントへのアクセス </li>
</ul>
<p class="style1">製品登録は無料であり、迅速で簡単です。</p>
@@ -62,11 +62,11 @@ a:visited,a:visited code{color:#917E9C}
<p class="style1">必要になるのは、Sun 開発者向けネットワークアカウントまたはその他の Sun オンラインアカウントだけです。 まだアカウントがない場合は、アカウントの作成が求められます。 </p>
<table width="708" border="0" cellspacing="0" cellpadding="3">
<tr valign="top">
- <td width="126" height="35"><form name="form1" method="post" action="@@REGISTRATION_URL@@">
+ <td width="126" height="35"><form name="form1" method="post" action="@@REGISTRATION_URL@@" enctype="text/xml">
<input type="hidden" name="servicetag_payload" value="@@REGISTRATION_PAYLOAD@@">
<input type="submit" name="Submit"border="0" class="buttonblue" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';" value="JDK 製品登録">
</form></td>
- <td width="570"><span class="style3">この Sun 製品を登録するには、インターネットに接続している必要があります。 </span></td>
+ <td width="570"><span class="style3">この Oracle 製品を登録するには、インターネットに接続している必要があります。 </span></td>
</tr>
</table>
</blockquote>
@@ -75,8 +75,8 @@ a:visited,a:visited code{color:#917E9C}
<tr>
<td>&nbsp;</td>
<td bgcolor="#f1f7df">
- <p class="style3">Sun Microsystems, Inc. は、お客様のプライバシーを尊重します。 お客様の個人情報は、お客様の Sun オンラインアカウント、お客様が Sun オンラインアカウントを使用してアクセスするサービスとアプリケーション、およびお客様が Sun オンラインアカウントで登録する製品とシステムの通信と管理に使用します。</p>
- <p class="style3">登録の際に収集されるデータや、それらがどのように管理されるかについての詳細は、<br><a href="http://java.sun.com/javase/ja/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/ja/registration/JDKRegistrationPrivacy.html</a> を参照してください。 <br> <br> Sun のプライバシーポリシーについての詳細は、<a href="http://jp.sun.com/privacy/">http://jp.sun.com/privacy/</a> を参照するか、<a class="moz-txt-link-rfc2396E" href="http://jp.sun.com/cgi-bin/contact/comment.cgi?url=http://jp.sun.com/privacy/">お問い合わせフォーム</a>からお問い合わせください。</p></td>
+ <p class="style3">Oracle Corporation は、お客様のプライバシーを尊重します。 お客様の個人情報は、お客様の Sun オンラインアカウント、お客様が Sun オンラインアカウントを使用してアクセスするサービスとアプリケーション、およびお客様が Sun オンラインアカウントで登録する製品とシステムの通信と管理に使用します。</p>
+ <p class="style3">登録の際に収集されるデータや、それらがどのように管理されるかについての詳細は、<br><a href="http://java.sun.com/javase/ja/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/ja/registration/JDKRegistrationPrivacy.html</a> を参照してください。 <br> <br> Oracle のプライバシーポリシーについての詳細は、<a href="http://www.oracle.com/html/privacy.html">http://www.oracle.com/html/privacy.html</a> を参照するか、<a class="moz-txt-link-rfc2396E" href="mailto:privacy_ww@oracle.com">お問い合わせフォーム</a>からお問い合わせください。</p></td>
</tr>
<tr>
<td>&nbsp;</td>
diff --git a/src/share/classes/com/sun/servicetag/resources/register_zh_CN.html b/src/share/classes/com/sun/servicetag/resources/register_zh_CN.html
index dfc24dc94..f5bad110b 100644
--- a/src/share/classes/com/sun/servicetag/resources/register_zh_CN.html
+++ b/src/share/classes/com/sun/servicetag/resources/register_zh_CN.html
@@ -51,11 +51,11 @@ a:visited,a:visited code{color:#917E9C}
<tr>
<td>&nbsp;</td>
-<td><p class="style1">感谢您安装 Sun Microsystems 的 <strong>Java Development Kit @@JDK_VERSION@@</strong>。 </p>
+<td><p class="style1">感谢您安装 Oracle Corporation 的 <strong>Java Development Kit @@JDK_VERSION@@</strong>。 </p>
<p class="style1">注册产品后您将获得如下增值服务:</p>
<ul class="style1">
<li> 获得新版本、修补程序和更新的通知服务</li>
-<li> 获得有关 Sun 开发者产品、服务和培训的优惠 </li>
+<li> 获得有关 Oracle 开发者产品、服务和培训的优惠 </li>
<li> 获得对早期版本和文档的访问权限 </li>
</ul>
<p class="style1">产品注册是免费的,即快速又轻松!</p>
@@ -63,11 +63,11 @@ a:visited,a:visited code{color:#917E9C}
<p class="style1">您需要具有 Sun 开发者网络或其他 Sun 联机帐户。如果您没有,系统将提示您创建一个。 </p>
<table width="708" border="0" cellspacing="0" cellpadding="3">
<tr valign="top">
- <td width="126" height="35"><form name="form1" method="post" action="@@REGISTRATION_URL@@">
+ <td width="126" height="35"><form name="form1" method="post" action="@@REGISTRATION_URL@@" enctype="text/xml">
<input type="hidden" name="servicetag_payload" value="@@REGISTRATION_PAYLOAD@@">
<input type="submit" name="Submit"border="0" class="buttonblue" onmouseover="this.style.color='#fbe249';" onmouseout="this.style.color='#FFF';" value="注册我的 JDK">
</form></td>
-<td width="570"><span class="style3">您需要连接到 Internet 来注册此 Sun 产品。 </span></td>
+<td width="570"><span class="style3">您需要连接到 Internet 来注册此 Oracle 产品。 </span></td>
</tr>
</table>
</blockquote>
@@ -76,8 +76,8 @@ a:visited,a:visited code{color:#917E9C}
<tr>
<td>&nbsp;</td>
<td bgcolor="#f1f7df">
- <p class="style3">Sun Microsystems, Inc. 尊重您的隐私。我们会将您的个人信息用于通信和 Sun 联机帐户的管理、Sun 联机帐户访问的服务和应用程序以及用于使用 Sun 联机帐户注册的产品和系统。</p>
-<p class="style3">有关注册过程中收集的数据以及这些数据的管理方式的更多信息,<br>请访问 <a href="http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html</a>。<br> <br>有关 Sun 隐私政策的更多信息,请访问 <a href="http://www.sun.com/privacy/">http://www.sun.com/privacy/</a> 或与 <a class="moz-txt-link-rfc2396E" href="mailto:privacy@sun.com">privacy@sun.com</a> 联系。</p></td>
+ <p class="style3">Oracle 尊重您的隐私。我们会将您的个人信息用于通信和 Sun 联机帐户的管理、Sun 联机帐户访问的服务和应用程序以及用于使用 Sun 联机帐户注册的产品和系统。</p>
+<p class="style3">有关注册过程中收集的数据以及这些数据的管理方式的更多信息,<br>请访问 <a href="http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html">http://java.sun.com/javase/registration/JDKRegistrationPrivacy.html</a>。<br> <br>有关 Oracle 隐私政策的更多信息,请访问 <a href="http://www.oracle.com/html/privacy.html">http://www.oracle.com/html/privacy.html</a> 或与 <a class="moz-txt-link-rfc2396E" href="mailto:privacy_ww@oracle.com">privacy_ww@oracle.com</a> 联系。</p></td>
</tr>
<tr>
<td>&nbsp;</td>