You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Pareti, Joseph" <Jo...@hp.com> on 2008/10/08 11:45:53 UTC

what does ant really use?



As a disclaimer, I am a true ant (and java) novice. Having said that, I am confronted with a weird problem in a j2ee project which fails at run time with a jndi error. After several investigations, I am now almost convinced it has to do with the build process.

I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel 2.4; I am also using ant 1.5.2_23

My build log file shows, for each compile target the following message:

[javac] Using gcj compiler

Just for kicks, I then deleted gcj as well as javac (here I mean the javac compiler executable) from my disk i.e. I renamed both of them to something else, and ant still worked and still claimed it's using gcj, which leaves me totally confused.

Perhaps one hint; at the top of the log file I see the comment "detected java version 1.4 in /usr".

I know this is not what I want/need (it should be 1.5), so where does it come from?

I then went ahead setting the following property in my build.xml:

<property name="build.compiler" value="modern"/>

but this was quickly discarded:

"Override ignored for property build.compiler"
which basically produced the same results as described above. I am running out of ideas here.

Thanks for any insights.

RE: what does ant really use?

Posted by "Pareti, Joseph" <Jo...@hp.com>.
In addition these are the files used to build:

build.xml

<!DOCTYPE project [
<!ENTITY targets SYSTEM "../common/targets.xml">
]>
<project name="Loan Calculator EJB"

default="deployEjbJar"
basedir=".">
<property environment="env"/>
<property file="build.properties"/>
<property file="../common/env.properties"/>
<property file="../common/build.properties"/>
&targets;
</project>

targets.xml

<path id="servlet.jar">
<pathelement path="${servlet-jar}"/>
</path>
<path id="jboss.jars">
<fileset dir="${jboss-home}/client">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean"
description="Removes the build directories">
<delete dir="${buildDir}" />
</target>
<target name="prepareDirectories" depends="clean">
<echo message="Creating build and distribution directories ..." />
<mkdir dir="${buildDirBusinessLogic}" />
<mkdir dir="${buildDirCommon}" />
<mkdir dir="${buildDirServlet}/WEB-INF/classes" />
<mkdir dir="${buildDirClientCommon}" />
<mkdir dir="${buildDirApplet}" />
<mkdir dir="${buildDirClientApp}" />
<mkdir dir="${distDir}" />
</target>
<target name="compileCommon" depends="prepareDirectories">
<echo message="Compiling classes common to server and client layers ..."/>
<javac srcdir="${srcDirCommon}"
destdir="${buildDirCommon}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
debug="${compile.debug}"
includes="**/*.java"
>
<classpath path="${classpath}">
<path refid="jboss.jars"/>
<path location="${buildDirCommon}"/>
</classpath>
</javac>
</target>
<target name="compileBusinessLogic" depends="compileCommon">
<echo message="Compiling classes business logic layer ..."/>
<javac srcdir="${srcDirBusinessLogic}"
destdir="${buildDirBusinessLogic}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
debug="${compile.debug}"
includes="**/*.java">
<classpath path="${classpath}">
<path refid="jboss.jars"/>
<path location="${buildDirCommon}"/>
</classpath>
</javac>
</target>
<target name="compileClientCommon" depends="compileCommon">
<echo message="Compiling common classes client-side classes ..."/>
<javac srcdir="${srcDirClientCommon}"
destdir="${buildDirClientCommon}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
debug="${compile.debug}"
includes="**/*.java">
<classpath path="${classpath}">
<path refid="jboss.jars"/>
<path location="${buildDirCommon}"/>

</classpath>
</javac>
</target>
<target name="compileClientApp" depends="compileClientCommon">
<echo message="Compiling classes for client application ..."/>
<javac  srcdir="${srcDirClientApp}"
destdir="${buildDirClientApp}"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
debug="${compile.debug}"
includes="**/*.java">
<classpath path="/usr/java/jdk1.5.0_02/jre/lib">
<path refid="jboss.jars"/>
<path location="${buildDirCommon}"/>
<path location="${buildDirClientCommon}"/>
</classpath>
</javac>
</target>
<target name="ejbJar" depends="compileBusinessLogic">
<echo message="Creating ejb-jar ..."/>
<delete file="${distDir}/${ejb-jar}"/>
<jar jarfile="${distDir}/${ejb-jar}">
<fileset dir="${buildDirCommon}" includes="**/*.class"/>
<fileset dir="${buildDirBusinessLogic}" includes="**/*.class"/>
<fileset dir="${basedir}"
includes="META-INF/*.xml"
excludes="META-INF/application.xml"/>
</jar>
</target>
<target name="deployEjbJar" depends="ejbJar">
<echo message="Deploying ejb-jar to ${deployDir} ..."/>
<copy file="${distDir}/${ejb-jar}" todir="${deployDir}"/>
<chmod file="${deployDir}/${ejb-jar}" perm="ugo+rx" includes="*"/>
</target>
<target name="undeploy">
<delete file="${deployDir}/${ejb-jar}"/>
<delete file="${deployDir}/${ear}"/>
</target>
<target name="jarClientApp" depends="compileClientApp">
<echo message="Building JAR file for the client application ..."/>
<delete file="${distDir}/${clientApp-jar}" />
<jar jarfile="${distDir}/${clientApp-jar}">
<fileset dir="${buildDirCommon}" includes="**/*.class"/>
<fileset dir="${buildDirClientCommon}" includes="**/*.class"/>
<fileset dir="${buildDirClientApp}" includes="**/*.class"/>
<fileset dir="${basedir}">
<include name="jndi.properties"/>
</fileset>
</jar>
</target>
<target name="runClientApp">
<echo message="Joe Dec 23_07" />
<echo message="basedir is ${basedir}" />
<echo message="Joe Dec 23_07" />
<echo message="Running the ${clientAppName} application:" />
<echo message=" java -classpath ${distDir}/${clientApp-jar} ${clientAppName}"/>
<java fork="on" classname="${clientAppName}" >
<classpath path="${classpath}:${basedir}/swingwt/lib/swingwt.jar:${basedir}/swingwt/lib/linux_gtk2/swt.jar:${basedir}/swingwt/lib/linux_gtk2/swt-swing.jar:${basedir}/:/mnt/jboss/jboss-4.2.0.CR2/lib:/usr/local/jboss-4.0.5.GA/client/jbossretro-rt.jar:/usr/java/jdk1.5.0_02/jre/lib/rt.jar">
<path refid="jboss.jars"/>
<pathelement location="${distDir}/${clientApp-jar}"/>
<pathelement path="${basedir}/swingwt/lib/swingwt.jar}"/>
<pathelement path="${basedir}/swingwt/lib/}"/>
<pathelement path="${basedir}/swingwt/lib/linux_gtk2/swt.jar}"/>
<pathelement path="${basedir}/swingwt/lib/linux_gtk2/}"/>
</classpath>
</java>
</target>
<target name="compileServlet" depends="compileCommon">
<echo message="Compiling servlet classes ... ${srcDirServlet}"/>

