Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

Eclipse Workbench User Guide
Previous Page Home Next Page

Stand-alone external tools

For the ultimate in external tool flexibility, create a 'stand-alone' external tool launch configuration. This is similar to the project builder launch configurations discussed in the last section, except that it need have nothing to do with project building, and you can explicitly run it whenever you choose. Suppose you wanted to have a way to quickly see the contents of a .jar file in your workspace using the jar utility.

  1. Select some .jar file in your workspace.
  2. Select Run > External Tools > Open External Tools Dialog... from the workbench toolbar.

    External tools drop-down menu

  3. Select Program in the tree, then click New.

    External tools dialog for jar inspector script

  4. Name the launch configuration jar inspector.
  5. Use the first Browse File System... button to locate the jar executable.
  6. In the Arguments field, type -tvf and a space, then click Variables....
  7. In the Select Variable dialog, you will see a number of variables you can pass as arguments to the program specified in Location. Select resource_loc and click OK.
  8. When this buildfile is run, the absolute path of the resource selected in the workbench will be passed to the jar utility in the position specified.
  9. Click Run.
  10. Notice that the buildfile sends the jar utility output to the Console view .
  11. Select a different .jar file in your workspace.
  12. Click the External Tools button in the toolbar. Notice the contents of this jar are sent to the Console view as well. Now you have a quick and easy way to see the output of the jar utility for any .jar file in your workspace.

This example has only scratched the surface of what you can do with external tools. The important things to remember are that you can create an external tool for anything you can run on your system, and that you can pass arguments to the external tool related to the current workbench selection. In many cases, this allows you to loosely integrate tools that do not have corresponding Eclipse plug-ins.

Related tasks
Creating Ant buildfiles
Editing Ant buildfiles
Saving & Reusing Ant options
Running Ant buildfiles
Creating a project builder Ant buildfile
Ant buildfiles as project builders
Executing project builders
External tools
Non-Ant project builders


 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire