Sezemsky Petr <[EMAIL PROTECTED]> writes:
> [1 <text/plain; US-ASCII (7bit)>]
> I have the problem with large array on JVMs on Debian 2.0 on
> Pentium 200 MMX, 32 MB RAM.
> Netscape Communicator 4.5 writes: Applet Sorttest can't start: ERROR,
> appletviwer from JDK 1.1.6 writes the message below.
>
> pctest:/home/sezemsky/Javatest# javac Sorttest.java
> pctest:/home/sezemsky/Javatest# appletviewer sorttest.html
> java.lang.VerifyError
> at Sorttest.init(Sorttest.java:41)
> at sun.applet.AppletPanel.run(AppletPanel.java:287)
> at java.lang.Thread.run(Thread.java)
>
> This problem appears with array greater than 8500 elements
> (8000 is OK). On other architectures (Sun Solaris, Win 98, Win NT)
> the applet operates well on any JVM.
>
Netscape 4.5 says:
Verifier error Sort.<clinit>()V: Code of a method longer than 65535 bytes
and
$ javaverify Sort
Class Sort fails
That means the array initialization is done in a class initializer and
the size of that method is to big (see
http://www.javasoft.com/docs/books/vmspec/html/ClassFile.doc.html#6253).
Even if it works for with 'appletviewer sorttest.html' (it works
for me on linux), it will *never* work with
'appletviewer http://somehost/somepath/sorttest.html' because the
verifier will check classes loaded over the network.
If you want the verifier to check local code you have to
use the -verify option (i.e. 'appletviewer -J-verify sorttest.html').
Jürgen
--
Juergen Kreileder, Universitaet Dortmund, Lehrstuhl Informatik V
Baroper Strasse 301, D-44221 Dortmund, Germany
Phone: ++49 231/755-5806, Fax: ++49 231/755-5802