configure --with-java fails - Mailing list pgsql-general

From Markus Wollny
Subject configure --with-java fails
Date
Msg-id 2266D0630E43BB4290742247C891057502B9D367@dozer.computec.de
Whole thread Raw
List pgsql-general
Hello!

When I try to run ./configure --with-java, it complains that ant doesn't
work. However ant is installed, as is the latest Java SDK 1.4.2 from
sun, PATH and JAVA_HOME are set correctly;

    helles:/ # /usr/java/apache-ant-1.5.4/bin/ant -version
    Apache Ant version 1.5.4 compiled on August 12 2003

It complains about some unsupported class-version; does it require an
older Java-SDK?

Here's the bit from config.log:
configure:3157: checking for jakarta-ant
configure:3190: result: no
configure:3157: checking for ant
configure:3175: found /usr/java/apache-ant-1.5.4/bin/ant
configure:3187: result: /usr/java/apache-ant-1.5.4/bin/ant
configure:3198: checking whether /usr/java/apache-ant-1.5.4/bin/ant
works
configure:3222: /usr/java/apache-ant-1.5.4/bin/ant -buildfile
conftest.xml 1>&2
Buildfile: conftest.xml

conftest:
    [javac] Compiling 1 source file

BUILD FAILED
java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main
(Unsupported major.minor version 48.0)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:106)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:243)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:51)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:190)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:310)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:115)
        at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.doesModer
nCompilerExist(CompilerAdapterFactory.java:173)
        at
org.apache.tools.ant.taskdefs.compilers.CompilerAdapterFactory.getCompil
er(CompilerAdapterFactory.java:131)
        at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:835)
        at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:682)
        at org.apache.tools.ant.Task.perform(Task.java:341)
        at org.apache.tools.ant.Target.execute(Target.java:309)
        at org.apache.tools.ant.Target.performTasks(Target.java:336)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1339)
        at
org.apache.tools.ant.Project.executeTargets(Project.java:1255)
        at org.apache.tools.ant.Main.runBuild(Main.java:609)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
com/sun/tools/javac/Main (Unsupported major.minor version 48.0)
configure:3225: $? = 1
configure: failed java program was:
public class conftest {
    int testmethod(int a, int b) {
        return a + b;
    }
}
configure: failed build file was:
<project name="conftest" default="conftest">
 <target name="conftest">
  <javac srcdir="." includes="conftest.java">
  </javac>
 </target>
</project>
configure:3241: result: no
configure:3245: error: ant does not work

## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_path_ANT=/usr/java/apache-ant-1.5.4/bin/ant

#define PG_VERSION_STR "PostgreSQL 7.4 on i686-pc-linux-gnu, compiled by
GCC gcc (GCC) 3.2"

configure: exit 1

pgsql-general by date:

Previous
From: "Markus Wollny"
Date:
Subject: Re: tsearch2 column update produces "word too long"error
Next
From: Alex Satrapa
Date:
Subject: Re: Where is Postgesql ? - MYSQL SURPRISES WITH MAXDB /