Skip to content

Command Line Options

parg edited this page May 25, 2020 · 22 revisions

Running BiglyBT from the command line

Windows

Start a 'command prompt' by searching for and running 'cmd.exe'.

Change directory into wherever you have installed BiglyBT, usually

cd "C:\Program Files\BiglyBT"

or

cd "C:\Program Files (x86)\BiglyBT"

Type in the following to try and run BiglyBT:

java -cp "BiglyBT.jar;commons-cli.jar;swt.jar" com.biglybt.ui.Main

If that reports an error regarding finding java then see if you have a Java runtime installed in either C:\Program Files\Java or C:\Program Files (x86)\Java, for example C:\Program Files\Java\jre1.8.0_231

If so then replace 'java' with a full path, in this example

"C:\Program Files\Java\jre1.8.0_231"\bin\java -cp "BiglyBT.jar;commons-cli.jar;swt.jar" com.biglybt.ui.Main

If you can't find a Java installation then you can go to http://java.com/ and install Java. Then repeat the above steps to locate the runtime and set the correct path.

Once you have that working you can save the command line into a batch file, say run.bat, and use that to start BiglyBT.

OSX

You can start BiglyBT from a script using the following:

#! /bin/bash

BIGLYBT=/Applications/BiglyBT/.biglybt

java -XstartOnFirstThread -cp $BIGLYBT/BiglyBT.jar:$BIGLYBT/commons-cli.jar:$BIGLYBT/log4j.jar:$BIGLYBT/swt.jar -Duser.dir=$BIGLYBT com.biglybt.ui.Main

Unfortunately this won't handle a restart correctly, it will restart BiglyBT via BiglyBT.app

System Properties

System Properties are set by using the -D<name>=<value> JVM command line parameters. You can use 'biglybt.' in place of 'azureus.' in property names.

Some of the more useful ones are

  • azureus.config.path: string - folder where BiglyBT configuration data is stored
  • azureus.instance.port: integer - port used to communicate between instances
  • MULTI_INSTANCE: boolean - allows multiple instances of BiglyBT to run when set to true

Making system properties permanent

Windows

If you want to continue to launch BiglyBT via BiglyBT.exe but supply some properties then you need to create and edit a file in %APPDATA%\BiglyBT called 'java.vmoptions'. Add a line for each property you want to set, for example

-DMULTI_INSTANCE=true

Java Options

These can be added to the command line as well to specify such things as maximum JVM memory size. Here's an example that set the maximum memory to 800MB:

java -Xmx800m -cp "BiglyBT.jar;...

Running Multiple BiglyBT Instances

On Windows copy everything from wherever BiglyBT is installed (e.g. C:\Program Files\BiglyBT) into a separate folder - say "C:\BiglyBT2"

Then create a .bat file in this folder (say run.bat) with contents

java -cp "BiglyBT.jar;commons-cli.jar;swt.jar" -Djava.library.path="C:\BiglyBT2" -Duser.dir="C:\BiglyBT2" -Dazureus.config.path="C:\BiglyBT2" -DMULTI_INSTANCE=true com.biglybt.ui.Main

and run this (obviously you need to replace "C:\BiglyBT2" in that command line with wherever you have selected)

If this doesn't work then open up a command prompt (run cmd.exe from the start menu), use the 'cd' command to switch into the folder where you've set things up (cd C:\BiglyBT2 in this example) and then run the .bat file directly. You should get some diagnostics indicating what went wrong. One thing to watch out for is spaces in the folder name - if you decided to name the folder "C:\BiglyBT 2" then you will need to ensure you have quotes around it wherever it appears in the command line.

Console UI

By default launching from the command line will enable the SWT graphical user interface. To launch the console user interface append the option

--ui="console"

to the end of the command line.

Portable BiglyBT

It is possible to install and run BiglyBT from an arbitrary location whilst also permitting a change in drive path - particularly useful for USB based setups. Currently this is only available for Windows. There is documentation elsewhere on the web on how to do this but in particular https://github.com/BiglySoftware/BiglyBT/issues/1649 should be of help.

Download BiglyBT

Clone this wiki locally