Results 1 to 5 of 5
  1. #1
    confusedgirl is offline Member
    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    0

    Exclamation executable jar file won't run in browser. :-(

    Hello,

    I am very new to Java and am hoping there's a quick simple fix for my problem.

    I have managed to create a signed executable .jar file for my application, and it works fine using 'java -jar myapp.jar' or by double clicking the .jar file in explorer.

    I need to embed this .jar as an an applet but no matter what I do it doesn't run, I get the notification to ask me if I trust it, but it doesn't run.

    Can anybody help a confused one?

    Leaha

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: executable jar file won't run in browser. :-(

    It's hard to know what's wrong without seeing pertinent code, but there's a big difference between GUI code that runs as a stand alone program vs an applet. Has your code been written from the get-go to behave as an applet? Does its main class extend JApplet? Does it have an init() method that makes sense?

  3. #3
    confusedgirl is offline Member
    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    0

    Default Re: executable jar file won't run in browser. :-(

    I have modified some code I found on the web. It really does work well outside the browser but I am unsure whether it was written as an applet originally.

    I can send you it if it helps, I am fairly sure it's something really simple, and I just don't know what it is.

    L

  4. #4
    confusedgirl is offline Member
    Join Date
    Feb 2013
    Posts
    4
    Rep Power
    0

    Default Re: executable jar file won't run in browser. :-(

    PS there's no GUI, it jst makes a connection back to a listening server and spits a cmd prompt. It's for a demo on 'what not to do' for my clients when accepting things they are unsure of over the internet for my client.

  5. #5
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default Re: executable jar file won't run in browser. :-(

    Quote Originally Posted by confusedgirl View Post
    PS there's no GUI, it jst makes a connection back to a listening server and spits a cmd prompt. It's for a demo on 'what not to do' for my clients when accepting things they are unsure of over the internet for my client.
    This makes no sense since applets by their very nature are GUI's. Also most of us prefer not to work with "borrowed" code, but rather with your code that you've created from scratch, preferably a small compilable and runnable program that demonstrates your problem, an SSCCE.

Similar Threads

  1. Executing a executable .jar file
    By angrylolrus in forum New To Java
    Replies: 3
    Last Post: 11-26-2012, 06:00 AM
  2. create windows executable using executable jar file
    By sarwar1234 in forum New To Java
    Replies: 2
    Last Post: 02-07-2011, 08:29 PM
  3. Executable jar file
    By franklyn@bellsouth.net in forum New To Java
    Replies: 12
    Last Post: 08-26-2010, 01:03 PM
  4. Executable File.
    By BeeGee in forum Advanced Java
    Replies: 13
    Last Post: 05-25-2010, 12:35 PM
  5. Exporting to a executable JAR file
    By Drun in forum Eclipse
    Replies: 4
    Last Post: 03-27-2010, 03:16 PM

Posting Permissions

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