kaffe apparently has its own copy of classpath, so the difference is no surprise.
Also, the problem is related to the file.encoding property, and File.canWrite() is not the actual problem, but File.exists(). import java.io.*; import java.util.*; public class Bla { public static void main(String[] args) throws Exception { //System.setProperty("file.encoding", "UTF-8"); File tempFile = new File("/tmp/xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/test-dir-write11fd33add11_1.tmp"); System.out.println("exists: " + tempFile.exists()); } As is, the program correctly shows that the file does not exist. If you comment in the System.setProperty() call, the program now tells you that the file exists, even though it does not. When specifying file.encoding on the commandline with -Dfile.encoding=... it works both for UTF-8 and ISO-88591. Hmm, now I'm not sure anymore about the encoding. If I leave out setting of file.encoding, but instead call System.getProperties() once at the beginning, File.exists() also returns true. Independent of whether or how I specify file.encoding on the commandline. Here's my properties: file.encoding=UTF-8 file.separator=/ gnu.classpath.boot.library.path=/usr/lib/classpath gnu.classpath.home.url=file:///usr/lib gnu.classpath.home=/usr gnu.classpath.mime.types.file=/etc/mime.types gnu.classpath.version=0.97.2 gnu.classpath.vm.shortname=JamVM gnu.cpu.endian=little http.agent=gnu-classpath/0.97.2 (JamVM/1.5.1) Inc. Inc. java.boot.class.path=/usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip java.class.path=. java.class.version=48.0 java.compiler= java.ext.dirs= java.home=/usr/lib/java java.io.tmpdir=/tmp java.library.path=/usr/lib/jni java.runtime.version=1.5.1 java.specification.name=Java Platform API Specification java.specification.vendor=Sun Microsystems java.specification.version=1.5 java.vendor=GNU Classpath java.vendor.url=http://www.classpath.org java.version=1.5.0 java.vm.name=JamVM java.vm.specification.name=Java Virtual Machine Specification java.vm.specification.vendor=Sun Microsystems java.vm.specification.version=1.0 java.vm.vendor=Robert Lougher java.vm.vendor.url=http://jamvm.sourceforge.net java.vm.version=1.5.1 line.separator= os.arch=i386 os.name=Linux os.version=2.6.26-1-686-bigmem path.separator=: sun.boot.class.path=/usr/share/jamvm/classes.zip:/usr/share/classpath/glibj.zip user.dir=/tmp user.home=/home/gis user.language=de user.name=gis user.region=DE Cheers, Carsten
signature.asc
Description: This is a digitally signed message part.