It's all about the answers!

Ask a question

Could not find or load main class WorkshopSetup.jar


Vikash Singh (421965) | asked Feb 16 '15, 5:17 a.m.

Hi Friends,

     I am trying to install rtc in local system and try to do Rational Team Concert Extensions Workshop from https://jazz.net/library/article/1000 Now I am try to run WorkshopSetup.bat file. But when I run this file it will show the error "Could not find or load main class WorkshopSetup.jar" I also check all the path, but error is same.

2 answers



permanent link
Ralph Schoon (61.5k33643) | answered Feb 16 '15, 5:47 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Since so many users have done this without problems I doubt the workshop is broken. I have seen something similar recently, where the user had an odd JRE active. Did you follow the steps and installed in the correct relative location to your Eclipse client?

Comments
Vikash Singh commented Feb 16 '15, 6:19 a.m.

I installed JRE in C:\Program Files and changed the  WorkshopSetup.bat file content.

I also copied the JDK into eclipse client too and got the same issue.


Ralph Schoon commented Feb 16 '15, 6:28 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

You do not copy any JRE into the Eclipse client. There is a JDK already there that is supposed to be used.
Please follow the install instructions to get this working.


permanent link
Drew Payette (111) | answered Jun 08 '15, 4:50 p.m.
What version of RTC were you using? I'm now using 5.0.2 and I've run into the same problem, it (seems) to have stemmed from how I installed RTC. I went through the instructions with the download (from Jazz.net) and am now trying to run the labs. My install the paths to the JDK are different and the WorkshopSetup.bat had to be edited.

*JAVA_HOME had to be changed to ..\TeamConcert\jdk


 However I don't know the root cause of the  'Error: Could not find or load main class WorkshopSetup.jar' error. It's there. I don't know exactly what the .bat file is trying to do to to track the root cause of this...

@Ralph do you have any thoughts or should I just start over using the installation instructions provided specifically for the labs?

Comments
Ralph Schoon commented Jun 09 '15, 2:15 a.m. | edited Jun 09 '15, 2:15 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The workshop mentions that if you deviate from the structure, you might need to adjust for it. It shows the bat file and you can open it with an editor.

I would recommend to go with the instructions, if you are a beginner, because that is the easiest. If you don't, you get issues and if you don't know how to solve them, you are stuck. I have run the workshop with 5.0 and 5.0.1 as per the instructions to test it works. I would assume it works with 5.0.2 too.

There is no magic in there. It basically sets the JAVA_HOME to a location relative to its install folder: set JAVA_HOME=..\TeamConcert\jazz\client\eclipse\jdk
If you install differently and need another path, just change that.
It also needs the Plain Java API and sets a path to it. It assumes the install matches the instructions. If not, change that too.
It defines the public URI and the admin user.
Then it runs java -jar to execute.


Ralph Schoon commented Jun 09 '15, 2:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

This is how the batch file looks like:

set JAVA_HOME=..\TeamConcert\jazz\client\eclipse\jdk
set PLAIN_JAVA=../PlainJavaAPI
set REPOSITORY="https://localhost:9443/ccm"
set USERID="myadmin"
set PASSWORD="myadmin"

%JAVA_HOME%\jre\bin\java -jar -Djava.ext.dirs=%PLAIN_JAVA%;%JAVA_HOME%/jre/lib/ext -cp %PLAIN_JAVA% WorkshopSetup.jar %REPOSITORY% %USERID% %PASSWORD%
pause

Your answer


Register or to post your answer.