Exporting jar using the absences API
![](http://jazz.net/_images/myphoto/79069b6c8ed7dcc4fc68198e5d9a64bc.jpg)
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
![](http://jazz.net/_images/myphoto/79069b6c8ed7dcc4fc68198e5d9a64bc.jpg)
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
![](http://jazz.net/_images/myphoto/79069b6c8ed7dcc4fc68198e5d9a64bc.jpg)
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
IllegalArgumentException: The type name Contributor and the namespace URI com.ibm.team.repository do not resolve to an IItemType
![](http://jazz.net/_images/myphoto/e5e63d5878217b64611c1df9401b7cd3.jpg)
I never succeeded to create a runnable. I always use the other option and then I run it like this:
set JAVA_HOME=..\TeamConcert\jazz\client\eclipse\jdk
set REPOSITORY="https://localhost:9443/ccm"
set USERID="myadmin"
set PASSWORD="myadmin"
set PLAIN_JAVA=../PlainJavaAPI
%JAVA_HOME%\jre\bin\java -Djava.ext.dirs=%PLAIN_JAVA%;%JAVA_HOME%/jre/lib/ext -cp %PLAIN_JAVA% -jar WorkshopSetup.jar %REPOSITORY% %USERID% %PASSWORD%
pause