<javac srcdir="${srcDirServlet}"
destdir="${buildDirServlet}/WEB-INF/classes"
deprecation="${compile.deprecation}"
optimize="${compile.optimize}"
debug="${compile.debug}"
includes="**/*.java">
<classpath path="${classpath}">
<path refid="jboss.jars"/>
<path refid="servlet.jar"/>
<path location="${buildDirCommon}"/>
<path location="${buildDirServlet}"/>
</classpath>
</javac>
</target>
<target name="createWar" depends="compileServlet">
<echo message="Creating web archive ..."/>
<delete file="${distDir}/${web-jar}"/>
<jar jarfile="${distDir}/${web-jar}">
<fileset dir="${buildDirServlet}" includes="**/*.class"/>
<fileset dir="${basedir}" includes="WEB-INF/**"/>
<fileset dir="${srcDirServletWeb}" includes="**"/>
</jar>
</target>
<target name="createEar" depends="ejbJar,createWar">
<echo message="Creating ear ..."/>
<delete file="${distDir}/${ear}"/>
<jar jarfile="${distDir}/${ear}">
<fileset dir="${basedir}">
<include name="META-INF/application.xml"/>
</fileset>
<fileset dir="${distDir}">
<include name="${ejb-jar}"/>
<include name="${web-jar}"/>
</fileset>
</jar>
</target>
<target name="deployEar" depends="createEar">
<echo message="Deploying enterprise archive to ${deployDir} ..."/>
<copy file="${distDir}/${ear}" todir="${deployDir}"/>
<chmod file="${deployDir}/${ear}" perm="ugo+rx" includes="*"/>
</target>


common/env.properties

script-suffix=sh
jboss-home=${env.JBOSS_HOME}
jboss-jars=${jboss-home}/client/*.jar
servlet-jar=${jboss-home}/server/default/lib/javax.servlet.jar
deployDir=${jboss-home}/server/default/deploy


common/build.properties

contextPath=${appName}
ejb-jar=${contextPath}.jar
web-jar=${contextPath}.war
ear=${contextPath}.ear
clientApp-jar=${contextPath}Client.jar
srcDir=${basedir}/src
buildDir=${basedir}/build
distDir=${basedir}/dist
srcDirCommon=${srcDir}/common
buildDirCommon=${buildDir}/common
srcDirBusinessLogic=${srcDir}/businessLogic
buildDirBusinessLogic=${buildDir}/businessLogic
srcDirServlet=${srcDir}/servlet
buildDirServlet=${buildDir}/servlet
srcDirClientCommon=${srcDir}/client/common
buildDirClientCommon=${buildDir}/client/common
srcDirApplet=${srcDir}/client/applet
buildDirApplet=${buildDir}/client/applet
srcDirClientApp=${srcDir}/client/application
buildDirClientApp=${buildDir}/client/application
srcDirServletWeb=${srcDirServlet}/web
srcDirAppletWeb=${srcDirApplet}/web
compile.debug=true
compile.optimize=false
compile.deprecation=true


-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Sunday, October 12, 2008 11:56 PM
To: Ant Users List
Subject: RE: what does ant really use?


Good Evening Joseph-

what is the specific error you are getting?
which version of which AppServer are you deploying to?
if you are using EJB 2 (the default) we will need to see ejb-jar.xml Any or all Java Sources (just attach every java source file that extends EJBHome) how are you building the ear (assume either build.xml or pom.xml?) GlassFish has a ear builder and deployer in $GLASSFISH_HOME/GlassFish/Sun/AppServer/common-ant.xml
that looks something like this:

<property name="jarDD"        value="ejb-jar.xml,sun-ejb-jar.xml"/>
  <!-- ======================================================= -->
  <!-- Assemble EJB JAR module.        OLD WAY                 -->
  <!-- ======================================================= -->
  <target name="create_ejbjar_common_old" depends="clean_ejbjar_common">
    <mkdir dir="${assemble.ejbjar}"/>
    <jar destfile="${assemble.ejbjar}/${ejbjar}">
      <zipfileset dir="${build.classesdir}/${jar.pkg}/" includes="**/*.class"
                  excludes="**/servlet/, **/client/" prefix="${jar.pkg}"/>
      <metainf dir="${jarDD.dir}" includes="${jarDD}"/>
    </jar>
    <!-- AEM NEEDED?copy file="${assemble.ejbjar}/${ejbjar}" tofile="../${ejbjar}"/>-->
    <property name="ejbjar.done" value="true"/>
  </target>
  <!-- ======================================================= -->
  <!-- Assemble CLIENT JAR module.        OLD WAY              -->
  <!-- ======================================================= -->
  <target name="clientjar_common" depends="clean_clientjar_common">
    <mkdir dir="${assemble.clientjar}"/>
    <jar destfile="${assemble.clientjar}/${clientjar}" manifest="${clientDD.dir}/MANIFEST.MF">
      <zipfileset dir="${build.classesdir}/${app.pkg}/"
                  includes="**/*Client.class" excludes="**/servlet/"
                  prefix="${app.pkg}"/>
      <metainf dir="${clientDD.dir}" includes="${clientDD}"/>
    </jar>
    <property name="clientjar.done" value="true"/>
  </target>

Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.


