Amit Agarwal

Ranch Hand
+ Follow
since May 09, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Amit Agarwal

Manuela, check your jar, probably it is not properly signed. Use the same key, from which the certifiacte was generated, to sign the jar.
22 years ago
u can use a freeware installer from zerog InstallAnywhere Now! which can be used to deploy your application and the jvm etc and even provide shortcuts to the client machine. It will also provide an executable wrapper for your application that is termed as a launcher.
22 years ago
the user needs to go thru two steps. first is to install the certificate, this is required just once for every machine. this is achieved by clicking on the link to the certificate and pressing the install button and follow the instructions (2-3 confirmations). once this is done, the scertificate of the signed applet can be authenticated against the installed applet.
the second step is to grant rights to the applet. when you access the applet, IE checks the certificate of the applet jar, authenticates it against the installed certificate and pops up a dialogbox where the user can grant access to the applet for a session or forever or even deny it. so according to the users choice the applet runs in a trusted environment. if the user chooses to grant rights to the applet for a session, he wil be prompted with the same dialog box when he accesses the applet the next time.
22 years ago
a jdbc connection is not permitted for untrusted applets, thus the security exception. u can make your applet trusted for achieving this. see another thread at http://www.javaranch.com/ubb/Forum23/HTML/001052.html for making your applet trusted.
22 years ago
u need to run the swing applet thru the java plugin. convert the applet tag of your htmal file using the html converter from sun micro which will load the applet in the plugin.
22 years ago
Editing your policy file is the ultimate thing to do. But, it should be specific so that only the applet you wish to be trusted should be granted the privileges, otherwise it becomes risky.
For deploying the applet to other machines, it is not actually possible to edit their policy files. here the certificate comes to the recue. the client must be given access to the certificate thru a link on the webpage. the client should install the certificate on his machine. now, when he runs the applet on his system, IE would check the signed applet against the certificate and ask him if he wishes to grant it rights. If he does, the applet gets all privileges.
22 years ago
Hi Meghna
why do you want to do something using a label when you have a button available for it? labels are not focussable components so when they cannot receive focus they cannot have a setFocusPainted() etc. please specify what actually u intend to do.
Amit
22 years ago
1. use a null layout by JFrame.getCoontentPane().setLayout(null)
2. create a JLabel with the image
3. set the bounds of the label with JLabel.setBounds(x,y,w,h)
4. add the label to the frame
22 years ago
Hi Meghna,
use Image.getScaledInstance(width,height,hints) to get a scaled instance of the image.
Amit
22 years ago
to run the applet in the IE see the thread at:
http://www.javaranch.com/ubb/Forum23/HTML/001052.html
22 years ago

Originally posted by a hui:
By using this certificate, is this another way of dealing with the security? because I just solved the problem by editing the policy file.


The policy file can help you run your applet in appletviewer, but will it help you to run it in IE?
22 years ago
Rahul, check out JAAS at java.sun.com
22 years ago
Rahul, check out JAAS at java.sun.com
22 years ago
Hi Aayush,
u will have to obfuscate your code. u can use "retro guard" which is an open source obfuscator. it is available at http://www.retrologic.com
-----------
Amit
22 years ago