Page 3 of 6 FirstFirst 12345 ... LastLast
Results 41 to 60 of 101
  1. #41
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    So how do you create it?

  2. #42
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    I used an editor.
    Then use the policytool.exe program (it's in the JDK bin folder) to update it.
    If you don't understand my response, don't ignore it, ask a question.

  3. #43
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    What's an editor? Do I just go on the location and say "new --> file" and call it java.policy? I found the policytool.exe thing though. And it says codebase so what do I right there?

  4. #44
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    What's an editor? Notepad and wordpad are editors.
    The file name starts with a .
    .java.policy
    If you don't understand my response, don't ignore it, ask a question.

  5. #45
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    Ok. I made the policy. Now what?

  6. #46
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    Add the entry I posted earlier.

    permission java.util.PropertyPermission "*", "read";

    See the tutorial:
    http://docs.oracle.com/javase/tutori...ur1/step2.html
    If you don't understand my response, don't ignore it, ask a question.

  7. #47
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    I can't write that all because there is only space for one line codebase. Maybe we are not looking at the same thing?

  8. #48
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    Look at the tutorial on how to use the policytool program.
    If you don't understand my response, don't ignore it, ask a question.

  9. #49
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    Quote Originally Posted by Norm View Post
    Look at the tutorial on how to use the policytool program.
    That's what I was just doing but it gave me java.net.MalformedURLException so I think I screwed something up in the codebase.

  10. #50
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    Usually the policytool program will catch errors.
    Edit the .java.policy file, Copy the contents and paste it here.
    If you don't understand my response, don't ignore it, ask a question.

  11. #51
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    Theres nothing there.

  12. #52
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    Where are you looking?
    Execute this to find where the Java program looks for the .java.policy file:
    System.out.println(System.getProperties() .getProperty("user.home"));

    it gave me java.net.MalformedURLException
    What is the "it" that gave the exception?
    Last edited by Norm; 03-19-2012 at 12:12 PM.
    If you don't understand my response, don't ignore it, ask a question.

  13. #53
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    I was looking at where I made it. I converted it into a txt file and the converted it back to see what it was so far.

    The thing that me the exception was the policytool.exe when I was trying to finish the program. Like I said earlier. It probably relates to not having the right URL.

  14. #54
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    I've never had a problem with policytool throwing an exception.
    If you don't understand my response, don't ignore it, ask a question.

  15. #55
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    Quote Originally Posted by Norm View Post
    I've never had a problem with policytool throwing an exception.
    Even when you tried to fail on purpose?

  16. #56
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    I haven't tried to fail.
    If you don't understand my response, don't ignore it, ask a question.

  17. #57
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    Oh ok. Anyways, does the URL:
    C:\Users\Admin\Desktop\bin\blocks.jar
    look possible to you for it to work?

  18. #58
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,396
    Rep Power
    25

    Default Re: Java Applet Not Running on html.

    C:\Users\Admin\Desktop\bin\blocks.jar
    That is not a URL, its a path. It needs a protocol to be a URL.
    If you don't understand my response, don't ignore it, ask a question.

  19. #59
    Join Date
    Mar 2012
    Posts
    54
    Rep Power
    0

    Default Re: Java Applet Not Running on html.

    So what should I change to it? Or could you give an example?

  20. #60
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,234
    Rep Power
    19

    Default Re: Java Applet Not Running on html.

    Did you try searching the net for "URL protocol"?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

Page 3 of 6 FirstFirst 12345 ... LastLast

Similar Threads

  1. java applet not running when accessed from web
    By jobud9 in forum New To Java
    Replies: 3
    Last Post: 01-22-2012, 02:03 AM
  2. Replies: 7
    Last Post: 12-18-2011, 04:13 AM
  3. Applet Running in Java not from Cmd
    By vin_eets in forum Java Applets
    Replies: 1
    Last Post: 03-29-2011, 04:08 PM
  4. Running as Java Applet in eclipse
    By atomant in forum New To Java
    Replies: 0
    Last Post: 12-05-2010, 02:22 AM
  5. Java Applet Not Running
    By kahaj in forum Java Applets
    Replies: 4
    Last Post: 10-08-2009, 12:11 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •