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?
BAT errors
Collapse
X
-
Tags: None
-
-
It works when you manully run it from the command line?Originally posted by blackraven1425I 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?
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
-
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
-
FileNotFound, btw, is being thrown because of an access denied error. This is why I need to run as admin.Comment
-
Oh, same thing happens when I run as shortcut. When admin doesn't work, regular works but with FNF exceptions for writes only.Comment
-
Comment
Comment