> From: Joseph.Pareti@hp.com
> To: user@ant.apache.org
> Date: Sun, 12 Oct 2008 17:51:13 +0000
> Subject: RE: what does ant really use?
>
> Yes of course I have jdk 1.5.0_02  and JAVA_HOME is set too ...
>
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: Saturday, October 11, 2008 11:12 PM
> To: Ant Users List
> Subject: RE: what does ant really use?
>
>
> it is assumed you already installed the JDK for your operating system
> first..then set JAVA_HOME to the folder you installed
>
> without the JDK installation..any distro of ANT wont work
>
> http://java.sun.com/javase/downloads/index.jsp
>
> Martin Gainty
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
>
>
> > From: Joseph.Pareti@hp.com
> > To: user@ant.apache.org
> > Date: Sat, 11 Oct 2008 20:14:47 +0000
> > Subject: RE: what does ant really use?
> >
> > Yes I am aware that there are symlinks, so I followed them to the point that I am almost 100% sure there was neither javac nor gcj on the system disk. So how can ant still compile? Does it have a "bundled" gcj ?
> >
> > -----Original Message-----
> > From: John5342 [mailto:john5342@googlemail.com]
> > Sent: Wednesday, October 08, 2008 11:58 AM
> > To: Ant Users List
> > Subject: Re: what does ant really use?
> >
> > If you changed the name of gcj and javac in /usr/bin they are not the actualy executables. They are only links to the real ones which in fedora (and probably RH) located in /usr/share/jvm/<java implementation>/bin/. In fedora (and again probably in RH) there is an "alternatives" application which allows you to choose which installed version of java you are using rather than renaming binaries. Should also warn you that although RH is supported longer than most and in general rock stable the software is often quite old because i happen to know that more recent versions of gcj support java 1.5. Hope this all helps you in the right direction.
> >
> > 2008/10/8 Pareti, Joseph <Jo...@hp.com>
> >
> > >
> > >
> > >
> > > As a disclaimer, I am a true ant (and java) novice. Having said
> > > that, I am confronted with a weird problem in a j2ee project which
> > > fails at run time with a jndi error. After several investigations,
> > > I am now almost convinced it has to do with the build process.
> > >
> > > I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel
> > > 2.4; I am also using ant 1.5.2_23
> > >
> > > My build log file shows, for each compile target the following message:
> > >
> > > [javac] Using gcj compiler
> > >
> > > Just for kicks, I then deleted gcj as well as javac (here I mean
> > > the javac compiler executable) from my disk i.e. I renamed both of
> > > them to something else, and ant still worked and still claimed
> > > it's using gcj, which leaves me totally confused.
> > >
> > > Perhaps one hint; at the top of the log file I see the comment
> > > "detected java version 1.4 in /usr".
> > >
> > > I know this is not what I want/need (it should be 1.5), so where
> > > does it come from?
> > >
> > > I then went ahead setting the following property in my build.xml:
> > >
> > > <property name="build.compiler" value="modern"/>
> > >
> > > but this was quickly discarded:
> > >
> > > "Override ignored for property build.compiler"
> > > which basically produced the same results as described above. I am
> > > running out of ideas here.
> > >
> > > Thanks for any insights.
> > >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For
> > additional commands, e-mail: user-help@ant.apache.org
> >
>
> _________________________________________________________________
> Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> commands, e-mail: user-help@ant.apache.org
>

_________________________________________________________________
See how Windows connects the people, information, and fun that are part of your life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: what does ant really use?

Posted by "Pareti, Joseph" <Jo...@hp.com>.
Thanks Martin, here are some quick answers.
=====

>what is the specific error you are getting?

[java] javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial
     [java]    at javax.naming.spi.NamingManager.getInitialContext(java.util.Hashtable) (/lib/ssa/libgcj.so.4.0.0)
     [java]    at javax.naming.InitialContext.getDefaultInitCtx() (/lib/ssa/libgcj.so.4.0.0)
     [java]    at javax.naming.InitialContext.getURLOrDefaultInitCtx(java.lang.String) (/lib/ssa/libgcj.so.4.0.0)
     [java]    at javax.naming.InitialContext.lookup(java.lang.String) (/lib/ssa/libgcj.so.4.0.0)
     [java]    at za.co.solms.finance.calculators.LoanCalculatorPanel.connect() (Unknown Source)
     [java]    at za.co.solms.finance.calculators.LoanCalculatorPanel.init() (Unknown Source)
     [java]    at za.co.solms.finance.calculators.LoanCalculatorPanel.LoanCalculatorPanel() (Unknown Source)
     [java]    at za.co.solms.finance.calculators.LoanCalculatorClient.LoanCalculatorClient() (Unknown Source)
     [java]    at za.co.solms.finance.calculators.LoanCalculatorClient.main(java.lang.String[]) (Unknown Source)

>which version of which AppServer are you deploying to?

JBOSS 4.2.0.CR2


