Marire parametri JVM in cadrul unui task ANT

Cum se pot modifica parametrii JVM la lansarea unui task ANT (7) ?

Documentatia este destul de generala si fara exemple.

Pentru cine este interesat, iata mai jos un exemplu. Vom modifica parametrul -Xmx:

<target name=”MyTargetName”>
<java classname=”packagename.MyClassName” fork=”true”>
<jvmarg value=”-Xmx1024m”/>
<classpath refid=”myRunClassPath” />
</java>
</target>

De notat ca  ‘fork=”true’ este o conditie obligatorie pentru  ‘jvmarg’. Detalii suplimentare in manualul ant dedicat sectiunii java: http://ant.apache.org/manual/CoreTasks/java.html

1 Comment »

  1. Tica2 said

    Da util, eu folosesc ceva similar pentru a compila un project in GWT.

    Exemplu:
    java classpathref=”gwt.classpath” classname=”com.google.gwt.dev.GWTCompiler” fork=”true”
    jvmarg value=”-Xmx256M”
    arg value=”-out”
    arg value=”${currentDir}/WebContent”
    arg value=”ro.website.app.ProjectName”

    Ne auzim,
    Petrica Clement Chiriac

RSS feed for comments on this post · TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: