Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

pintsizemacman

macrumors regular
Original poster
Sep 26, 2010
100
0
ohio
So I'm not really the one organizing and coding this add-on.

The one coding the Mac version of the add-on is doing it in Java.
I'm trying to test out this, close to final, version of the add-on, but I get an error that is yet to be resolved. I need fast help or any help would be appreciated!

Mac OS X 10.7.3 Java SE 6

Error:

Code:
Error : java.io.FileNotFoundException: null/addon/debug/debug.log (No such file or directory)

I Hit OK* and Window reappears x3

Then: The java JAR file "Addon_Client.jar" could not be launched window.

Please help me :confused:
 
Last edited:
Show the error to the person doing the coding. To me, it doesn't look like something you can correct without further instructions from them. Frankly, it looks like a bug in the code.

And I don't think kryten2's suggestion will fix it, because the problem is that "null" is being used as a directory name.

Code:
Error : java.io.FileNotFoundException: [COLOR="Red"]null[/COLOR]/.jffaddon/debug/debug.log (No such file or directory)


If I had to guess, I'd say the code is doing something vaguely similar to this:
Code:
String someDir = somethingThatReturnsADirname();
String hopefulPath = "" + someDir + "/.jffaddon/debug/debug.log";
SomeKindOfOutputStream out = new FileOutputStream( hopefulPath );
The bug lies in how hopefulPath is assembled. By starting with "" and then appending, if someDir is null you'll get the actual string "null" in the result, and there won't be any NullPointerException. If it was done like this:
Code:
String hopefulPath = someDir + "/.jffaddon/debug/debug.log";
then there would be a NullPointerException instead of a string with literal "null" in it.

However it does it, the code eventually ends up with this string:
Code:
null/.jffaddon/debug/debug.log
which it then tries to open for output (possibly for input, but that'd be abnormal for a log file). Because there's no directory actually named "null", the attempt to open the file fails.


Perhaps somethingThatReturnsADirname() is trying to read a system property, and you've failed to define that property. Or you think you've defined it but somehow made a mistake.

Without seeing the actual code, and knowing what it does and what it expects, I don't see how anyone here can give a definitive answer or solution. You need to talk to the code's author, show them the error message, and explain exactly what you did.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.