>we will need to see ejb-jar.xml

<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//"http://java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd">
<ejb-jar>
<description>A calculator which calculates the amortization of a fixed rate loan
at constant payments.</description>
<display-name>LoanCalculator EJB</display-name>
<enterprise-beans>
<session>
<ejb-name>LoanCalculator</ejb-name>
<home>za.co.solms.finance.calculators.LoanCalculatorHome</home>
<remote>za.co.solms.finance.calculators.LoanCalculator</remote>
<ejb-class>za.co.solms.finance.calculators.LoanCalculatorBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>LoanCalculator</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>


The java source where the problem occurs is the following:

package za.co.solms.finance.calculators;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import swingwt.awt.*;
import java.text.*;
import java.util.*;
import swingwtx.swing.*;
import swingwt.awt.event.*;
import javax.naming.Context;
import java.util.Hashtable;
import javax.naming.InitialContext;
public class LoanCalculatorPanel extends JPanel
{
public LoanCalculatorPanel() {init();}
public void init()
{
try
{
connect();
JPanel fieldsPanel = new JPanel();
fieldsPanel.setLayout
(new GridLayout(4,3));
fieldsPanel.add(new JLabel("Loan amount: "));
fieldsPanel.add(loanAmountField);
fieldsPanel.add(calcLoanAmountButton);
fieldsPanel.add(new JLabel("Monthly installment: "));
fieldsPanel.add(installmentField);
fieldsPanel.add(calcInstallmentButton);
fieldsPanel.add(new JLabel("Loan period in months: "));
fieldsPanel.add(loanPeriodField);
fieldsPanel.add(calcLoanPeriodButton);
fieldsPanel.add(new JLabel("Interest Rate (%): "));
fieldsPanel.add(interestRateField);
JPanel mainPanel = new JPanel();
mainPanel.add(fieldsPanel);
add(mainPanel);
calcLoanAmountButton.addActionListener
(new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
double installment = getDouble(installmentField);
int loanPeriod = getInt(loanPeriodField);
double interestRate = getDouble(interestRateField)/100;
try
{
double loanAmount = loanCalculator.calcLoanAmount
(installment, interestRate, loanPeriod);
loanAmountField.setText
(amountFormatter.format(loanAmount));
}
catch (Exception e)
{
JOptionPane.showMessageDialog
(LoanCalculatorPanel.this,
e.toString(), e.getMessage(),
JOptionPane.ERROR_MESSAGE);
}
}
});
calcInstallmentButton.addActionListener
(new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
double loanAmount = getDouble(loanAmountField);
int loanPeriod = getInt(loanPeriodField);
double interestRate = getDouble(interestRateField)/100;
try
{
double installment = loanCalculator.calcMonthlyInstallment
(loanAmount, interestRate, loanPeriod);
installmentField.setText
(amountFormatter.format(installment));
}
catch (Exception e)
{
JOptionPane.showMessageDialog
(LoanCalculatorPanel.this,
e.toString(), e.getMessage(),
JOptionPane.ERROR_MESSAGE);
}
}
});
calcLoanPeriodButton.addActionListener
(new ActionListener()
{
public void actionPerformed(ActionEvent event)
{
double loanAmount = getDouble(loanAmountField);
double installment = getDouble(installmentField);
double interestRate = getDouble(interestRateField)/100;
try
{
int loanPeriod = loanCalculator.calcLoanPeriodInMonths
(loanAmount, installment, interestRate);
loanPeriodField.setText(Integer.toString(loanPeriod));
}
catch (Exception e)
{
JOptionPane.showMessageDialog
(LoanCalculatorPanel.this,
e.toString(), e.getMessage(),
JOptionPane.ERROR_MESSAGE);
}
}
});
}
catch (Exception e)
{
JOptionPane.showMessageDialog(LoanCalculatorPanel.this,
e.getMessage(),
"Could not connect to session bean.",
JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
System.exit(0);
}
}
public double getDouble(JTextField textField)
{
try
{
return amountFormatter.parse

(textField.getText(),
new ParsePosition(0)).doubleValue();
}
catch (NumberFormatException e)
{
JOptionPane.showMessageDialog
(this, e.getMessage(), "Invalid input.",
JOptionPane.ERROR_MESSAGE);
return 0;
}
}
public int getInt(JTextField textField)
{
try
{
return Integer.parseInt(textField.getText());
}
catch (NumberFormatException e)
{
JOptionPane.showMessageDialog
(this, e.getMessage(), "Invalid input.",
JOptionPane.ERROR_MESSAGE);
return 0;
}
}
public void connect()
{
try
{
System.out.println("Now looking up session bean " + jndiName + " ...");
java.util.Hashtable properties = new java.util.Hashtable();
properties.put(Context.PROVIDER_URL,"localhost:1099");
properties.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
properties.put("java.naming.rmi.security.manager", "yes");
javax.naming.Context context = new javax.naming.InitialContext(properties);
InitialContext jndiContext = new InitialContext();
System.out.println("Now looking up jndiContext " + jndiContext + " ...");
System.out.println("Now looking up context " + context + " ...");
/* System.out.println("Now looking up " + InitialContext + " ..."); */
Object beanHomeRef
= jndiContext.lookup(jndiName);
System.out.println("got it");
LoanCalculatorHome home =
(LoanCalculatorHome)PortableRemoteObject.narrow
(beanHomeRef, LoanCalculatorHome.class);
loanCalculator = home.create();
}
catch (Exception e)
{
JOptionPane.showMessageDialog(LoanCalculatorPanel.this,
e.getMessage(),
"Could not connect to session bean.",
JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
System.exit(0);
}
}
public void destroy()
{
try
{
loanCalculator.remove();
System.out.println("Removed session bean.");
}
catch (javax.ejb.RemoveException e)
{
System.out.println("Could not remove session bean.");
}
catch (java.rmi.RemoteException e)

{
System.out.println("Could not remove session bean.");
}
}
private LoanCalculator loanCalculator;
private JTextField loanAmountField = new JTextField(10);
private JTextField installmentField = new JTextField(10);
private JTextField interestRateField = new JTextField(10);
private JTextField loanPeriodField = new JTextField(3);
private JButton calcLoanAmountButton
= new JButton("calculate");
private JButton calcInstallmentButton
= new JButton("calculate");
private JButton calcLoanPeriodButton
= new JButton("calculate");
private DecimalFormat amountFormatter
= new DecimalFormat("###,###,###,##0.00");
private static final String jndiName    = "ejb/LoanCalculator/local";
/* private static final String jndiName    = "ejb/LoanCalculator/local"; */
private static final String jndiNameJoe = "local/ejb/LoanCalculator";
}
-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Sunday, October 12, 2008 11:56 PM
To: Ant Users List
Subject: RE: what does ant really use?


