It's all about the answers!

Ask a question

Linux: Execute JAR files from the RTC Build Result view?


Jim Tykal (166106) | asked Mar 24 '10, 6:40 p.m.
JAZZ DEVELOPER
Running RTC 2.0.0.2iFix1. One of my projects creates an executable JAR file as a build result.

In the Windows environment, I can view the Build Result in RTC, and execute the JAR file from the Downloads tab just by double-clicking it.

In Linux, the same procedures opens the JAR file in the Archive Manger. I have changed to default file association in the file browser so that JAR files open using the Sun Java 6 Runtime when I double-click. This is working fine. How can make the same association from inside the RTC Build Result window?

Thanks!
Jim

2 answers



permanent link
Nick Edgar (6.5k711) | answered Mar 31 '10, 4:33 p.m.
JAZZ DEVELOPER
The Open action on a download first fetches the file to a temporary file, then tries to open it with an appropriate 'editor'.

It first checks if there's a file association for the file (check Window > Preferences > General/Editors/File Associations for a *.jar entry). If it doesn't find one, but it sees that an external program can handle it, it delegates to that. If not, no external program can be found, it opens it as a text file.

I'm not sure why the file manager honours your mapping but RTC/Eclipse does not (assuming you don't have a file assocation for *.jar in RTC). Maybe there's a lower level OS setting. If you launch the jar directly from a shell, which way does it go?

permanent link
Jim Tykal (166106) | answered Mar 31 '10, 5:37 p.m.
JAZZ DEVELOPER
Thanks for the response, Nick. I did get this working after some lengthy trial and error. While the File Manager honored the mapping, RTC/Eclipse did not. The solution was to explicitly create a file association in the RTC/Eclipse client as follows:

Window > Preferences > General > Content Types > File Associations
I created an association between *.jar files and the following command:
/opt/IBM/jazz/client/eclipse/jdk/bin/javaw"

Problem solved. Thanks again for the response.

The Open action on a download first fetches the file to a temporary file, then tries to open it with an appropriate 'editor'.

It first checks if there's a file association for the file (check Window > Preferences > General/Editors/File Associations for a *.jar entry). If it doesn't find one, but it sees that an external program can handle it, it delegates to that. If not, no external program can be found, it opens it as a text file.

I'm not sure why the file manager honours your mapping but RTC/Eclipse does not (assuming you don't have a file assocation for *.jar in RTC). Maybe there's a lower level OS setting. If you launch the jar directly from a shell, which way does it go?

Your answer


Register or to post your answer.