# ShowJarContents Class After Editing

    package samples.ui.actions;

    import com.ibm.etools.systems.core.ui.actions.SystemAbstractRemoteFilePopupMenuExtensionAction;
    import com.ibm.etools.systems.subsystems.*;

    /**
     * An action that runs a command to display the contents of a Jar file.
     * The plugin.xml file restricts this action so it only appears for .jar files.
     */
    public class ShowJarContents
    	extends SystemAbstractRemoteFilePopupMenuExtensionAction
    {

    	/**
    	 * Constructor for ShowJarContents.
    	 */
    	public ShowJarContents()
    	{
    		super();
    	}

    	/**
    	 * @see com.ibm.etools.systems.core.ui.actions.SystemAbstractPopupMenuExtensionAction#run()
    	 */
    	public void run()
    	{
    		IRemoteFile selectedFile = getFirstSelectedRemoteFile();
    		String cmdToRun = "jar -tvf " + selectedFile.getAbsolutePath();
    		runCommand(cmdToRun);
    	}

    }