| Summary: | IShellService.runCommand fails with SSH | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Tools] Target Management | Reporter: | Lothar Werzinger <lothar> | ||||||
| Component: | RSE | Assignee: | Martin Oberhuber <mober.at+eclipse> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Martin Oberhuber <mober.at+eclipse> | ||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 1.0 | ||||||||
| Target Milestone: | 1.0 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Lothar Werzinger
Can you provide some sample test code that exercises IShellService.runCommand -- a bit simpler than your code in bug 158786#c6 ? It might help to look at org.eclipse.rse.examples.tutorial/samples.ui.actions/ShowJarContents.java which works fine through ssh too (with examples installed, use UI action "Show Contents" on a jarfile) Created attachment 52437 [details]
test case
Copy the attached java file into the example plugin and add the following action to the plugin.xml
<extension point="org.eclipse.rse.ui.popupMenus">
<objectContribution id="actions.jar"
typecategoryfilter="files"
typefilter="file"
namefilter="*.jar">
<action id="actions.jar.show"
enablesFor="1"
label="Show contents (2)"
tooltip="List contents of this file"
class="samples.ui.actions.CopyOfShowJarContents">
</action>
</objectContribution>
</extension>
depending on how you compile the java file (set the if to true or false) you get:
output with runCommand ...
Last login: Fri Oct 20 14:56:35 2006 from 172.16.92.1
lothar@janus:~$
output with launchShell+writeToShell ...
Last login: Fri Oct 20 14:58:32 2006 from 172.16.92.1
lothar@janus:~$ jar -tvf /home/lothar/workspace/tradescapeAPI/lib/java-stubs.jar lothar@janus:~$ jar -tvf /home/lothar/workspace/tradescapeAPI/lib/java-stubs.jar
0 Thu Oct 12 00:11:20 PDT 2006 META-INF/
106 Thu Oct 12 00:11:18 PDT 2006 META-INF/MANIFEST.MF
...
lothar@janus:~$
Created attachment 52438 [details] helper class needed by previous attachment copy this helper class into the same directory as attachment https://bugs.eclipse.org/bugs/attachment.cgi?id=52437 Ah, I see. Its marked as TODO in SshShellService.runCommand(). Should be easy to fix - surprising that it works ok with dstore. Decreasing severity to NORMAL since there is a workaround (use launchShell() + writeToShell()) Fix ssh remote cmd invocation and environment variable setup according to API: SshHostShell, SshShellService [target cleanup] 1.0 RC3 was the original target milestone for this bug |