starbeast analisis not launched when used java -jar instead of /bin/beast

158 views
Skip to first unread message

Andrés Parada

unread,
Jun 13, 2018, 7:04:19 PM6/13/18
to beast-users
Dear all, 


I am trying to use a specific java (the one provided with the download) for an analysis running on a cluster but I found that even in a Desktop machines the combination of launching beast through java -jar + starbeast2 doesn't seem to work.
I must add, a simple analysis with one gene runs with either /bin/beast, java -jar  or ./jre1.8.0_161/bin/java   -jar . Any of the three options run.

For this analysis, I started to step up everything in a Desktop machine.
I added the starbeast2  package with

./bin/packagemanager -add starbeast2  

I tried to add it with

./jre1.8.0_161/bin/java  -cp  ./lib/beast.jar beast.util.AddOnManager

But I got this error

Error: Could not find or load main class beast.util.AddOnManager


When I try to run the xmleither giving the path of the java jre or just the java already installed on the machine I get this error

 ./jre1.8.0_161/bin/java   -jar ./lib/beast.jar demo.xml 

Random number seed: 1528930050464
File: demo.xml seed: 1528930050464 threads: 1
Error 1017 parsing the xml input file
Class could not be found. Did you mean beast.evolution.speciation.SpeciesTreePrior?
Error detected about here:
  <beast>
      <run id='mcmc' spec='MCMC'>
          <state id='state'>
              <stateNode id='Tree.t:Species' spec='starbeast2.SpeciesTree'>

When I run  

./bin/beast demo.xml 

It runs fine.

Please find attached a file I used to recreate the error.

I am using Ubuntu 16.04, the latest beast2 and starbeast2 add on.

Thanks for your help

Cheers
demo.xml

Remco Bouckaert

unread,
Jun 13, 2018, 7:21:01 PM6/13/18
to beast...@googlegroups.com
Hi Andre,

BEAST v2.5.0 does not automatically load packages any more, unless started via BeastLauncher. With java 8, you can make it load packages using the -Dbeast.load.jars=true directive, like so:

./jre1.8.0_161/bin/java -Dbeast.load.jars=true -jar ./lib/beast.jar demo.xml 
Cheers,
Remco

--
You received this message because you are subscribed to the Google Groups "beast-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beast-users...@googlegroups.com.
To post to this group, send email to beast...@googlegroups.com.
Visit this group at https://groups.google.com/group/beast-users.
For more options, visit https://groups.google.com/d/optout.
<demo.xml>

Andrés Parada

unread,
Jun 13, 2018, 8:20:01 PM6/13/18
to beast...@googlegroups.com
Thanks! I didn't know about this change, it worked fine now.

Cheers,

A
--

Postdoctoral Associate

Instituto de Cs Ambientales y Evolutivas
Universidad Austral de Chile
Campus Isla Teja s/n
Valdivia, Chile
Reply all
Reply to author
Forward
0 new messages