You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by al...@apache.org on 2007/09/15 11:22:59 UTC

svn commit: r575895 - in /jakarta/jmeter/trunk: build.xml eclipse.readme xdocs/changes.xml

Author: alf
Date: Sat Sep 15 02:22:58 2007
New Revision: 575895

URL: http://svn.apache.org/viewvc?rev=575895&view=rev
Log:
Add Ant target for running JMeter GUI from the jar files that are made.

Modified:
    jakarta/jmeter/trunk/build.xml
    jakarta/jmeter/trunk/eclipse.readme
    jakarta/jmeter/trunk/xdocs/changes.xml

Modified: jakarta/jmeter/trunk/build.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=575895&r1=575894&r2=575895&view=diff
==============================================================================
--- jakarta/jmeter/trunk/build.xml (original)
+++ jakarta/jmeter/trunk/build.xml Sat Sep 15 02:22:58 2007
@@ -704,6 +704,16 @@
   depends="compile-core,compile-components,compile-functions,compile-protocols,compile-rmi,compile-monitor,compile-junit,compile-jms,compile-report"
   description="Compile everything."/>
 
+  <target name="run_gui" depends="package" description="Run the JMeter GUI off the jar files">
+    <java classname="org.apache.jmeter.NewDriver" fork="true">
+      <classpath>
+        <pathelement location="${dest.jar.jmeter}/ApacheJMeter.jar"/>
+        <path refid="classpath"/>
+      </classpath>
+      <sysproperty key="jmeter.home" value="${basedir}"/>
+    </java>
+  </target>
+	
   <target name="package" depends="compile, package-only"
      description="Compile everything and create the jars"/>
   

Modified: jakarta/jmeter/trunk/eclipse.readme
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/eclipse.readme?rev=575895&r1=575894&r2=575895&view=diff
==============================================================================
--- jakarta/jmeter/trunk/eclipse.readme (original)
+++ jakarta/jmeter/trunk/eclipse.readme Sat Sep 15 02:22:58 2007
@@ -22,6 +22,28 @@
   compile-rmi - compiles the RMI files that Eclipse ignores
   package-only - creates the jars
   package - compiles everything and then packages it
+  run_gui - compiles, packages, and then start the JMeter GUI from the jars
+
+Invoking Ant targets inside Eclipse
+----------------------------------
+You can use the "Run As --> Ant Build" and select target, or you can use
+the "Windows->Show View->Ant View". Then select the "build.xml" file and
+drag and drop to the "Ant View".
+Now you can invoke targets by clicking on them.
+Note that if you invoke for example the "compile" target, and get error
+messages about 
+"
+Unable to find a javac compiler;
+com.sun.tools.javac.Main is not on the classpath.
+Perhaps JAVA_HOME does not point to the JDK
+"
+it just means that your Eclipse project is set up with JRE libraries instead of JDK libraries.
+The suggested fix is to add a JDK in "Window->Preferences->Java->Installed JREs".
+Then do a "Project->Properties" and select "Java Build Path" in the left pane, and then
+select the "Libraries" tab in the right pane. Scroll to the bottom, select the "JRE System Library",
+and click "Remove". Then click "Add library..." , select "JRE System Library", and then select
+the JDK. Now it should work when you invoke the "compile" target.
+
 
 Finishing the build using Ant
 -----------------------------
@@ -38,6 +60,10 @@
 
 Launching from Eclipse
 ----------------------
+
+You can use the Ant target run_gui to run the JMeter GUI, or you can follow the instructions
+below to add a Java Application launch, which will for example, allow you to use the debugger to
+run JMeter.
 
 These instructions assume you have configured Eclipse to use the classpath
 as suggested in eclipse.classpath, and have run "ant package" to compile

Modified: jakarta/jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=575895&r1=575894&r2=575895&view=diff
==============================================================================
--- jakarta/jmeter/trunk/xdocs/changes.xml (original)
+++ jakarta/jmeter/trunk/xdocs/changes.xml Sat Sep 15 02:22:58 2007
@@ -36,7 +36,7 @@
 
 <h4>Improvements</h4>
 <ul>
-<li></li>
+<li>Add run_gui Ant target, to package and then start the JMeter GUI from Ant</li>
 </ul>
 
 <!--  ===================  -->



---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org