Good Evening Joseph-

what is the specific error you are getting?
which version of which AppServer are you deploying to?
if you are using EJB 2 (the default) we will need to see ejb-jar.xml Any or all Java Sources (just attach every java source file that extends EJBHome) how are you building the ear (assume either build.xml or pom.xml?) GlassFish has a ear builder and deployer in $GLASSFISH_HOME/GlassFish/Sun/AppServer/common-ant.xml
that looks something like this:

<property name="jarDD"        value="ejb-jar.xml,sun-ejb-jar.xml"/>
  <!-- ======================================================= -->
  <!-- Assemble EJB JAR module.        OLD WAY                 -->
  <!-- ======================================================= -->
  <target name="create_ejbjar_common_old" depends="clean_ejbjar_common">
    <mkdir dir="${assemble.ejbjar}"/>
    <jar destfile="${assemble.ejbjar}/${ejbjar}">
      <zipfileset dir="${build.classesdir}/${jar.pkg}/" includes="**/*.class"
                  excludes="**/servlet/, **/client/" prefix="${jar.pkg}"/>
      <metainf dir="${jarDD.dir}" includes="${jarDD}"/>
    </jar>
    <!-- AEM NEEDED?copy file="${assemble.ejbjar}/${ejbjar}" tofile="../${ejbjar}"/>-->
    <property name="ejbjar.done" value="true"/>
  </target>
  <!-- ======================================================= -->
  <!-- Assemble CLIENT JAR module.        OLD WAY              -->
  <!-- ======================================================= -->
  <target name="clientjar_common" depends="clean_clientjar_common">
    <mkdir dir="${assemble.clientjar}"/>
    <jar destfile="${assemble.clientjar}/${clientjar}" manifest="${clientDD.dir}/MANIFEST.MF">
      <zipfileset dir="${build.classesdir}/${app.pkg}/"
                  includes="**/*Client.class" excludes="**/servlet/"
                  prefix="${app.pkg}"/>
      <metainf dir="${clientDD.dir}" includes="${clientDD}"/>
    </jar>
    <property name="clientjar.done" value="true"/>
  </target>

Martin
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.


> From: Joseph.Pareti@hp.com
> To: user@ant.apache.org
> Date: Sun, 12 Oct 2008 17:51:13 +0000
> Subject: RE: what does ant really use?
>
> Yes of course I have jdk 1.5.0_02  and JAVA_HOME is set too ...
>
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: Saturday, October 11, 2008 11:12 PM
> To: Ant Users List
> Subject: RE: what does ant really use?
>
>
> it is assumed you already installed the JDK for your operating system
> first..then set JAVA_HOME to the folder you installed
>
> without the JDK installation..any distro of ANT wont work
>
> http://java.sun.com/javase/downloads/index.jsp
>
> Martin Gainty
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
>
>
> > From: Joseph.Pareti@hp.com
> > To: user@ant.apache.org
> > Date: Sat, 11 Oct 2008 20:14:47 +0000
> > Subject: RE: what does ant really use?
> >
> > Yes I am aware that there are symlinks, so I followed them to the point that I am almost 100% sure there was neither javac nor gcj on the system disk. So how can ant still compile? Does it have a "bundled" gcj ?
> >
> > -----Original Message-----
> > From: John5342 [mailto:john5342@googlemail.com]
> > Sent: Wednesday, October 08, 2008 11:58 AM
> > To: Ant Users List
> > Subject: Re: what does ant really use?
> >
> > If you changed the name of gcj and javac in /usr/bin they are not the actualy executables. They are only links to the real ones which in fedora (and probably RH) located in /usr/share/jvm/<java implementation>/bin/. In fedora (and again probably in RH) there is an "alternatives" application which allows you to choose which installed version of java you are using rather than renaming binaries. Should also warn you that although RH is supported longer than most and in general rock stable the software is often quite old because i happen to know that more recent versions of gcj support java 1.5. Hope this all helps you in the right direction.
> >
> > 2008/10/8 Pareti, Joseph <Jo...@hp.com>
> >
> > >
> > >
> > >
> > > As a disclaimer, I am a true ant (and java) novice. Having said
> > > that, I am confronted with a weird problem in a j2ee project which
> > > fails at run time with a jndi error. After several investigations,
> > > I am now almost convinced it has to do with the build process.
> > >
> > > I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel
> > > 2.4; I am also using ant 1.5.2_23
> > >
> > > My build log file shows, for each compile target the following message:
> > >
> > > [javac] Using gcj compiler
> > >
> > > Just for kicks, I then deleted gcj as well as javac (here I mean
> > > the javac compiler executable) from my disk i.e. I renamed both of
> > > them to something else, and ant still worked and still claimed
> > > it's using gcj, which leaves me totally confused.
> > >
> > > Perhaps one hint; at the top of the log file I see the comment
> > > "detected java version 1.4 in /usr".
> > >
> > > I know this is not what I want/need (it should be 1.5), so where
> > > does it come from?
> > >
> > > I then went ahead setting the following property in my build.xml:
> > >
> > > <property name="build.compiler" value="modern"/>
> > >
> > > but this was quickly discarded:
> > >
> > > "Override ignored for property build.compiler"
> > > which basically produced the same results as described above. I am
> > > running out of ideas here.
> > >
> > > Thanks for any insights.
> > >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For
> > additional commands, e-mail: user-help@ant.apache.org
> >
>
> _________________________________________________________________
> Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> commands, e-mail: user-help@ant.apache.org
>

