Matthieu Simon

MC9S12NE64 OpenTCP Java Applet

Discussion created by Matthieu Simon on Oct 30, 2006
Latest reply on Jan 9, 2007 by Ram Mohan Korukonda
Hello,

I'm trying to execute a Java applet (this one : http://donpichol.free.fr/applet/ ) from an OpenTCP http server embedded in the NE64 flash memory.

I can reach the "index.htm" and it's loaded well, then the java virtual machine try to load the "test.class" and it gives an error :

--------------------------------------------------------------------------------------
java.lang.RuntimeException: java.lang.NullPointerException
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.applet.AppletClassLoader.getBytes(Unknown Source)
at sun.applet.AppletClassLoader.access$100(Unknown Source)
at sun.applet.AppletClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.applet.AppletClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
...

and so on ...
--------------------------------------------------------------------------------------

If I "Save As..." the index.htm into a local directory it works well -> so, the datas aren't corrupted, the communication works and the "index.htm" and "test.class" are well "burned" into flash, http server GETs them, ...

Does someone have ever experienced this kind of problem ?

I found a demo example from http://www.softecmicro.com/forum/showthread.php?s=7df906a26a7f5f029d90f6f04e782ba1&threadid=482&goto=nextoldest
but the .jar is to big to fit in the memory with my code.

Does someone have a small working html file + .jar to try on my application ?

I'm using JRE 1.5.0_06

Regards,

Matthieu SIMON
--------------------------------------------------
CANEL - C.E.I.D.
14, rue Michel Luciani
91330 Yerres - France
Phone +33169484216
Fax +33169481420
--------------------------------------------------

Outcomes