Exporting jar using the absences API
Hello,
I would like to export(to jar) my little program which I have written using the RTC plain Java APIs and some interfaces from rsjazz to manage absences(https://rsjazz.wordpress.com/2014/07/22/manage-scheduled-absences-using-the-plainjava-client-libraries/). Everytime I export it and try to run it, it doesn't work, so my question is, what do I have to do, what is the problem. It always throws a class not found expection when i try to run the exported jar from the console. But when I run it in Rational Team Concert everything works fine.
Thanks in advantage.
Nicolai Helldorff
|
One answer
The likelihood is that the jar you exported only contains the classes you created in your application and you aren't providing the RTC API (and potentially; Eclipse etc.) classes when you run the jar outside of the RTC Eclipse client. In order to run a Java application it must have access to all the classes it needs at run-time so you'll need to add the jars you use to build the application to the Java class path (via the -cp switch).
Comments
nhelldorff
commented Jul 13 '16, 3:44 a.m.
When I try to export it as runnable jar file, it copies all needed libaries. The program is about 50 Megabyte big.
Exception:
IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType I never succeeded to create a runnable. I always use the other option and then I run it like this:
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.