_________________________________________________________________
See how Windows connects the people, information, and fun that are part of your life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: what does ant really use?

Posted by Martin Gainty <mg...@hotmail.com>.
Good Evening Joseph-

what is the specific error you are getting?
which version of which AppServer are you deploying to?
if you are using EJB 2 (the default) we will need to see 
ejb-jar.xml
Any or all Java Sources (just attach every java source file that extends EJBHome)
how are you building the ear (assume either build.xml or pom.xml?)
GlassFish has a ear builder and deployer in $GLASSFISH_HOME/GlassFish/Sun/AppServer/common-ant.xml
that looks something like this:

<property name="jarDD"        value="ejb-jar.xml,sun-ejb-jar.xml"/>
  <!-- ======================================================= -->
  <!-- Assemble EJB JAR module.        OLD WAY                 -->
  <!-- ======================================================= -->
  <target name="create_ejbjar_common_old" depends="clean_ejbjar_common">
    <mkdir dir="${assemble.ejbjar}"/>
    <jar destfile="${assemble.ejbjar}/${ejbjar}">
      <zipfileset dir="${build.classesdir}/${jar.pkg}/" includes="**/*.class" 
                  excludes="**/servlet/, **/client/" prefix="${jar.pkg}"/>
      <metainf dir="${jarDD.dir}" includes="${jarDD}"/>
    </jar>
    <!-- AEM NEEDED?copy file="${assemble.ejbjar}/${ejbjar}" tofile="../${ejbjar}"/>-->
    <property name="ejbjar.done" value="true"/>
  </target>  
  <!-- ======================================================= -->
  <!-- Assemble CLIENT JAR module.        OLD WAY              -->
  <!-- ======================================================= -->
  <target name="clientjar_common" depends="clean_clientjar_common">
    <mkdir dir="${assemble.clientjar}"/>
    <jar destfile="${assemble.clientjar}/${clientjar}" manifest="${clientDD.dir}/MANIFEST.MF">
      <zipfileset dir="${build.classesdir}/${app.pkg}/" 
                  includes="**/*Client.class" excludes="**/servlet/"
                  prefix="${app.pkg}"/>
      <metainf dir="${clientDD.dir}" includes="${clientDD}"/>
    </jar>
    <property name="clientjar.done" value="true"/>
  </target>

Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> From: Joseph.Pareti@hp.com
> To: user@ant.apache.org
> Date: Sun, 12 Oct 2008 17:51:13 +0000
> Subject: RE: what does ant really use?
> 
> Yes of course I have jdk 1.5.0_02  and JAVA_HOME is set too ...
> 
> -----Original Message-----
> From: Martin Gainty [mailto:mgainty@hotmail.com]
> Sent: Saturday, October 11, 2008 11:12 PM
> To: Ant Users List
> Subject: RE: what does ant really use?
> 
> 
> it is assumed you already installed the JDK for your operating system first..then set JAVA_HOME to the folder you installed
> 
> without the JDK installation..any distro of ANT wont work
> 
> http://java.sun.com/javase/downloads/index.jsp
> 
> Martin Gainty
> ______________________________________________
> Disclaimer and confidentiality note
> Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.
> 
> 
> > From: Joseph.Pareti@hp.com
> > To: user@ant.apache.org
> > Date: Sat, 11 Oct 2008 20:14:47 +0000
> > Subject: RE: what does ant really use?
> >
> > Yes I am aware that there are symlinks, so I followed them to the point that I am almost 100% sure there was neither javac nor gcj on the system disk. So how can ant still compile? Does it have a "bundled" gcj ?
> >
> > -----Original Message-----
> > From: John5342 [mailto:john5342@googlemail.com]
> > Sent: Wednesday, October 08, 2008 11:58 AM
> > To: Ant Users List
> > Subject: Re: what does ant really use?
> >
> > If you changed the name of gcj and javac in /usr/bin they are not the actualy executables. They are only links to the real ones which in fedora (and probably RH) located in /usr/share/jvm/<java implementation>/bin/. In fedora (and again probably in RH) there is an "alternatives" application which allows you to choose which installed version of java you are using rather than renaming binaries. Should also warn you that although RH is supported longer than most and in general rock stable the software is often quite old because i happen to know that more recent versions of gcj support java 1.5. Hope this all helps you in the right direction.
> >
> > 2008/10/8 Pareti, Joseph <Jo...@hp.com>
> >
> > >
> > >
> > >
> > > As a disclaimer, I am a true ant (and java) novice. Having said
> > > that, I am confronted with a weird problem in a j2ee project which
> > > fails at run time with a jndi error. After several investigations, I
> > > am now almost convinced it has to do with the build process.
> > >
> > > I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel 2.4;
> > > I am also using ant 1.5.2_23
> > >
> > > My build log file shows, for each compile target the following message:
> > >
> > > [javac] Using gcj compiler
> > >
> > > Just for kicks, I then deleted gcj as well as javac (here I mean the
> > > javac compiler executable) from my disk i.e. I renamed both of them
> > > to something else, and ant still worked and still claimed it's using
> > > gcj, which leaves me totally confused.
> > >
> > > Perhaps one hint; at the top of the log file I see the comment
> > > "detected java version 1.4 in /usr".
> > >
> > > I know this is not what I want/need (it should be 1.5), so where
> > > does it come from?
> > >
> > > I then went ahead setting the following property in my build.xml:
> > >
> > > <property name="build.compiler" value="modern"/>
> > >
> > > but this was quickly discarded:
> > >
> > > "Override ignored for property build.compiler"
> > > which basically produced the same results as described above. I am
> > > running out of ideas here.
> > >
> > > Thanks for any insights.
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> > commands, e-mail: user-help@ant.apache.org
> >
> 
> _________________________________________________________________
> Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
> http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
See how Windows connects the people, information, and fun that are part of your life.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093175mrt/direct/01/

