1

I've some code that ultimately calls Font.createFont. It works fine on server (centos something...) but on my Ubuntu box it dies because of this call that is inside Font.createFont

final File tFile = AccessController.doPrivileged(
                new PrivilegedExceptionAction<File>() {
                    public File run() throws IOException {
                        return sun.misc.IOUtils.createTempFile("+~JF", ".tmp", null);
                    }
                }
            );

My /tmp dir is readable/writable by the entire world. No idea why this is happening.

gotch4
  • 13,093
  • 29
  • 107
  • 170
  • 2
    Try printing out the `java.io.tmpdir` system property to ensure the JVM has picked up the correct path. – McDowell Dec 05 '12 at 11:31

1 Answers1

3

This was simply failing because my tomcat installation didn't have a temp directory. Creating the directory just solved the problem. :)

gotch4
  • 13,093
  • 29
  • 107
  • 170