Results 21 to 30 of 30
- 10-04-2010, 02:04 PM #21
Member
- Join Date
- Sep 2010
- Posts
- 56
- Rep Power
- 0
Hello,
Its the window that warns me about the security things as I double click on the html file to open it in a browser....
But it is basically the same thing... The applet when called in html file that open in a browser, restrict the applet to access the system files....
Can the problem be solved by importing some security libraries in the applet...or any idea...
Many Thanks...
Regards
- 10-04-2010, 02:12 PM #22
That sounds like an OS window, not part of java. I don't know how the OS gets involved.the window that warns me about the security things as I double click on the html file
Or is it from the browser? Have you signed the jar file for the applet?
Can you screen print it and post the image?
- 10-04-2010, 02:27 PM #23
Member
- Join Date
- Sep 2010
- Posts
- 56
- Rep Power
- 0
Hello...
I dont know what you mean by "sign the jar file for applet"....
The folder in which I have put all the files is on the desktop... and the snap shot is attched.....
Note that I have added many files... that relates to the project... But all of them might not be neccessary....
- 10-04-2010, 02:34 PM #24
Sorry, I don't know what I'm supposed to see in the image you posted.
Where is "the window that warns me about the security things"?
- 10-04-2010, 02:36 PM #25
Member
- Join Date
- Sep 2010
- Posts
- 56
- Rep Power
- 0
here is the scrren shot again...
Thanks
- 10-04-2010, 02:40 PM #26
Member
- Join Date
- Sep 2010
- Posts
- 56
- Rep Power
- 0
Ah Sorry....
here is the screen shot of the window that apperas when i open the html...7
Thanks
- 10-04-2010, 04:03 PM #27
I don't know where that error window comes from. I don't remember seeing it before.
The message says: "The application contains both signed and unsigned code"
That must refer to the other jar files you are using that have signed code. Your class is the unsigned part.
What OS are you on?
I'm on WinXP. I use the .java.policy file on my system to give some of my applets permission to read files from other folders. There was a bit of trial and error to get it setup and working. The annoying part is that I don't know how to determine if the JVM is using a particular .java.policy file. Hence the trial and error part. Changing the file's contents and location.
Write a small standalone applet that tries to read a file in another directory. Keep changing the policy file contents and location until the applet is able to read the file.
- 10-05-2010, 10:59 PM #28
Member
- Join Date
- Sep 2010
- Posts
- 56
- Rep Power
- 0
Hi Norm,
I am using windows vista....
I found that policy file which is at the location
C:\Program files\ Java\ jre6\lib\security\
Then I pasted that all permission code file there... and it worked....
Many Thanks...
But now when i run the applet, the browse button allows me to laod the file.... But when I press the process button, no charts appers... nothing happens further.... and the console window shows this:
Java Code:Java Plug-in 1.6.0_20 Using JRE version 1.6.0_20-b02 Java HotSpot(TM) Client VM User home directory = C:\Users\Logic Energy ---------------------------------------------------- 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 <n> ---------------------------------------------------- Exception in thread "AWT-EventQueue-2" java.lang.NullPointerException at OptionPanel$2.actionPerformed(OptionPanel.java:158) at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) at javax.swing.DefaultButtonModel.setPressed(Unknown Source) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.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)
Any idea, why it is happening....
Many Thanks for cooperation....
- 10-05-2010, 11:23 PM #29
Is that your class? What variable at line 158 is null?OptionPanel.java:158)
Which policy file? The one in the JRE's folders is NOT the .java.policy file entended for user policies.I found that policy file which is at the location
If you update JRE then the changes you have made to the java.policy file could be replaced with new files.
Better to update the .java.policy file.
Also giving applets all permissions means any applet from anywhere can do anything to you PCs files.Last edited by Norm; 10-05-2010 at 11:28 PM.
- 10-06-2010, 07:49 AM #30
Member
- Join Date
- Oct 2010
- Posts
- 7
- Rep Power
- 0
Normal (unsigned) applets are just not allowed to access the file system of the client. They can only talk with the server where they are loaded from. There are no any direct workarounds: this is a security feature and workarounds would be closed as security holes when discovered!
If your applet needs to process some input, one of the approaches would be to have a text field where the user can enter the input directly. If it is absolutely required to access the file system, signed applet needs to be used but these are expensive to have.
Similar Threads
-
Putting Applet on web with images
By Peetahzee in forum New To JavaReplies: 1Last Post: 04-18-2010, 08:35 PM -
Putting image into program
By SprayAndPray69 in forum Java AppletsReplies: 1Last Post: 02-21-2009, 03:38 AM -
Putting Image into Java applet
By SprayAndPray69 in forum New To JavaReplies: 1Last Post: 02-13-2009, 06:14 AM -
Need help putting Exceptions in my program.
By Loop in forum New To JavaReplies: 6Last Post: 10-13-2008, 11:48 PM -
print webpage through applet
By shakti singh in forum Java AppletsReplies: 1Last Post: 07-22-2008, 07:17 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks