Hello,
I am trying to define a byte array in a method.My problem is that the byte array is very large and i get the following exception at run time, the code compiles easily.
-------------------------------------------
Exception in thread "main" java.lang.ClassFormatError: CreateSoundBuffer (Code o
f a method longer than 65535 bytes)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
Press any key to continue . . .
------------------
One solution i figured was to break the array into two,in which case the size is accomodated.But i want to define the whole array in one go..is there a way i can specify "no size limit" for the method? Can any different Class Loader be defined which can override the length constraints?
I would like a reply soon please.
Thanks in advance,
Sonali.
I am trying to define a byte array in a method.My problem is that the byte array is very large and i get the following exception at run time, the code compiles easily.
-------------------------------------------
Exception in thread "main" java.lang.ClassFormatError: CreateSoundBuffer (Code o
f a method longer than 65535 bytes)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:11
1)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
Press any key to continue . . .
------------------
One solution i figured was to break the array into two,in which case the size is accomodated.But i want to define the whole array in one go..is there a way i can specify "no size limit" for the method? Can any different Class Loader be defined which can override the length constraints?
I would like a reply soon please.
Thanks in advance,
Sonali.