Jump to content

Recommended Posts

Posted

Afternoon everyone,

 

Having some trouble with a java applet at our school. We have a clock applet that the students must embed into a webpage. We received the applet from the moderators. Within the folder we received was a notepad file containing the relevant code to enter for the applet. The code is as follows;

 

 

When we view the website in IE we get the following error message:

 

NullPointerException

 

With the error code of;

 

java.net.MalformedURLException: no protocol: clock.jpg

at java.net.URL.(Unknown Source)

at java.net.URL.(Unknown Source)

at com.sun.deploy.uitoolkit.impl.awt.AWTDefaultPreloader$GrayBoxPainterStarter.run(Unknown Source)

0

Java Plug-in 10.45.2.18

Using JRE version 1.7.0_45-b18 Java HotSpot™ Client VM

User home directory = C:\Users\

----------------------------------------------------

c: clear console window

f: finalize objects on finalization queue

g: garbage collect

h: display this help message

l: dump classloader list

m: print memory usage

o: trigger logging

q: hide console

r: reload policy configuration

s: dump system and deployment properties

t: dump thread list

v: dump thread stack

x: clear classloader cache

0-5: set trace level to

----------------------------------------------------

 

We've tried everything we can think of, but none of us in our department are web design/java script experts. We've tested this applet on several machines and we've only managed to get it to work on one HP machine in our workshop so we don't think it's a problem with the applet we received. We think it's security settings somewhere. It just seems strange that it works on one HP and yet fails one the other HP machines under every account (staff, pupil, tech) which are the exact same model and image as the one machine we've managed to get it working on.

 

Does anyone have any ideas?

 

Thanks

 

Rich

Posted

I've downloaded your files and it all runs fine for me here on both Chrome and IE8.

 

From your stack trace - java.net.MalformedURLException: no protocol: clock.jpg - it looks like the argument to the URL constructor is only the file name rather than the absolute URL but I have no clue why this is happening for you and not for me, sorry.

 

Complete shot in the dark but try removing the space form the 'Candidate A' directory name and see if that makes any difference..

Posted (edited)

What version of Java are you running?

 

I know in school I've stuck to Java 6 Update 43, at home when I try to open your pages I get an error that Java Security is blocking the applet and that is using Java 7 Update 45.

 

As you've got it working on one machine, does that machine have an older version of Java installed on it?

 

(We have a similar applet, our code uses clock.gif however, not that that will make any difference)

 

Edit: I can see your using Java 7 Update 45, be very interesting to see what version that workshop machine has on it. You could also try installing either an older version of Java 7 or the last version of Java 6 and see if that helps?

Edited by Cache
  • Thanks 1
Posted

The workshop PC was running v6, whilst the rest appear to be on v7.

 

I dropped my machine back down to v6 and it worked a treat. However, I don't see dropping the machines down to v6 as a solution as surely this will create some compatibility issues with certain software/apps that are requiring v7? I'm of the understanding that v7 has been installed since at least September.

 

 

I could be a mile away from being accurate though as I'm afraid my java knowledge is rather limited...

 

I've tried using an older version of 7 and it still errors out, but it works on any version of 6.

 

Our applet used to be .gif but the teachers changed it to .jpg for whatever reason.

 

Any recommendations on where to go from here?

Posted

I don't know sorry, all I can come up with is downgrading to Java 6, otherwise I would try contacting the Exam board and saying your using Java 7 and this doesn't work, what do they want you to do.

 

It must be something to do with the coding of the applet.

Posted

I agree. I think it's the coding. From what somebody else has told me, the code is calling for Java version 6, which is why v7 is seeing it as untrusted and blocking it.

 

We're going to get in touch with the moderators to see if they can send us the applets a couple of days early to test whether they'll work on v7 or whether we'll need to downgrade to v6.

 

Thanks to all who've contributed.

Posted
Assuming we're the same exam board and your talking about the practical exam, the resources for it should be available from 6 January. :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...