RE: what does ant really use?

Posted by "Pareti, Joseph" <Jo...@hp.com>.
Yes of course I have jdk 1.5.0_02  and JAVA_HOME is set too ...

-----Original Message-----
From: Martin Gainty [mailto:mgainty@hotmail.com]
Sent: Saturday, October 11, 2008 11:12 PM
To: Ant Users List
Subject: RE: what does ant really use?


it is assumed you already installed the JDK for your operating system first..then set JAVA_HOME to the folder you installed

without the JDK installation..any distro of ANT wont work

http://java.sun.com/javase/downloads/index.jsp

Martin Gainty
______________________________________________
Disclaimer and confidentiality note
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission.


> From: Joseph.Pareti@hp.com
> To: user@ant.apache.org
> Date: Sat, 11 Oct 2008 20:14:47 +0000
> Subject: RE: what does ant really use?
>
> Yes I am aware that there are symlinks, so I followed them to the point that I am almost 100% sure there was neither javac nor gcj on the system disk. So how can ant still compile? Does it have a "bundled" gcj ?
>
> -----Original Message-----
> From: John5342 [mailto:john5342@googlemail.com]
> Sent: Wednesday, October 08, 2008 11:58 AM
> To: Ant Users List
> Subject: Re: what does ant really use?
>
> If you changed the name of gcj and javac in /usr/bin they are not the actualy executables. They are only links to the real ones which in fedora (and probably RH) located in /usr/share/jvm/<java implementation>/bin/. In fedora (and again probably in RH) there is an "alternatives" application which allows you to choose which installed version of java you are using rather than renaming binaries. Should also warn you that although RH is supported longer than most and in general rock stable the software is often quite old because i happen to know that more recent versions of gcj support java 1.5. Hope this all helps you in the right direction.
>
> 2008/10/8 Pareti, Joseph <Jo...@hp.com>
>
> >
> >
> >
> > As a disclaimer, I am a true ant (and java) novice. Having said
> > that, I am confronted with a weird problem in a j2ee project which
> > fails at run time with a jndi error. After several investigations, I
> > am now almost convinced it has to do with the build process.
> >
> > I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel 2.4;
> > I am also using ant 1.5.2_23
> >
> > My build log file shows, for each compile target the following message:
> >
> > [javac] Using gcj compiler
> >
> > Just for kicks, I then deleted gcj as well as javac (here I mean the
> > javac compiler executable) from my disk i.e. I renamed both of them
> > to something else, and ant still worked and still claimed it's using
> > gcj, which leaves me totally confused.
> >
> > Perhaps one hint; at the top of the log file I see the comment
> > "detected java version 1.4 in /usr".
> >
> > I know this is not what I want/need (it should be 1.5), so where
> > does it come from?
> >
> > I then went ahead setting the following property in my build.xml:
> >
> > <property name="build.compiler" value="modern"/>
> >
> > but this was quickly discarded:
> >
> > "Override ignored for property build.compiler"
> > which basically produced the same results as described above. I am
> > running out of ideas here.
> >
> > Thanks for any insights.
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> commands, e-mail: user-help@ant.apache.org
>

_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


RE: what does ant really use?

Posted by Martin Gainty <mg...@hotmail.com>.
it is assumed you already installed the JDK 
for your operating system first..then set JAVA_HOME to the folder you installed

without the JDK installation..any distro of ANT wont work

http://java.sun.com/javase/downloads/index.jsp

Martin Gainty 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 


> From: Joseph.Pareti@hp.com
> To: user@ant.apache.org
> Date: Sat, 11 Oct 2008 20:14:47 +0000
> Subject: RE: what does ant really use?
> 
> Yes I am aware that there are symlinks, so I followed them to the point that I am almost 100% sure there was neither javac nor gcj on the system disk. So how can ant still compile? Does it have a "bundled" gcj ?
> 
> -----Original Message-----
> From: John5342 [mailto:john5342@googlemail.com]
> Sent: Wednesday, October 08, 2008 11:58 AM
> To: Ant Users List
> Subject: Re: what does ant really use?
> 
> If you changed the name of gcj and javac in /usr/bin they are not the actualy executables. They are only links to the real ones which in fedora (and probably RH) located in /usr/share/jvm/<java implementation>/bin/. In fedora (and again probably in RH) there is an "alternatives" application which allows you to choose which installed version of java you are using rather than renaming binaries. Should also warn you that although RH is supported longer than most and in general rock stable the software is often quite old because i happen to know that more recent versions of gcj support java 1.5. Hope this all helps you in the right direction.
> 
> 2008/10/8 Pareti, Joseph <Jo...@hp.com>
> 
> >
> >
> >
> > As a disclaimer, I am a true ant (and java) novice. Having said that,
> > I am confronted with a weird problem in a j2ee project which fails at
> > run time with a jndi error. After several investigations, I am now
> > almost convinced it has to do with the build process.
> >
> > I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel 2.4; I
> > am also using ant 1.5.2_23
> >
> > My build log file shows, for each compile target the following message:
> >
> > [javac] Using gcj compiler
> >
> > Just for kicks, I then deleted gcj as well as javac (here I mean the
> > javac compiler executable) from my disk i.e. I renamed both of them to
> > something else, and ant still worked and still claimed it's using gcj,
> > which leaves me totally confused.
> >
> > Perhaps one hint; at the top of the log file I see the comment
> > "detected java version 1.4 in /usr".
> >
> > I know this is not what I want/need (it should be 1.5), so where does
> > it come from?
> >
> > I then went ahead setting the following property in my build.xml:
> >
> > <property name="build.compiler" value="modern"/>
> >
> > but this was quickly discarded:
> >
> > "Override ignored for property build.compiler"
> > which basically produced the same results as described above. I am
> > running out of ideas here.
> >
> > Thanks for any insights.
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/

