📄 manual.ps
字号:
/s {stroke} bind def/sh {show} bind def/slc {setlinecap} bind def/slj {setlinejoin} bind def/slw {setlinewidth} bind def/srgb {setrgbcolor} bind def/rot {rotate} bind def/sc {scale} bind def/sd {setdash} bind def/ff {findfont} bind def/sf {setfont} bind def/scf {scalefont} bind def/sw {stringwidth} bind def/tr {translate} bind def/tnt {dup dup currentrgbcolor 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add 4 -2 roll dup 1 exch sub 3 -1 roll mul add srgb} bind def/shd {dup dup currentrgbcolor 4 -2 roll mul 4 -2 roll mul 4 -2 roll mul srgb} bind def/$F2psBegin {$F2psDict begin /$F2psEnteredState save def} def/$F2psEnd {$F2psEnteredState restore end} def%%EndProlog$F2psBegin10 setmiterlimitn -1000 4612 m -1000 -1000 l 8588 -1000 l 8588 4612 l cp clip 0.06000 0.06000 sc/Courier ff 285.00 scf sf6600 1575 mgs 1 -1 sc (java) col0 sh gr/Courier ff 285.00 scf sf2550 1575 mgs 1 -1 sc (javac) col0 sh gr/Courier-Bold ff 150.00 scf sf4290 1155 mgs 1 -1 sc (08 1a 42 ...) col0 sh gr/Courier-Bold ff 150.00 scf sf4290 990 mgs 1 -1 sc (ca fe ba be) col0 sh gr% Polyline7.500 slwn 6405 1200 m 6300 1200 6300 1695 105 arcto 4 {pop} repeat 6300 1800 7395 1800 105 arcto 4 {pop} repeat 7500 1800 7500 1305 105 arcto 4 {pop} repeat 7500 1200 6405 1200 105 arcto 4 {pop} repeat cp gs col0 s gr % Polylinen 2505 1200 m 2400 1200 2400 1695 105 arcto 4 {pop} repeat 2400 1800 3495 1800 105 arcto 4 {pop} repeat 3600 1800 3600 1305 105 arcto 4 {pop} repeat 3600 1200 2505 1200 105 arcto 4 {pop} repeat cp gs col0 s gr % Polyline30.000 slwgs clippath2280 1470 m 2400 1500 l 2280 1530 l 2445 1530 l 2445 1470 l cpclipn 1800 1500 m 2400 1500 l gs col0 s gr gr% arrowhead7.500 slwn 2280 1470 m 2400 1500 l 2280 1530 l 2280 1500 l 2280 1470 l cp gs 0.00 setgray ef gr col0 s% Polyline30.000 slwgs clippath4080 1470 m 4200 1500 l 4080 1530 l 4245 1530 l 4245 1470 l cpclipn 3600 1500 m 4200 1500 l gs col0 s gr gr% arrowhead7.500 slwn 4080 1470 m 4200 1500 l 4080 1530 l 4080 1500 l 4080 1470 l cp gs 0.00 setgray ef gr col0 s% Polyline30.000 slwgs clippath6180 1470 m 6300 1500 l 6180 1530 l 6345 1530 l 6345 1470 l cpclipn 5700 1500 m 6300 1500 l gs col0 s gr gr% arrowhead7.500 slwn 6180 1470 m 6300 1500 l 6180 1530 l 6180 1500 l 6180 1470 l cp gs 0.00 setgray ef gr col0 s% Polyline30.000 slwn 5415 615 m 5415 915 l 5715 915 l gs col0 s gr % Polylinen 4215 615 m 4215 2415 l 5715 2415 l 5715 915 l 5415 615 l 4215 615 l cp gs col0 s gr % Polylinegs clippath7006 1136 m 6900 1200 l 6964 1094 l 6847 1211 l 6889 1253 l cpclipn 7500 600 m 6900 1200 l gs col0 s gr gr% arrowhead7.500 slwn 7006 1136 m 6900 1200 l 6964 1094 l 6985 1115 l 7006 1136 l cp gs 0.00 setgray ef gr col0 s% Polyline30.000 slwgs clippath6630 1080 m 6600 1200 l 6570 1080 l 6570 1245 l 6630 1245 l cpclipn 6600 1200 m 6600 600 l gs col0 s gr gr% arrowhead7.500 slwn 6630 1080 m 6600 1200 l 6570 1080 l 6600 1080 l 6630 1080 l cp gs 0.00 setgray ef gr col0 s% Polylinen 300 3000 m 3600 3000 l 3600 3600 l 300 3600 l cp gs 0.90 setgray ef gr gs col0 s gr % Polylinen 4200 3000 m 7500 3000 l 7500 3600 l 4200 3600 l cp gs 0.90 setgray ef gr gs col0 s gr % Polylinen 1500 600 m 1500 900 l 1800 900 l gs col0 s gr % Polylinen 300 600 m 300 2400 l 1800 2400 l 1800 900 l 1500 600 l 300 600 l cp gs col0 s gr /Helvetica ff 180.00 scf sf6450 450 mgs 1 -1 sc (Other classes) col0 sh gr/Courier ff 150.00 scf sf375 975 mgs 1 -1 sc (public class) col0 sh gr/Courier ff 150.00 scf sf375 1140 mgs 1 -1 sc (HelloWorld {) col0 sh gr/Courier ff 150.00 scf sf375 1305 mgs 1 -1 sc ( ...) col0 sh gr/Courier ff 150.00 scf sf375 1635 mgs 1 -1 sc ( void hello\(\) {) col0 sh gr/Courier ff 150.00 scf sf375 1800 mgs 1 -1 sc ( ...) col0 sh gr/Courier ff 150.00 scf sf375 1965 mgs 1 -1 sc ( }) col0 sh gr/Courier ff 150.00 scf sf375 2130 mgs 1 -1 sc (}) col0 sh gr/Helvetica ff 180.00 scf sf4275 2625 mgs 1 -1 sc (HelloWorld.class) col0 sh gr/Helvetica-Bold ff 300.00 scf sf900 3375 mgs 1 -1 sc (Java language) col0 sh gr/Helvetica-Bold ff 300.00 scf sf4350 3375 mgs 1 -1 sc (Java Virtual Machine) col0 sh gr/Helvetica ff 180.00 scf sf375 2625 mgs 1 -1 sc (HelloWorld.java) col-1 sh gr$F2psEndrs%%EndDocument @endspecial 781 2998 a(Figur)n(e)g(1:)31 b(Compilation)25b(and)g(execution)h(of)f(Java)g(classes)146 3370 y(Note)e(that)g(the)f(use)h(of)g(the)f(general)g(term)h(\223Java\224)f(implies)g(two)h(meanings:)30 b(on)23 b(the)f(one)g(hand,)0 3491 y(Java)i(as)f(a)g(pr)n(ogramming)i(language)f(is)g(meant,)f(on)h(the)g(other)g(hand,)f(the)h(Java)g(V)-5 b(irtual)23 b(Machine,)0 3611 y(which)k(is)g(not)g(necessarily)h(tar)n(geted)g(by)f(the)g(Java)f(language)h(exclusively)-11 b(,)28 b(but)g(may)e(be)h(used)g(by)0 3731 y(other)j(languages)f(as)g(well)f(\(e.g.)43 b(Eif)n(fel)29 b([CCZ97],)g(or)h(Ada)e([T)-9b(af96]\).)42 b(W)-9 b(e)28 b(assume)h(the)g(r)n(eader)g(to)03852 y(be)g(familiar)h(with)g(the)f(Java)h(language)g(and)f(to)h(have)f(a)h(general)f(understanding)h(of)g(the)g(V)-5 b(irtual)03972 y(Machine.)0 4320 y Fm(2.1)119 b(Java)29 b(class)h(\002le)g(format)0 4525 y Fq(Giving)g(a)f(full)g(overview)h(of)g(the)f(design)g(issues)h(of)f(the)h(Java)f(class)h(\002le)f(format)h(and)f(the)g(associ-)0 4645 y(ated)h(byte)g(code)g(instr)o(uctions)j(is)d(beyond)g(the)g(scope)h(of)f(this)h(paper)-7 b(.)45 b(W)-9 b(e)29b(will)h(just)h(give)f(a)g(brief)0 4766 y(intr)n(oduction)36b(covering)e(the)g(details)f(that)i(ar)n(e)e(necessary)h(for)g(understanding)g(the)g(r)n(est)g(of)g(this)0 4886 y(paper)-7b(.)39 b(The)28 b(format)h(of)f(class)h(\002les)f(and)f(the)h(byte)h(code)f(instr)o(uction)i(set)f(ar)n(e)f(described)g(in)f(mor)n(e)05007 y(detail)k(in)f(the)h(\223Java)g(V)-5 b(irtual)31b(Machine)g(Speci\002cation\224)h([L)-9 b(Y97])2542 4970y Fn(2)2579 5007 y Fq(,)32 b(and)f(in)f([MD97].)49 b(Especially)-11b(,)0 5127 y(we)23 b(will)g(not)h(deal)e(with)i(the)f(security)h(constraints)h(that)f(the)f(Java)g(V)-5 b(irtual)24 b(Machine)f(has)g(to)g(check)0 5247 y(at)i(r)o(un-time,)h(i.e.)k(the)25b(byte)h(code)f(veri\002er)-7 b(.)p 0 5371 1530 4 v 1165433 a Fk(2)149 5463 y Fj(Also)21 b(available)f(online)i(at)eFi(http://www.javasoft.com/docs/books/)o(vmspe)o(c/inde)o(x.htm)o(l)1888 5712 y Fq(3)p eop%%Page: 4 44 3 bop 146 407 a Fq(Figur)n(e)40 b(2)e(shows)i(a)e(simpli\002ed)h(example)f(of)h(the)g(contents)h(of)f(a)g(Java)f(class)i(\002le:)58b(It)38 b(starts)0 527 y(with)c(a)f(header)g(containing)h(a)f(\223magic)h(number)7 b(\224)33 b(\()p Fh(0xCAFEBABE)pFq(\))f(and)h(the)g(version)h(number)-7 b(,)0 648 y(followed)33b(by)f(the)g Fp(constant)h(pool)p Fq(,)g(which)g(can)e(be)h(r)n(oughly)i(thought)g(of)e(as)g(the)g(text)h(segment)f(of)0 768y(an)j(executable,)j(the)e Fp(access)e(rights)g Fq(of)i(the)g(class)g(encoded)f(by)h(a)f(bit)h(mask,)i(a)d(list)h(of)g(interfaces)0888 y(implemented)19 b(by)h(the)f(class,)i(lists)f(containing)h(the)f(\002elds)f(and)g(methods)h(of)g(the)g(class,)h(and)e(\002nally)01009 y(the)35 b Fp(class)f(attributes)p Fq(,)j(e.g.)60b(the)35 b Fh(SourceFile)d Fq(attribute)37 b(telling)e(the)g(name)f(of)h(the)g(sour)n(ce)h(\002le.)0 1129 y(Attributes)28 b(ar)n(e)f(a)g(way)g(of)g(putting)h(additional,)g(e.g.)36 b(user)n(-de\002ned,)28b(information)g(into)g(class)f(\002le)0 1249 y(data)e(str)o(uctur)n(es.)34 b(For)26 b(example,)f(a)g(custom)h(class)g(loader)f(may)h(evaluate)f(such)g(attribute)i(data)e(in)0 1370 y(or)n(der)h(to)f(perform)h(its)f(transformations.)33 b(The)25 b(JVM)g(speci\002cation)h(declar)n(es)f(that)g(unknown,)g(i.e.)0 1490 y(user)n(-de\002ned)g(attributes)i(must)e(be)g(ignor)n(ed)h(by)f(any)g(V)-5b(irtual)25 b(Machine)g(implementation.)0 5123 y @beginspecial0 @llx 0 @lly 520 @urx 460 @ury 4590 @rwi @setspecial%%BeginDocument: eps/classfile.eps%!PS-Adobe-2.0 EPSF-2.0%%Title: classfile.eps%%Creator: fig2dev Version 3.2 Patchlevel 1%%CreationDate: Mon Nov 30 16:01:26 1998%%For: dahm@che (Markus Dahm,,,,,)%%Orientation: Portrait%%BoundingBox: 0 0 520 460%%Pages: 0%%BeginSetup%%EndSetup%%Magnification: 1.0000%%EndComments/$F2psDict 200 dict def$F2psDict begin$F2psDict /mtrx matrix put/col-1 {0 setgray} bind def/col0 {0.000 0.000 0.000 srgb} bind def/col1 {0.000 0.000 1.000 srgb} bind def/col2 {0.000 1.000 0.000 srgb} bind def/col3 {0.000 1.000 1.000 srgb} bind def/col4 {1.000 0.000 0.000 srgb} bind def/col5 {1.000 0.000 1.000 srgb} bind def/col6 {1.000 1.000 0.000 srgb} bind def/col7 {1.000 1.000 1.000 srgb} bind def/col8 {0.000 0.000 0.560 srgb} bind def/col9 {0.000 0.000 0.690 srgb} bind def/col10 {0.000 0.000 0.820 srgb} bind def/col11 {0.530 0.810 1.000 srgb} bind def/col12 {0.000 0.560 0.000 srgb} bind def/col13 {0.000 0.690 0.000 srgb} bind def/col14 {0.000 0.820 0.000 srgb} bind def/col15 {0.000 0.560 0.560 srgb} bind def/col16 {0.000 0.690 0.690 srgb} bind def/col17 {0.000 0.820 0.820 srgb} bind def/col18 {0.560 0.000 0.000 srgb} bind def/col19 {0.690 0.000 0.000 srgb} bind def/col20 {0.820 0.000 0.000 srgb} bind def/col21 {0.560 0.000 0.560 srgb} bind def/col22 {0.690 0.000 0.690 srgb} bind def/col23 {0.820 0.000 0.820 srgb} bind def/col24 {0.500 0.190 0.000 srgb} bind def/col25 {0.630 0.250 0.000 srgb} bind def/col26 {0.750 0.380 0.000 srgb} bind def/col27 {1.000 0.500 0.500 srgb} bind def/col28 {1.000 0.630 0.630 srgb} bind def/col29 {1.000 0.750 0.750 srgb} bind def/col30 {1.000 0.880 0.880 srgb} bind def/col31 {1.000 0.840 0.000 srgb} bind defendsave-17.0 540.0 translate1 -1 scale/cp {closepath} bind def/ef {eofill} bind def/gr {grestore} bind def/gs {gsave} bind def/sa {save} bind def/rs {restore} bind def/l {lineto} bind def/m {moveto} bind def/rm {rmoveto} bind def/n {newpath} bind def/s {stroke} bind def/sh {show} bind def/slc {setlinecap} bind def
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -