-
Notifications
You must be signed in to change notification settings - Fork 11
/
README
243 lines (178 loc) · 8.04 KB
/
README
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
README: The Java Developers Kit
This 1.0 release of the Java Developers Kit (JDK) lets you
write applets that conform to the 1.0 Java applet API.
The JDK helps you to:
---------------------
- Develop applets that conform to the final applet API
- Create applets that run in all Java-enabled browsers
- Develop Java applications
- Experiment with the debugger API (and a prototype
command-line debugger)
Supported platforms
-------------------
The JDK is available for SPARC Solaris, Windows NT, and Windows 95.
The JDK contains:
-----------------
- classes.zip
DO NOT UNZIP THIS FILE! It is needed by the compiler and
interpreter.
- src.zip
This is a set of source files that may be unzipped if
desired. You can get a free copy of the correct version
of unzip from ftp://ftp.uu.net/pub/archiving/zip/WIN32 .
- Java Applet Viewer,
for testing and running applets
- Java Debugger API and Prototype Debugger,
an API (java.tools.debug) and early prototype
of a command-line debugger that uses the API
- Java Compiler
- Java Interpreter
NOTE: This release does NOT include a Web browser.
What is the final applet API?
------------------------------
The final applet API consists of the following packages: java.lang,
java.util, java.io, java.net, java.awt, java.awt.peer, java.awt.image,
and java.applet. We and our partners are committed to supporting
this API.
----------------------------------------------------------------------
IMPORTANT: Please make sure you understand the Copyright and License
information (in the file named COPYRIGHT) before using this release.
----------------------------------------------------------------------
The rest of this document has the following sections:
- Where to find more information
- Running applets with the Applet Viewer
- The APPLET tag
- Debugging programs with JDB
Where to find more information
------------------------------
This file is the only documentation included in this release. The
rest of the information you need is on our website:
http://java.sun.com/JDK-1.0/
It includes the following:
- Frequently asked questions
- Changes since the last release
- Applet examples (some of which are in this release, as well)
- API documentation
- Documentation for the Java programming tools (including java,
javac, and jdb)
- The latest Java Language Specification
- Known bugs in the JDK
If you have questions, problems, or comments:
1. Check out the FAQ at:
http://java.sun.com/JDK-1.0/faq.html
2. Before filing a bug report, please check the known bugs at:
http://java.sun.com/JDK-1.0/KnownBugs-JDK.html
File bug reports following the instructions at:
http://java.sun.com/GettingInTouch/BugReport.html
3. The newsgroup comp.lang.java and the Java/HotJava mailing lists
are active forums for posting questions and exchanging information
with other Java users. See http://java.sun.com/mail.html for
information on accessing the newsgroup and mailing lists.
4. Other questions can be sent to [email protected].
Running applets with the Applet Viewer
--------------------------------------
Here are two examples of using the Applet Viewer:
bin/appletviewer demo/GraphLayout/example1.html
bin/appletviewer http://java.sun.com/applets/applets/NervousText/example1.html
(On the PC, use "bin\appletviewer" instead of "bin/appletviewer".)
The argument is a filename or URL that refers to an HTML file that
contains one or more APPLET tags. The Applet Viewer finds the APPLET
tags in the HTML file and runs the applets as specified by the tags
(in separate windows).
The APPLET tag
--------------
The APP tag of previous releases is gone, replaced by the APPLET tag.
Here is an example of a simple APPLET tag:
<applet code="MyApplet.class" width=100 height=140></applet>
This tells the viewer or browser to load the applet whose compiled
code is in MyApplet.class (in the same directory as the current HTML
document), and to set the initial size of the applet to 100 pixels
wide and 140 pixels high.
Here's a more complex example of an APPLET tag:
<applet codebase="http://java.sun.com/applets/applets/NervousText"
code="NervousText.class" width=400 height=75 align=center >
<param name="text" value="This is the Applet Viewer.">
<blockquote>
<hr>
If you were using a Java-enabled browser,
you would see dancing text instead of this paragraph.
<hr>
</blockquote>
</applet>
This tells the viewer or browser to load the applet whose compiled
code is at the URL
http://java.sun.com/applets/applets/NervousText/NervousText.class,
to set the initial size of the applet to 400x75 pixels, and to align
the applet in the center of the line. The viewer/browser must also
set the applet's "text" attribute (which customizes the text this
applet displays) to be "This is the Applet Viewer." If the page is
viewed by a browser that can't execute Java applets, then the browser
will ignore the APPLET and PARAM tags, displaying the HTML between
the <blockquote> and </blockquote> tags. Java-enabled browsers
*ignore* that HTML.
Here's the complete syntax for the APPLET tag:
'<' 'APPLET'
['CODEBASE' '=' codebaseURL]
'CODE' '=' appletFile
['ALT' '=' alternateText]
['NAME' '=' appletInstanceName]
'WIDTH' '=' pixels 'HEIGHT' '=' pixels
['ALIGN' '=' alignment]
['VSPACE' '=' pixels] ['HSPACE' '=' pixels]
'>'
['<' 'PARAM' 'NAME' '=' appletAttribute1 'VALUE' '=' value '>']
['<' 'PARAM' 'NAME' '=' appletAttribute2 'VALUE' '=' value '>']
. . .
[alternateHTML]
'</APPLET>'
'CODEBASE' '=' codebaseURL
This optional attribute specifies the base URL of the applet --
the directory that contains the applet's code. If this attribute
is not specified, then the document's URL is used.
'CODE' '=' appletFile
This required attribute gives the name of the file that contains
the applet's compiled Applet subclass. This file is relative to
the base URL of the applet. It cannot be absolute.
'ALT' '=' alternateText
This optional attribute specifies any text that should be
displayed if the browser understands the APPLET tag but can't
run Java applets.
'NAME' '=' appletInstanceName
This optional attribute specifies a name for the applet instance,
which makes it possible for applets on the same page to find (and
communicate with) each other.
'WIDTH' '=' pixels 'HEIGHT' '=' pixels
These required attributes give the initial width and height (in
pixels) of the applet display area, not counting any windows or
dialogs that the applet brings up.
'ALIGN' '=' alignment
This required attribute specifies the alignment of the applet.
The possible values of this attribute are the same as those for
the IMG tag: left, right, top, texttop, middle, absmiddle,
baseline, bottom, absbottom.
'VSPACE' '=' pixels 'HSPACE' '=' pixels
These option attributes specify the number of pixels above and
below the applet (VSPACE) and on each side of the applet (HSPACE).
They're treated the same way as the IMG tag's VSPACE and HSPACE
attributes.
'<' 'PARAM' 'NAME' '=' appletAttribute1 'VALUE' '=' value '>' . . .
This tag is the only way to specify an applet-specific attribute.
Applets access their attributes with the getParameter() method.
Debugging programs with JDB
---------------------------
This release contains the Java Debugger (JDB), an alpha-quality
prototype of a command-line debugger for Java classes. It is
designed to test the Java Debugger API, which is in the package
java.tools.debug. We look forward to getting your feedback on
the debugger API.
You can debug applets using the -debug option of appletviewer.
When debugging applets, it's best to invoke appletviewer from
the directory that contains the applet's HTML file. For example,
on Solaris:
cd demo/TicTacToe
../../bin/appletviewer -debug example1.html
On the PC:
cd demo\TicTacToe
..\..\bin\appletviewer -debug example1.html
You can find documentation on the debugger and its API at:
http://java.sun.com/JDK-1.0/debugging/