Page 1 of 3 123 LastLast
Results 1 to 20 of 47
  1. #1
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default can't open a .jar file

    hi everyone.
    i have a .jar file that is a application for the pc, but when i doubleclick on it a DOS environment (or somethig like that) opens and so suddenly closes again (reaaally fast) and then nothing happen, but i catched the error and here it is



    Please help me!! thanks.

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    How did you run this JAR file? Can you show me the command? More importantly are you sure that you are in tight folder path?

  3. #3
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    I just doubleclick on the .jar file.. and that message shows up and then disappear so quickly and nothing happens..
    it currently opens with Java(TM) Platform SE binary

    pd: i got the last version of java and idk what the problem may be.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    I don't think it's related with the version you've install, something wrong with the JAR itself may be.

    Can you try to open it from the command prompt, and see what happens?

  5. #5
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    the same thing :(

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  7. #7
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    yes. here's the program I'm trying to open.. It's just a 2.9mb file
    Tracker Video Analysis and Modeling Tool
    if you wanna download it to see it

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    It works fine, can you show the command you've use in command prompt to start it. And also what's the JDK version you've installed in your PC?

  9. #9
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    in the command prompt I used this
    java -jar C:\Documents and Settings\HOME\Mis documentos\Descargas\tracker.jar

    which gives the same result than doubleclicking on the file..
    I use Version 6 Update 21 (the last one, just downloaded it today, and restarted my pc and stuff)

  10. #10
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    can the .jar file be transformed into another? specifically into an .exe file

  11. #11
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Did you setup the classpath. Just type javac on your command prompt and let me know what's really happened.

  12. #12
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by demichelis89 View Post
    can the .jar file be transformed into another? specifically into an .exe file
    There is no way to convert JAR file in to executable. Using third party tools you can create an executable by using the *.class files.

  13. #13
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    just "javac"?? It says: Windows cannot find the archive 'javac'. Make sure you write the path correctly....."
    It may not be exactly what it says in English because I have it in Spanish..

  14. #14
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Okay, that's fine. So the classpath is not set properly. First of all I'll help you to just run the JAR file, and after that I'll explain to you about the classpath. I think it make sense to you.

    Can you tell me the JDK installation path, may be it is in C:\Program Files\Java\JDK 1.6 or something like that. Find it and tell me it.

  15. #15
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    ok it's here C:\Archivos de programa\Java\jre6

    the java.exe file (idk if you need it) is here C:\Archivos de programa\Java\jre6\bin

  16. #16
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

  17. #17
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    mmm... in the folder Java is only the folder jre6

  18. #18
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

    Default

    idk if that means that i have only JRE installed

  19. #19
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Ok, hope you know the controlling on command prompt. Change the working path to the folder where you've JAR file is located. Then type the following command on the command prompt.

    path=C:\Archivos de programa\Java\jre6\bin

    Then type the following

    java -jar tracker.jar

  20. #20
    demichelis89 is offline Member
    Join Date
    Aug 2010
    Posts
    19
    Rep Power
    0

Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 03-05-2010, 04:21 AM
  2. Different Files Open in File -> Open Workspace
    By mgm2010 in forum JCreator
    Replies: 0
    Last Post: 04-11-2009, 02:14 PM
  3. Open File
    By JavaLerner in forum SWT / JFace
    Replies: 5
    Last Post: 07-12-2008, 06:41 PM
  4. To open an image file such as Jpeg file using JAva Program
    By itmani2020 in forum Advanced Java
    Replies: 10
    Last Post: 07-11-2008, 09:57 AM
  5. Is it possible to open a txt file?
    By jason27131 in forum New To Java
    Replies: 20
    Last Post: 08-07-2007, 01:24 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
  •