I have a toString() method that is returning a “/” at the beginning of the String, which is a filepath. this is seriously screwing up my program because it’s not able to read the resource with that “/” in front:
public String toString() {
return this.value;
}
Any help would be greatly appreciated,
Edit:
Here’s the constant:
DELEGATE_JNDI_NAME("java:/comp/env/jndi/delegates"),
I’m guessing you’re trying to pass the
"java:/comp/emv/jndi/delegates"as an argument to yourtoString()method. I don’t see any leading /’s, but if you do get one, use this method to remove it…