• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ANT Complilation Issue

 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

When I am compiling my project through IntellijIDEA it's compiling successfuly. I written ANT script to compile the code and I have supplied all my lib directory to my ANT but It is not working properly, the errors are like,
1)Class Unknown Exception (java.util.regex.Matcher)
2) Out of memory. Incrase the Maximu heap size (I have already increased in my IDEA but still..)
I wonder why ANT is not picking up all *.jar files from lib directory?

Build.xml
---------

<?xml version="1.0" encoding="UTF-8"?>

<!--Author Sirish Kumar-->
<!--Draft version of ANT Script-->

<project name="TradeWeave" default="compile" basedir=".">
<property name="src" location="SRC"/>
<property name="build-dir" location="SRC/debug"/>
<property name="runtime-libs" location="classes"/>
<property name="was-deployment-dir" location="C:\Program Files\WebSphere\AppServer\installedApps\server1"/>
<property name="server-deployment-dir" location="C:\"/>

<!--First Target:: init-->

<target name="init" description="Initialize the project environment">
<path id="project.class.path">
<pathelement path="${java.class.path}/"/>
<pathelement location="${build-dir}"/>

<fileset dir="${runtime-libs}">
<include name="**/*.jar"/>
<include name="**/*.zip"/>
</fileset>
</path>
<tstamp>
<format property="today" pattern="ddMMyy" locale="en"/>
</tstamp>
</target>

<!--Second Target:: clean-->

<target name="clean" depends="init" description="Delete the contents of the build directory">
<delete dir="${build-dir}"/>
<delete>
<fileset dir="." includes="**/*.war"/>
</delete>
</target>

<!--Third Target:: compile-->

<target name="compile" depends="init">
<mkdir dir="${build-dir}"/>
<!--<copy preservelastmodified="false" todir="${build-dir}/">-->
<!--<fileset includes="*.*" dir="${runtime-libs}"/>-->
<!--</copy>-->
<javac
bootclasspath="${runtime-libs}/rt.jar"
target="1.2"
source="1.2"
includeJavaRuntime="false"
includeAntRuntime="false"
debug="yes"
destdir="${build-dir}">
<classpath refid="project.class.path"/>
<src path="${src}"/>
</javac>
</target>
</project>

Any idea or help please,

Thanks in Advance!
Sirish
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) That class was introduced in Java 1.4, yet your Ant task is set to compile using Java 1.2.
2) Did you increase the memory when calling Ant?
 
Sirish Kumar Gongal Reddy
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jeanne,

You are right I have not updated my rt.jar file in my runtime-lib dir. but my Intellij using 1.4 as project JDK. I'll update the .jar file.

If come to the Virtual memory size Yes I am setting VM size = 512 in <javac> target it self. no I resloved VM memory issue.

Jeanne,
I have posted one issues that I need to start and stop WebSphere through <exec> but I am facing some problmes do you have any snippet for this. I'll help me a lot.

Many Thanks!


Best Regards,
Sirish
 
Jeanne Boyarsky
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Sirish Kumar GongalReddy:
If come to the Virtual memory size Yes I am setting VM size = 512 in <javac> target it self. no I resloved VM memory issue.


Right. My suspicion is that it is Ant itself that is running out of memory, not javac. When you call the Ant command itself, you can pass arguments to set more memory.

Originally posted by Sirish Kumar GongalReddy:
I have posted one issues that I need to start and stop WebSphere through <exec> but I am facing some problmes do you have any snippet for this. I'll help me a lot.


See my reply in that thread. Keeping one issue in one thread helps people follow it when they have that problem in the future.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic