openjdk-osx-build
Michael Hall
mik3hall at gmail.com
Wed Apr 6 16:58:19 PDT 2011
On Apr 6, 2011, at 4:37 PM, Henri Gomez wrote:
>> User
>>
>> Very strange, thanks for providing reference build so I could at least eliminate that as responsible for the Files error.
>
> Note, I'm allways install it for all users, may be it's the problem ?
Henri,
fyi, I was wrong I show 'mixed mode' as well on a java -version but don't think theres anyway I really build that way.
If you really wanted to you could maybe verify one thing for me that might be pertinent to a bug report.
If I run this with my last build, (which for some reason still gets the 100+ compile errors on my project, appears to be missing all kinds of things).
import java.nio.file.*;
import java.nio.file.attribute.*;
public class Exists {
public static void main(String[] args) {
System.out.println("file " + args[0] + " exists is " + Files.exists(new java.io.File(args[0]).toPath()));
}
}
Now with my build...
/usr/libexec/java_home -v 1.7 --exec javac Exists.java
/usr/libexec/java_home -v 1.7 --exec java Exists Exists.class
file Exists.class exists is true
For this it is fine anyhow.
I put your build back. I haven't tried the project compile with yours again but I believe it gets two errors, one of which shows the partial Files class. But for the Exists class here...
/usr/libexec/java_home -v 1.7 --exec javac Exists.java
Exists.java:7: cannot find symbol
System.out.println("file " + args[0] + " exists is " + Files.exists(new java.io.File(args[0]).toPath()));
^
symbol: method exists(Path)
location: class Files
1 error
Or just use javap, with yours....
/usr/libexec/java_home -v 1.7 --exec javap java.nio.file.Files
Compiled from "Files.java"
public final class java.nio.file.Files extends java.lang.Object {
public static java.lang.String probeContentType(java.nio.file.FileRef) throws java.io.IOException;
public static void walkFileTree(java.nio.file.Path, java.util.Set<java.nio.file.FileVisitOption>, int, java.nio.file.FileVisitor<? super java.nio.file.Path>) throws java.io.IOException;
public static void walkFileTree(java.nio.file.Path, java.nio.file.FileVisitor<? super java.nio.file.Path>) throws java.io.IOException;
public static void createDirectories(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
}
With mine....
/usr/libexec/java_home -v 1.7 --exec javap java.nio.file.Files
Compiled from "Files.java"
public final class java.nio.file.Files extends java.lang.Object {
static final boolean $assertionsDisabled;
public static java.io.InputStream newInputStream(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
public static java.io.OutputStream newOutputStream(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
public static java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path, java.util.Set<? extends java.nio.file.OpenOption>, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.channels.SeekableByteChannel newByteChannel(java.nio.file.Path, java.nio.file.OpenOption...) throws java.io.IOException;
public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path) throws java.io.IOException;
public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path, java.lang.String) throws java.io.IOException;
public static java.nio.file.DirectoryStream<java.nio.file.Path> newDirectoryStream(java.nio.file.Path, java.nio.file.DirectoryStream$Filter<? super java.nio.file.Path>) throws java.io.IOException;
public static java.nio.file.Path createFile(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.file.Path createDirectory(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.file.Path createDirectories(java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.file.Path createTempFile(java.nio.file.Path, java.lang.String, java.lang.String, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.file.Path createTempFile(java.lang.String, java.lang.String, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.file.Path createTempDirectory(java.nio.file.Path, java.lang.String, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.file.Path createTempDirectory(java.lang.String, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.file.Path createSymbolicLink(java.nio.file.Path, java.nio.file.Path, java.nio.file.attribute.FileAttribute<?>...) throws java.io.IOException;
public static java.nio.file.Path createLink(java.nio.file.Path, java.nio.file.Path) throws java.io.IOException;
public static void delete(java.nio.file.Path) throws java.io.IOException;
public static boolean deleteIfExists(java.nio.file.Path) throws java.io.IOException;
public static java.nio.file.Path copy(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) throws java.io.IOException;
public static java.nio.file.Path move(java.nio.file.Path, java.nio.file.Path, java.nio.file.CopyOption...) throws java.io.IOException;
public static java.nio.file.Path readSymbolicLink(java.nio.file.Path) throws java.io.IOException;
public static java.nio.file.FileStore getFileStore(java.nio.file.Path) throws java.io.IOException;
public static boolean isSameFile(java.nio.file.Path, java.nio.file.Path) throws java.io.IOException;
public static boolean isHidden(java.nio.file.Path) throws java.io.IOException;
public static java.lang.String probeContentType(java.nio.file.Path) throws java.io.IOException;
public static <V extends java/nio/file/attribute/FileAttributeView> V getFileAttributeView(java.nio.file.Path, java.lang.Class<V>, java.nio.file.LinkOption...);
public static <A extends java/nio/file/attribute/BasicFileAttributes> A readAttributes(java.nio.file.Path, java.lang.Class<A>, java.nio.file.LinkOption...) throws java.io.IOException;
public static java.nio.file.Path setAttribute(java.nio.file.Path, java.lang.String, java.lang.Object, java.nio.file.LinkOption...) throws java.io.IOException;
public static java.lang.Object getAttribute(java.nio.file.Path, java.lang.String, java.nio.file.LinkOption...) throws java.io.IOException;
public static java.util.Map<java.lang.String, java.lang.Object> readAttributes(java.nio.file.Path, java.lang.String, java.nio.file.LinkOption...) throws java.io.IOException;
public static java.util.Set<java.nio.file.attribute.PosixFilePermission> getPosixFilePermissions(java.nio.file.Path, java.nio.file.LinkOption...) throws java.io.IOException;
public static java.nio.file.Path setPosixFilePermissions(java.nio.file.Path, java.util.Set<java.nio.file.attribute.PosixFilePermission>) throws java.io.IOException;
public static java.nio.file.attribute.UserPrincipal getOwner(java.nio.file.Path, java.nio.file.LinkOption...) throws java.io.IOException;
public static java.nio.file.Path setOwner(java.nio.file.Path, java.nio.file.attribute.UserPrincipal) throws java.io.IOException;
public static boolean isSymbolicLink(java.nio.file.Path);
public static boolean isDirectory(java.nio.file.Path, java.nio.file.LinkOption...);
public static boolean isRegularFile(java.nio.file.Path, java.nio.file.LinkOption...);
public static java.nio.file.attribute.FileTime getLastModifiedTime(java.nio.file.Path, java.nio.file.LinkOption...) throws java.io.IOException;
public static java.nio.file.Path setLastModifiedTime(java.nio.file.Path, java.nio.file.attribute.FileTime) throws java.io.IOException;
public static long size(java.nio.file.Path) throws java.io.IOException;
public static boolean exists(java.nio.file.Path, java.nio.file.LinkOption...);
public static boolean notExists(java.nio.file.Path, java.nio.file.LinkOption...);
public static boolean isReadable(java.nio.file.Path);
public static boolean isWritable(java.nio.file.Path);
public static boolean isExecutable(java.nio.file.Path);
public static java.nio.file.Path walkFileTree(java.nio.file.Path, java.util.Set<java.nio.file.FileVisitOption>, int, java.nio.file.FileVisitor<? super java.nio.file.Path>) throws java.io.IOException;
public static java.nio.file.Path walkFileTree(java.nio.file.Path, java.nio.file.FileVisitor<? super java.nio.file.Path>) throws java.io.IOException;
public static java.io.BufferedReader newBufferedReader(java.nio.file.Path, java.nio.charset.Charset) throws java.io.IOException;
public static java.io.BufferedWriter newBufferedWriter(java.nio.file.Path, java.nio.charset.Charset, java.nio.file.OpenOption...) throws java.io.IOException;
public static long copy(java.io.InputStream, java.nio.file.Path, java.nio.file.CopyOption...) throws java.io.IOException;
public static long copy(java.nio.file.Path, java.io.OutputStream) throws java.io.IOException;
public static byte[] readAllBytes(java.nio.file.Path) throws java.io.IOException;
public static java.util.List<java.lang.String> readAllLines(java.nio.file.Path, java.nio.charset.Charset) throws java.io.IOException;
public static java.nio.file.Path write(java.nio.file.Path, byte[], java.nio.file.OpenOption...) throws java.io.IOException;
public static java.nio.file.Path write(java.nio.file.Path, java.lang.Iterable<? extends java.lang.CharSequence>, java.nio.charset.Charset, java.nio.file.OpenOption...) throws java.io.IOException;
static {};
}
If your results match on this I would know it's not just a 32 bit problem for the bug report but a universal one as it is.
That is for you...
The Exists class won't compile.
javap shows a stunted java.nio.file.Files class.
Actually anyone with a 64 bit universal build could confirm this.
More information about the macosx-port-dev
mailing list