BAT errors

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • blackraven1425
    New Member
    • Mar 2008
    • 27

    #1

    BAT errors

    I created a JAR file with an application I'm trying to run. However, I'm using a BAT file to run the JAR, and when I do, the JAR is giving FileNotFound exceptions where it should be writing the files. I've tried running the BAT as administrator, but it just doesn't run. Any ideas?
  • blackraven1425
    New Member
    • Mar 2008
    • 27

    #2
    I forgot to mention, this whole ordeal is on Vista.

    Comment

    • BigDaddyLH
      Recognized Expert Top Contributor
      • Dec 2007
      • 1216

      #3
      Originally posted by blackraven1425
      I created a JAR file with an application I'm trying to run. However, I'm using a BAT file to run the JAR, and when I do, the JAR is giving FileNotFound exceptions where it should be writing the files. I've tried running the BAT as administrator, but it just doesn't run. Any ideas?
      It works when you manully run it from the command line?

      java -jar yourapp.jar

      When you try to write a file are you using a relative path or an absolute path? Did you check first to see if the directory you wish to write to exists?

      Comment

      • blackraven1425
        New Member
        • Mar 2008
        • 27

        #4
        Yes, it works when I run it from the command line as administrator. I'm using absolute paths. The directory exists, for now it's in the root of C. Might it be a problem with running the BAT file as an administrator?

        Comment

        • blackraven1425
          New Member
          • Mar 2008
          • 27

          #5
          FileNotFound, btw, is being thrown because of an access denied error. This is why I need to run as admin.

          Comment

          • blackraven1425
            New Member
            • Mar 2008
            • 27

            #6
            Oh, same thing happens when I run as shortcut. When admin doesn't work, regular works but with FNF exceptions for writes only.

            Comment

            • blackraven1425
              New Member
              • Mar 2008
              • 27

              #7
              i've since found out that this is only a problem on the machine I program on. Thanks anyway!

              Comment

              Working...