RE: what does ant really use?

Posted by "Pareti, Joseph" <Jo...@hp.com>.
Yes I am aware that there are symlinks, so I followed them to the point that I am almost 100% sure there was neither javac nor gcj on the system disk. So how can ant still compile? Does it have a "bundled" gcj ?

-----Original Message-----
From: John5342 [mailto:john5342@googlemail.com]
Sent: Wednesday, October 08, 2008 11:58 AM
To: Ant Users List
Subject: Re: what does ant really use?

If you changed the name of gcj and javac in /usr/bin they are not the actualy executables. They are only links to the real ones which in fedora (and probably RH) located in /usr/share/jvm/<java implementation>/bin/. In fedora (and again probably in RH) there is an "alternatives" application which allows you to choose which installed version of java you are using rather than renaming binaries. Should also warn you that although RH is supported longer than most and in general rock stable the software is often quite old because i happen to know that more recent versions of gcj support java 1.5. Hope this all helps you in the right direction.

2008/10/8 Pareti, Joseph <Jo...@hp.com>

>
>
>
> As a disclaimer, I am a true ant (and java) novice. Having said that,
> I am confronted with a weird problem in a j2ee project which fails at
> run time with a jndi error. After several investigations, I am now
> almost convinced it has to do with the build process.
>
> I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel 2.4; I
> am also using ant 1.5.2_23
>
> My build log file shows, for each compile target the following message:
>
> [javac] Using gcj compiler
>
> Just for kicks, I then deleted gcj as well as javac (here I mean the
> javac compiler executable) from my disk i.e. I renamed both of them to
> something else, and ant still worked and still claimed it's using gcj,
> which leaves me totally confused.
>
> Perhaps one hint; at the top of the log file I see the comment
> "detected java version 1.4 in /usr".
>
> I know this is not what I want/need (it should be 1.5), so where does
> it come from?
>
> I then went ahead setting the following property in my build.xml:
>
> <property name="build.compiler" value="modern"/>
>
> but this was quickly discarded:
>
> "Override ignored for property build.compiler"
> which basically produced the same results as described above. I am
> running out of ideas here.
>
> Thanks for any insights.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: what does ant really use?

Posted by John5342 <jo...@googlemail.com>.
If you changed the name of gcj and javac in /usr/bin they are not the
actualy executables. They are only links to the real ones which in fedora
(and probably RH) located in /usr/share/jvm/<java implementation>/bin/. In
fedora (and again probably in RH) there is an "alternatives" application
which allows you to choose which installed version of java you are using
rather than renaming binaries. Should also warn you that although RH is
supported longer than most and in general rock stable the software is often
quite old because i happen to know that more recent versions of gcj support
java 1.5. Hope this all helps you in the right direction.

2008/10/8 Pareti, Joseph <Jo...@hp.com>

>
>
>
> As a disclaimer, I am a true ant (and java) novice. Having said that, I am
> confronted with a weird problem in a j2ee project which fails at run time
> with a jndi error. After several investigations, I am now almost convinced
> it has to do with the build process.
>
> I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel 2.4; I am
> also using ant 1.5.2_23
>
> My build log file shows, for each compile target the following message:
>
> [javac] Using gcj compiler
>
> Just for kicks, I then deleted gcj as well as javac (here I mean the javac
> compiler executable) from my disk i.e. I renamed both of them to something
> else, and ant still worked and still claimed it's using gcj, which leaves me
> totally confused.
>
> Perhaps one hint; at the top of the log file I see the comment "detected
> java version 1.4 in /usr".
>
> I know this is not what I want/need (it should be 1.5), so where does it
> come from?
>
> I then went ahead setting the following property in my build.xml:
>
> <property name="build.compiler" value="modern"/>
>
> but this was quickly discarded:
>
> "Override ignored for property build.compiler"
> which basically produced the same results as described above. I am running
> out of ideas here.
>
> Thanks for any insights.
>

AW: what does ant really use?

Posted by Ja...@rzf.fin-nrw.de.
>I have jdk 1.5.0_02 installed on my system, x86/RHEL 3, kernel 2.4; 
>I am also using ant 1.5.2_23

1.5.2_23 sounds not like a valid Ant version.
1.5.2 would be a very old version, current is 1.7.1.
http://ant.apache.org/faq.html#history
    1.5.2 : 3 March 2003
    1.7.1 : 27 June 2008


><property name="build.compiler" value="modern"/>

Usually you dont have to specify any specific in <javac>.
Set JAVA_HOME to the location of an installed JDK (not JRE).
Have CLASSPATH empty.
Try just a <javac srcdir="" destdir=""/>.


Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org