Strange compile error

Michael Hall mik3hall at gmail.com
Tue Apr 5 13:56:21 PDT 2011


OK, had a chance to look at my last compile errors and I appear to be back with the strange one I had a build or two back. 

The compile...
	<target name="compile" depends="init" description="Compile nio2 truezip">
		<exec failonerror="true"
			executable="/bin/sh" os="Mac OS X">
			<arg value="-c"/>
			<arg value="/usr/libexec/java_home -v 1.7 --exec javac -d ${classes.dir} -cp ${class.path} src/org/truezip/*.java" />

Gets...

java:110: cannot find symbol
     [exec]             if (Files.exists(aPath)) {
     [exec]                      ^
     [exec]   symbol:   method exists(Path)
     [exec]   location: class Files

/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;
}

appears to be missing a lot of methods

ls -l ~/Library/Java/JavaVirtualMachines
total 0
drwxr-xr-x  3 mjh  staff  102 Apr  5 05:46 1.7.0.jdk

Should be what it runs against.

/usr/libexec/java_home -v 1.7 --exec java -version
openjdk version "1.7.0-internal"
OpenJDK Runtime Environment (build 1.7.0-internal-b00)
OpenJDK Server VM (build 20.0-b06, mixed mode)

I don't think I can build mixed mode, so it's Henri Gomez's, not mine. So should be reproducible with his?



More information about the macosx-port-dev mailing list