473,394 Members | 1,750 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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?
Apr 7 '08 #1
6 1462
I forgot to mention, this whole ordeal is on Vista.
Apr 7 '08 #2
BigDaddyLH
1,216 Expert 1GB
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?
Apr 7 '08 #3
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?
Apr 8 '08 #4
FileNotFound, btw, is being thrown because of an access denied error. This is why I need to run as admin.
Apr 8 '08 #5
Oh, same thing happens when I run as shortcut. When admin doesn't work, regular works but with FNF exceptions for writes only.
Apr 8 '08 #6
i've since found out that this is only a problem on the machine I program on. Thanks anyway!
Apr 8 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
0
by: doli | last post by:
Hi, I have the following piece of code which iterates through the potential errors: i =0 For Each error_item in myConn.Errors DTSPackageLog.WriteStringToLog myConn.Errors(i).Description...
4
by: johnb41 | last post by:
I have a form with a bunch of textboxes. Each text box gets validated with the ErrorProvider. I want the form to process something ONLY when all the textboxes are valid. I found a solution,...
13
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
8
by: ImOk | last post by:
I just have a question about trapping and retrying errors especially file locking or database locks or duplicate key errors. Is there a way after you trap an error to retry the same line that...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.