Avatar billede fredand Forsker
16. oktober 2003 - 10:02 Der er 5 kommentarer og
1 løsning

Problems running Applet

Hello!
I have some problems with my Appltes in InternetExplorer 6.0.

When I use Suns plugin everything works fine, but when I deactivate suns plugin and use Microsofts VM I always get this error. It doesn't matter if it is in a jar file or not:

Microsoft (R) VM for Java, 5.0 Release 5.0.0.3810
==============================================
?  hjäp
c  rensa
f  kör slutförare
g  samla in skräp
m  minnesanvändning
q  avsluta
t  lista trådar
==============================================
Error loading class: MyApplet5a
java.lang.NoClassDefFoundError
java.lang.ClassNotFoundException: MyApplet5a
    at com/ms/vm/loader/URLClassLoader.loadClass
    at com/ms/vm/loader/URLClassLoader.loadClass
    at com/ms/applet/AppletPanel.securedClassLoad
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.processSentEvent
    at com/ms/applet/AppletPanel.run
    at java/lang/Thread.run

The APPLET-tag looks like this:
<APPLET CODE="MyApplet5a" ARCHIVE="applets.jar" WIDTH="200" HEIGHT="200"></APPLET>

So if any one know what the problem is please let me know. After all the Idea with Java is that it should be plattform independent, write once run every where.

Best regards
Fredrik
Avatar billede arne_v Ekspert
16. oktober 2003 - 10:44 #1
hav eyou compiled with:
  -target 1.1
(or the equivalent in your IDE)
?
Avatar billede fredand Forsker
16. oktober 2003 - 11:19 #2
Hello!

Nope I have not, do you mean that Microsoft VM only support 1.1.8?

And do you mean that it is possible to tell the compiler to use only Java 1.1?

...Ahha! when I look at my javac there is a -target flag so I guess that you can compile it like?
javac -target 1.1.8 MyApplet.java
...or am I wrong?

Best regards
Fredrik

BTW give me an answer so you could get the points
Avatar billede arne_v Ekspert
16. oktober 2003 - 11:33 #3
It is just -target 1.1 (no third level version).

And yes that is what I am talking about.

MS JVM is typical 1.1.4 (but I have heard about 1.0.2 and 1.1.7 as well).
Avatar billede arne_v Ekspert
16. oktober 2003 - 11:36 #4
Avatar billede fredand Forsker
16. oktober 2003 - 11:57 #5
Hello!

Ok thanks, you solved it.

Give an answer so you could get your points!

Fredrik
Avatar billede arne_v Ekspert
16. oktober 2003 - 12:00 #6
answer
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Kurser inden for grundlæggende programmering

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester