Rodrigoferra
asked on
Java applet runing SmartCard Reader
Hello,
First of all, sorry for my bad english, I will try my best....
I´m developping an application with Java, an Applet that read the smart card an authorize the connection throw a website.
My problem is, at the Eclipse IDE the applet works and read the smart card connected, but when I export generating a simple jar, and open it at the browser, it won´t run, even if I create a JDialog panel only to show something, below is the code I´m using.
Thanks a lot!
First of all, sorry for my bad english, I will try my best....
I´m developping an application with Java, an Applet that read the smart card an authorize the connection throw a website.
My problem is, at the Eclipse IDE the applet works and read the smart card connected, but when I export generating a simple jar, and open it at the browser, it won´t run, even if I create a JDialog panel only to show something, below is the code I´m using.
Thanks a lot!
public class SignerPje extends JApplet {
private static final long serialVersionUID = 1L;
private JTextField rows = new JTextField("3"), cols = new JTextField("3");
public void init() {
JPanel p = new JPanel();
p.setLayout(new GridLayout(2,2));
p.add(new JLabel("Rows", JLabel.CENTER));
p.add(rows);
p.add(new JLabel("Columns", JLabel.CENTER));
p.add(cols);
Container cp = getContentPane();
cp.add(p, BorderLayout.NORTH);
JButton b = new JButton("go");
cp.add(b, BorderLayout.SOUTH);
}
}
ASKER
Hello @Valeri, I did it, with this code:
The problem is, the applet is not executing, I heard something about sign the applet and then it will be able to run files from the client. Is that correct?
Thanks!
<object type="application/x-java-applet;version=1.4.1" width="500" height="500" name="pjeSignerObjects" id="pjeSignerObjects" style="position: absolute; top: -100px;">
<param name="archive" value="appTestePjeCa2.jar" />
<param name="code" value="br.com.pol.main.SignerPje" />
</object>
The problem is, the applet is not executing, I heard something about sign the applet and then it will be able to run files from the client. Is that correct?
Thanks!
you should use "applet" tag, not "object"
try this:
<applet code="br.com.pol.main.Sign erPje.clas s"
archive="appTestePjeCa2.ja r"
width="120" height="120">
</applet>
try this:
<applet code="br.com.pol.main.Sign
archive="appTestePjeCa2.ja
width="120" height="120">
</applet>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hello, thanks again!
I think that exist some cache, because it is not runing, do you know any issue related to it?
I think that exist some cache, because it is not runing, do you know any issue related to it?
I think it's not because of cache...
If you use windows, next to the clock /at the right bottom/ of desktop should exists java icon. right click on it and open the java console. in case there are some errors you should be able ot fix them by tracing the stack traces on the console.
If you use windows, next to the clock /at the right bottom/ of desktop should exists java icon. right click on it and open the java console. in case there are some errors you should be able ot fix them by tracing the stack traces on the console.
Please follow this link:
http://journals.ecs.soton.ac.uk/java/tutorial/getStarted/applet/running.html