I am trying to set a cookie inside an applet, I am able to do this if I am using a single class that is called directly from the HTML code.

However, now I am trying to access the users hard drive, to let them pick a file for upload, however when I do this, I cannot use the cookies, I get the error saying
Java Code:
Exception in thread "AWT-EventQueue-3" netscape.javascript.JSException
	at netscape.javascript.JSObject.getWindow(Unknown Source)
	at FileUploader.actionPerformed(FileUploader.java:46)
	at java.awt.Button.processActionEvent(Unknown Source)
	at java.awt.Button.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
my step by step approach was:

create two classes, one is the applet called FileUploader, the other is a JPanel called FinalPanel, this panel is then added to the applet and later.

I have one button on the applet called write cookie which is to set the cookie. it worked perfectly fine before but ever since I jarred and signed the jar I started to get that error.

does anyone know any workarounds?

Thanks,
Damoun.H.