R
Rhino
I have a Java project that runs just fine in Eclipse 3.5.1 using the "Run as
Java application" option. However, when I execute the same program via an
Ant script, I get a java.io.IOException. The error message says "Couldn't
get lock for [the name I specified for my log file]. Looking at the Java
code, the problem exists in FileHandler.class, specifically in this
constructor:
public FileHandler(String pattern, int limit, int count, boolean append)
This is the code that is crashing:
int unique = -1;
for (;
{
unique++;
if (unique > MAX_LOCKS) {
throw new IOException("Couldn't get lock for " + pattern);
}
It appears that I am exceeding MAX_LOCKS but I'm not sure what value
MAX_LOCKS has, why I'd be exceeding that value, or how to prevent it from
exceeding it.
Any idea why I'd get this behaviour in Ant but not when I run the program
with the "Run as Java application" option?
For what it's worth, I ran this program successfully via Ant many times in
previous versions of Eclipse, like 3.0.2. Have I found a bug in Eclipse
3.5.1?
Java application" option. However, when I execute the same program via an
Ant script, I get a java.io.IOException. The error message says "Couldn't
get lock for [the name I specified for my log file]. Looking at the Java
code, the problem exists in FileHandler.class, specifically in this
constructor:
public FileHandler(String pattern, int limit, int count, boolean append)
This is the code that is crashing:
int unique = -1;
for (;
unique++;
if (unique > MAX_LOCKS) {
throw new IOException("Couldn't get lock for " + pattern);
}
It appears that I am exceeding MAX_LOCKS but I'm not sure what value
MAX_LOCKS has, why I'd be exceeding that value, or how to prevent it from
exceeding it.
Any idea why I'd get this behaviour in Ant but not when I run the program
with the "Run as Java application" option?
For what it's worth, I ran this program successfully via Ant many times in
previous versions of Eclipse, like 3.0.2. Have I found a bug in Eclipse
3.5.1?