Specifying bamboo agent home generates Java error

Using the following command:

C:\Windows\SysWOW64\java -Dbamboo.home=C:\bamboo-agent-home -jar .\atlassian-bamboo-agent-installer-5.6.0.jar http://bamboo.url:8085/agentServer start

gives the error

Error: Could not find or load main class .home=C:\bamboo-agent-home

From Java and Atlassian docs this seems to be the correct command:

https://docs.oracle.com/javase/7/docs/technotes/tools/windows/java.html
https://confluence.atlassian.com/display/BAMBOO/Additional+remote+agent+options
https://confluence.atlassian.com/display/BAMBOO/Moving+Bamboo-Home+of+an+agent

We are not Java developers so it is not clear how to resolve the problem (my guess is that if we were, the answer would be obvious). Your assistance is requested.

4 answers

1 accepted

The problem appears to be that Windows Powershell multilates "java -Dbamboo.home=<somedir> -jar <etc>" somehow. Using the regular Windows command line works fine.

1 votes

Russel 

Output from your command suggests there's a space or some other separator right after 

C:\Windows\SysWOW64\java -Dbamboo 

I'm not sure how you executing this command. Do you type this in from command line or run from a batch file? 

May I please ask you to type this command in from the command line (do not copy-paste)? Does it work? If it does then you batch file might contain some unprintable characters (result of copy-paste?) which confuse command line interpreter.

I did originally type the command on the command line, but to date I have been copying and pasting to the command line. I tried typing the command in full as you suggested and got the original ".home" related error.

0 votes

Hello Russell,

Thank you for your question.

Could you please inform what Java SDK have you installed by running the following command from Command Prompt:

java -version
 
which java

Kind regards,
Rafael P. Sperafico
Atlassian Support

"java -version" provides java version "1.7.0_72" Java(TM) SE Runtime Environment (build 1.7.0_72-b14) Java HotSpot(TM) 64-Bit Server VM (build 24.72-b04, mixed mode) and "C:\Windows\SysWOW64\java -version" provides java version "1.7.0_71" Java(TM) SE Runtime Environment (build 1.7.0_71-b14) Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)

0 votes

Hello Russell,

It seems you have two Java installed on your Windows box.
If you run the following command you will be able to check under which path your "java -version" is running from:

which java

The above should display the same information as the following command:

echo %JAVA_HOME%

Please, make sure you are pointing to your Java SDK instead of JRE installation directory.

Kind regards,
Rafael P. Sperafico
Atlassian Support

"which java" doesn't work in Windows. Sometimes "where java" does. I have a 64 bit system so I installed 64bit JDK for the Bamboo agent, but an application that it is to be as part of a job is 32 bit and requires Java so I also had to installed a 32 bit JRE. Hence the multiple Java installations.

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,064 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot