This content has been marked as final. Show 5 replies
jschell wrote:I tend to believe it's a Java on the Mac bug, but another workaround would be as follows:
You can however, via the standard Java API, extract a file from a jar file yourself.
If you wrote that code then it should work on all three OSes.
Take the URL and, if running on the Mac (this can be found using System.getProperty),
try to play with the file:etc portion by adding some slashes after "file:". In the past, I had this
kind of problems with file URL-s on other platforms.
As an experiment, take the "file:etc" portion only and try it in the browser. Does it work?
Add slashes. Does it work? You get the idea.
Thanks, but rather than beating my head any more against this problem, I decided to resort to a different approach. I modified our Mac installer to just deploy all files that might be required, then in code I delete the ones we don't need on first run (as opposed to the old approach of programmatically extracting just the file(s) that are required out of our jar and writing them out on first run). This is somewhat less elegant and involves more file operations but it works just fine and therefore allows me to focus on more important problems, like getting this thing to run on Solaris. :)