[2495] in java-interest
Classloaders again.
daemon@ATHENA.MIT.EDU (Chanda Dharap)
Tue Oct 3 16:15:54 1995
Date: Tue, 3 Oct 95 09:50:01 PDT
From: chanda@PRPA.Philips.COM (Chanda Dharap)
To: java-interest@java.sun.com
HI ..
After going through Chuck's detailed response i thought i could
manage.
... however....
If anyone has experience with definig their own ClassLoaders can they
shed some light ? I probably should directly ask one of the java
guru's .. but i'm beginning to feel guilty !!!
the loadClass I defined seems to read all the correct bytes as they
are equal to the size of the .class file
Its not able to "defineClass()" as this is what happens:
-------------------------------------------------------------
In loadClass: before loading from InputSTream
In reading from file
bytes length 4096 Total 0 n is 478
before defineClass()
java.lang.IOException java.lang.Object.class
at java.io.FileInputStream.<init>(FileInputStream.java)
at FileClassLoader.loadClass(FileClassLoader.java:73)
at FileClassLoader.loadClass(FileClassLoader.java:42)
at FileClassLoader.loadClass(FileClassLoader.java:76)
at FileClassLoader.main(FileClassLoader.java:98)
> ls -l foo.class
-rw-r----- 1 chanda 478 Oct 3 09:37 foo.class
---------------------------------------------------------------
If anyone thinks they can do better with reading my code I'll mail it.
any help appreciated..
- chanda
-
Note to Sun employees: this is an EXTERNAL mailing list!
Info: send 'help' to java-interest-request@java.sun.com