Menu

jar file will not run at dos prompt

Anonymous
2010-07-07
2013-04-09
  • Anonymous

    Anonymous - 2010-07-07

    I have completed the Java Beginner Tutorials. They are excellent. Thank you very much.

    Everything worked (almost). all the test programs and everything.

    The export jar file is very interesting to me and I can see many uses for a java program that
    can run at the dos prompt.

    I cannot get the mylibrary.jar file to run.

    I at the dos window, I navigate to the directory that holds the jar file.
    "java -jar mylibrary" produces this error: "Unable to access jarfile mylibrary"
    I get the same results when I include the complete path… i.e. C:\Prg\java\TotalBeginners\mylibrary.jar

    I can list the jar file with "dir *.jar". the size is 129,928 bytes
    "type mylibrary.jar" produces lots of non-readable stuff on the screen, but it works.

    "java -version" produces:
    java version "1.6.0_20"
    Java(TM) SE Runtime environment (build 1.6.0_20-b02)
    Java HotSpot(TM) client VM (build 16.3-b01, mixed mode, sharing)

    I would appreciate any suggestions on how to correct this problem.

    thank you, John Brown

     
  • Mark Dexter

    Mark Dexter - 2010-07-07

    Hi John. That is indeed mysterious. If you have access to another computer, you could try running the mylibrary.jar file on a different computer to see if the problem is with your jar file or your Java setup. Or you could try downloading a jar file from somewhere to see if it works on your computer.  Good luck. Mark

     

Log in to post a comment.