areca-backup

Areca Backup - Launchers

Context

Areca is a desktop application developed with Java technology. Java requires specific information to know how to execute a program. Launchers simplify the process of starting Areca for the user.

Areca can run in graphical mode or text mode.

Binaries for Windows

Areca 7.5 binaries may not work with current versions of the JRE (or JDK). New binaries (areca.exe and areca_cl.exe) can be generated from areca-backup-native repo.

Scripts for Windows

It might be a better option to use scripts instead of binaries. For example, they are inspectable and customizable.

Scripts for Linux

Requirements to Launch Areca

Either the JRE (Java Runtime Environment) or the JDK (Java Development Kit) is required. See Java providers.

You must call either javaw (GUI) or java (GUI or TUI) and provide the following details:

  1. Initial RAM allocation (64 MB by default: -Xmx1024m).
  2. Maximum assignable RAM (1024 MB by default: -Xms64m).
  3. Classpath (-cp "<CLASSPATH>"), which includes paths to:
    • license file,
    • libraries (including areca.jar and the platform-specific SWT),
    • translations, and
    • fwk.properties
  4. Absolute path to Areca (-Duser.dir="<ARECA_DIRECTORY>")
  5. Path to dependencies (-Djava.library.path="<LIBRARY_PATH>")
  6. Java class that initializes Areca (e.g., GUI or TUI) -Djava.system.class.loader=com.application.areca.impl.tools.ArecaClassLoader <FIRST_COMMAND_LINE_ARGUMENT>
  7. Command-line arguments, if any

    There is additional logic primarily aimed at configuring this data, such as locating a JRE or JDK.

    java
       -Xmx1024m
       -Xms64m
       -cp "<CLASSPATH>"
       -Duser.dir="<ARECA_DIRECTORY>"
       -Djava.library.path="<LIBRARY_PATH>"
       -Djava.system.class.loader=com.application.areca.impl.tools.ArecaClassLoader <INITIAL_JAVA_CLASS_ARGUMENT>
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
    

    to allow to attach an IDE’s debugger to an already running instance of Areca you need to add this -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=<DEBUG_ADDRESS>:<DEBUG_PORT> to the former code snippet so it would look like this

    java
       -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=<DEBUG_ADDRESS>:<DEBUG_PORT>
       -Xmx1024m
       -Xms64m
       -cp "<CLASSPATH>"
       -Duser.dir="<ARECA_DIRECTORY>"
       -Djava.library.path="<LIBRARY_PATH>"
       -Djava.system.class.loader=com.application.areca.impl.tools.ArecaClassLoader <INITIAL_JAVA_CLASS_ARGUMENT>
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
       "<OPTIONAL_COMMAND_LINE_ARGUMENT>"
    

    Note: Type the snippets on a single line, or add ^ (for Windows) or \ (for Linux) to the end of each line except the last to split the command into multiple lines.

Keep the same changes and fixes in the following pair of files:

While the areca_run.* scripts contain this logic, the areca.* and areca_cl.* scripts pass any command-line arguments to areca_run.* and specify the Java class to initialize Areca.

The binary launchers (.exe) do not include areca_run.exe, as both areca.exe and areca_cl.exe already contain all the aforementioned logic, and can also display an icon to represent them. Scripts (bat and sh) do not display icons; to show an icon, create a shortcut to them and associate an icon with it.

Relevant classes