java - Illegal Argument Exception- name -



java - Illegal Argument Exception- name -

i have searched past few days solution problem , beating head against wall. i'm knew programming in java bear me.

i trying implement java applet html page of mine school project. applet runs fine in eclipse using appletviewer, in web browser in programme called bluish jay. have exported programme jar file in same directory html page, , added necessary code html file, whenever run html file applet gives me "illegal argument exception: name" error. details of error include phrase "java.net.malformedurlexception:unknown protocol:e."

this relevant code html file:

class="lang-html prettyprint-override"><applet code="movingboxes.class" archive="e:\websystems\webpages\animations.jar" width="350" height="350" >animation of moving boxes</applet>

when error occurs phrase within of applet tags not displayed either if significant. have tried exporting other applets see if work , have received same error every time. i'm destination file correct, because when alter destination name wrong "class not found" error occurs instead.

and in off chance error in applet, here applet code.

package thebig; import java.awt.*; public class movingboxes extends java.applet.applet implements runnable { thread runner; int size = 15; int x_value = 200; int y_value = 175; int rndm_x; int rndm_y; int move = 1; int cntr = 0; image dbimage; graphics dbg; int x_value2 = 240; int y_value2 = 250; int rndm_x2; int rndm_y2; public void start() { if (runner == null) { runner = new thread(this); runner.start(); } } public void stop() { if (runner != null) { runner.stop(); runner = null; } } public void run() { setbackground(color.white); while (true) { rndm_x = (int)(math.random()*10+1); rndm_y = (int)(math.random()*10+1); if (rndm_x > 5) x_value += move; else x_value -= move; if (rndm_y > 5) y_value = 50; else y_value = 50; rndm_x2 = (int)(math.random()*10+1); rndm_y2 = (int)(math.random()*10+1); if (rndm_x2 > 5) x_value2 += move; else x_value2 -= move; if (rndm_y2 > 5) y_value2 = 50; else y_value2 = 50; if (x_value + size > x_value2) { cntr = 50; } while(cntr > 0) { cntr --; x_value --; x_value2 ++; repaint(); seek { thread.sleep(25); } grab (interruptedexception e) { } } repaint(); seek { thread.sleep(25); } grab (interruptedexception e) { } } } public void update(graphics g) { dbimage = createimage(getwidth(),getheight()); dbg = dbimage.getgraphics(); paint(dbg); g.drawimage(dbimage,0,0,this); } public void paint(graphics g) { g.setcolor(color.red); g.drawrect(x_value, y_value, size, size); g.fillrect(x_value, y_value, size, size); g.setcolor(color.blue); g.drawrect(x_value2, y_value2, size, size); g.fillrect(x_value2, y_value2, size, size); } } `

like said, have searched everywhere reply , come empty handed. help can offer me appreciated.

maybe typo missing " after .jar in html code.

if doesn't help, maybe archive should url, not file path. can seek this:

<applet code="movingboxes.class" archive="file:/e:/websystems/webpages/animations.jar" width="350" height="350" >animation of moving boxes</applet>

java html applet illegalargumentexception

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -