• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to run java applet on web Browser?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
I'm trying to run my applet about 5 days on web browser and i can't...

1.
I created Main class like: public class Main extends JApplet implements ActionListener,MouseListener{
and after that class, is functions like public void init()

cr is class...
change_cursor is function in cr class....
CreateGUI(); is function who running my code...
2.
I created about 5 class, and in class I'm doing like that: public class Sounds{....
3.
i grant all permisions to my applet
grant {
permission java.security.AllPermission;
};
4.
My html code:

5.
In cmd I do like:
jar cvf SignedApplet.jar Main.class
keytool -genkey -alias registr -keystore jetforewer -keypass k124565 -dname "cn=jonas" -storepass ab987c
jarsigner -keystore jetforewer -storepass ab987c -keypass k124565 -signedjar SSignedApplet.jar SignedApplet.jar registr
keytool -export -keystore jetforewer -storepass ab987c -alias registr -file Jet.cer
keytool -import -alias jetf -file Jet.cer -keystore rayst -storepass abcdefgh

P.S I don't know if I need use keys or not... I'm dont know what to make, to run my applet on web Browser..
I read many informacion on websites....
and problem is that i cann't open my applet in web... On Eclipse is running good...
hot to run java applet on web browser? please explain me in detail if you can
Sorry for my bad english language...
I'm newbie in java programming language
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

and problem is that i cann't open my applet in web


What does this mean? What, exactly, are you doing, and what, exactly, is happening as a result? Also, check the Java Console for any error messages.

By the way, if the applet is signed, you do not need to alter permissions - both accomplish the same thing.
 
Martynas jet
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When i open my html file, I get message :
java.lang.reflect.InvocationTargerException
and when I press Details:
CacheEntry[file:/C:/Users/Jet/workspace/Zaidimas/bin/SSSignedApplet.jar]: updateAvailable=false,lastModified=Fri Jan 31 13:50:46 EET 2014,length=6367
Missing Application-Name manifest attribute for: file:/C:/Users/Jet/workspace/Zaidimas/bin/SSSignedApplet.jar
Missing Permissions manifest attribute in main jar: file:/C:/Users/Jet/workspace/Zaidimas/bin/SSSignedApplet.jar

Maybe I need somehow run java.policy.applet in eclipse when applet started without any keys...?
but when i use html code like:

and when I open website it shows me that cannot read pictures, but I grant all permisions...
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic