By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,874 Members | 1,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,874 IT Pros & Developers. It's quick & easy.

./configure --with-java fails

P: n/a
Hi!

I am trying to build PostgreSQL 7.4.3 with Java enabled; I've got Apache
Ant version 1.5 and j2sdk1.4.1_05 installed:

Verifiying ant:
# which javac
/usr/java/j2sdk1.4.1_05/bin/javac
# ant -version
Apache Ant version 1.5 compiled on October 15 2002

Verifying java-compiler:
# which javac
/usr/java/j2sdk1.4.1_05/bin/javac

Verifying environment variables:
# export|grep java
declare -x JAVA_BINDIR="/usr/java/j2sdk1.4.1_05/bin"
declare -x JAVA_HOME="/usr/java/j2sdk1.4.1_05"
declare -x JAVA_ROOT="/usr/java/j2sdk1.4.1_05"
declare -x JRE_HOME="/usr/java/j2sdk1.4.1_05/jre"
declare -x
PATH="/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/usr/bin:
/usr/X11R6/bin:/bin:/usr/games:/opt/kde3/bin:/usr/java/j2sdk1.4.1_05/bin
:/usr/java/j2sdk1.4.1_05/jre/bin"

I ran the ./configure-script as follows:

../configure --prefix=/opt/pgsql --datadir=/var/lib/pgsql/data/base
--enable-locale --with-perl --with-java --enable-odbc --enable-syslog

The last lines of configure-output are

checking whether to build Java/JDBC tools... yes
checking for jakarta-ant... no
checking for ant... /usr/bin/ant
checking whether /usr/bin/ant works... no
configure: error: ant does not work

The configure.log contains the following relevant lines:

configure:3139: checking whether to build Java/JDBC tools
configure:3150: result: yes
configure:3157: checking for jakarta-ant
configure:3190: result: no
configure:3157: checking for ant
configure:3175: found /usr/bin/ant
configure:3187: result: /usr/bin/ant
configure:3198: checking whether /usr/bin/ant works
configure:3222: /usr/bin/ant -buildfile conftest.xml 1>&2
Buildfile: conftest.xml

conftest:
[javac] Compiling 1 source file
[javac] Modern compiler not found - looking for classic compiler

BUILD FAILED
file:/usr/src/postgresql/postgresql-7.4.3/conftest.xml:3: Cannot use
classic compiler, as it is not available. A common solution is to set
the environment variable JAVA_HOME to your jdk directory.

Total time: 2 seconds
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

Help would be very much appreciated; on second thoughts: Is it at all
necessary to build the JDBC-driver myself or can I safely use the
precompiled .jar-file from http://jdbc.postgresql.org/download.html on
my clients? And if I compile without the --with-java, will the resulting
PostgreSQL-server-installation have any shortcomings in integrating with
JDBC-applications? What exactly are the "Java/JDBC tools" aside from the
JDBC-driver jar-file?

Kind regards

Markus


Nov 23 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


On Tue, 6 Jul 2004, Markus Wollny wrote:
I am trying to build PostgreSQL 7.4.3 with Java enabled; I've got Apache
Ant version 1.5 and j2sdk1.4.1_05 installed:

[javac] Modern compiler not found - looking for classic compiler

BUILD FAILED
file:/usr/src/postgresql/postgresql-7.4.3/conftest.xml:3: Cannot use
classic compiler, as it is not available. A common solution is to set
the environment variable JAVA_HOME to your jdk directory.
Your setup looks good, perhaps changing the configure script to run ant
with -debug would help?
Help would be very much appreciated; on second thoughts: Is it at all
necessary to build the JDBC-driver myself or can I safely use the
precompiled .jar-file from http://jdbc.postgresql.org/download.html on
my clients? And if I compile without the --with-java, will the resulting
PostgreSQL-server-installation have any shortcomings in integrating with
JDBC-applications? What exactly are the "Java/JDBC tools" aside from the
JDBC-driver jar-file?


Configuring with --with-java does nothing other than build the JDBC
driver. There used to be some additional java tools, but these were
removed before the 7.4 release. The provided jar files are no different
than what you would build yourself so it's fine to use them.

Kris Jurka
---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.