Results 1 to 11 of 11
  1. #1
    distant_smile is offline Member
    Join Date
    Jan 2011
    Posts
    3
    Rep Power
    0

    Default Java running error

    Hi all. I have an issue with a Java program. I downloaded a program called Shimeji-ee.exe. It runs a small animation on your screen. I changed all the animation images to suit my needs and it all ran fine.

    I run a website and uploaded the whole folder via ftp, linked my button to shimeji-ee.exe. But when a user clicks the button it asks run/save. If you choose run I get the following error:

    Java Virtual Reader

    Unable to access jarfile

    I tried linking to the jar file instead (shimeji-ee.jar) and it gave another error messgae:

    Could not find the main class

    I am lost, as I have little understanding of Java, I hope someone can tell me where I am going wrong
    Thanks

  2. #2
    code_newbie's Avatar
    code_newbie is offline Member
    Join Date
    Nov 2010
    Posts
    11
    Rep Power
    0

    Default

    Hi,

    I'm very new to Java also so I might be totally wrong

    I think to run Java via a browser it needs to be an applet not a jar(exe)

  3. #3
    distant_smile is offline Member
    Join Date
    Jan 2011
    Posts
    3
    Rep Power
    0

    Default

    Thanks code_newbie. I don't suppose anyone knows how I accomplish this? Bear in mind I have not worked in Java before:confused:

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

    Default

    Quote Originally Posted by code_newbie View Post
    Hi,

    I'm very new to Java also so I might be totally wrong

    I think to run Java via a browser it needs to be an applet not a jar(exe)
    Yes you are totally wrong. It is fine and in fact common to run an applet from a Jar file.

  5. #5
    distant_smile is offline Member
    Join Date
    Jan 2011
    Posts
    3
    Rep Power
    0

    Default

    Does anyone know how I can get either the exe or jar file to execute on my web site?

  6. #6
    code_newbie's Avatar
    code_newbie is offline Member
    Join Date
    Nov 2010
    Posts
    11
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    Yes you are totally wrong. It is fine and in fact common to run an applet from a Jar file.
    That is why I expressed I was new...no reason to be rude

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

    Default

    Quote Originally Posted by code_newbie View Post
    That is why I expressed I was new...no reason to be rude
    I'm not being rude; I'm trying to be clear to the original poster not to follow your advice. Your being totally wrong is a statement of fact, not an insult to your character.

  8. #8
    code_newbie's Avatar
    code_newbie is offline Member
    Join Date
    Nov 2010
    Posts
    11
    Rep Power
    0

    Default

    Quote Originally Posted by Fubarable View Post
    I'm not being rude; I'm trying to be clear to the original poster not to follow your advice. Your being totally wrong is a statement of fact, not an insult to your character.
    I know you werent attacking my personal character

    Just you could have been more tactful in your response

    Example: "code_newbie and OP - you can run jar file from web"

    Since I did state I was new also

    But whatever....Guess I should have expected such a response

  9. #9
    pbrockway2 is offline Moderator
    Join Date
    Feb 2009
    Location
    New Zealand
    Posts
    4,565
    Rep Power
    12

    Default

    @OP: As noted .jar archives are the most common way of packaging java applets. However it is quite possible that the Shimeji-ee.exe executable was doing something important before invoking the java classes in the .jar archive. (Like setting the main class, but also doing other things).

    Moreover it should be noted that classes in a .jar archive designed for use as an application may very well not work as an applet. Two common areas where they differ is in how they access local resources (like images) and the sort of security rules that they follow (applets are, by design, more restricted).

    Unless you are a Java programmer (for whom this forum is intended) you may find it impossible to shift this program onto the web and have it run. In that case what you should do is talk to whoever wrote the program for advice on how to achieve what you want.

    @code_newbie: Have a read of Dealing with rudeness in the smart questions faq. At least for me, if I'm wrong I want to know about it directly, matter of factly, even bluntly. I don't want tact if that could leave even the smallest doubt in the mind of the person I misled. That's important to me because I rely on the vigilence of others as a quality control check: I'd tend to shut up if I thought others tactfulness would lead me to mislead someone asking a question.
    Last edited by pbrockway2; 01-23-2011 at 12:54 AM.

  10. #10
    code_newbie's Avatar
    code_newbie is offline Member
    Join Date
    Nov 2010
    Posts
    11
    Rep Power
    0

    Default

    Quote Originally Posted by pbrockway2;172129@code_newbie: Have a read of [URL="http://www.catb.org/~esr/faqs/smart-questions.html#keepcool"
    Dealing with rudeness[/URL] in the smart questions faq. At least for me, if I'm wrong I want to know about it directly, matter of factly, even bluntly. I don't want tact if that could leave even the smallest doubt in the mind of the person I misled. That's important to me because I rely on the vigilence of others as a quality control check: I'd tend to shut up if I thought others tactfulness would lead me to mislead someone asking a question.
    Appriciate your feedback

    BUT being rude is just being rude

    I would have understood if I had come off as "hey I know what I'm talking about and blah blah"

    Which is exactly what I didnt do...I clearly stated I was new to Java

  11. #11
    sunde887's Avatar
    sunde887 is offline Moderator
    Join Date
    Jan 2011
    Location
    Richmond, Virginia
    Posts
    3,069
    Blog Entries
    3
    Rep Power
    8

    Default

    You stated you were new to java and he corrected your incorrect advice, I don't think he was being rude, simply being clear. Had he suggest "try this instead" the op may have thought you were correct still and tried your suggestion, and wasting time.

Similar Threads

  1. Odd error when running app
    By pahiker in forum New To Java
    Replies: 5
    Last Post: 06-23-2010, 03:10 PM
  2. Replies: 0
    Last Post: 08-26-2009, 01:03 PM
  3. Error during running
    By ak88 in forum New To Java
    Replies: 7
    Last Post: 07-28-2009, 04:39 AM
  4. Error running java program using URL
    By gio123bg in forum New To Java
    Replies: 6
    Last Post: 06-30-2009, 06:26 PM
  5. error running java program
    By bdasilva in forum New To Java
    Replies: 1
    Last Post: 06-29-2009, 01:46 AM

Posting Permissions

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