Jump to Main Content

Crossfire Map Editor Installation - Debian Linux

Now that the Map Editor requires JRE 1.6.0, this page is now deprecated - see the updated Debian Linux page.

How to Install Java Runtime Environment v1.5.0 under Debian Linux

  1. Download Sun's JRE (v1.5.0 is recommended) from http://java.sun.com/j2se/1.5.0/jre/install.html; this will be labeled or referred to as J2SE(TM) Runtime Environment 5.0 Update on the website
  2. Select the self-extracting file for the Linux Platform and save it locally on your hard drive; you will have to accept the License Agreement before you can download the actual file
  3. Install the java-package and fakeroot with:

    sudo apt-get install java-package fakeroot

  4. Build the deb of the JRE using:

    fakeroot make-jpkg jre-1_5_0_09-linux-i586.bin

    (version may vary somewhat, depending on what you download)
  5. You should see the following output:

    Creating temporary directory: /tmp/make-jpkg.ZoaAG11216
    Loading plugins: blackdown-j2re.sh blackdown-j2sdk.sh common.sh ibm-j2re.sh ibm-j2sdk.sh j2re.sh j2sdk-doc.sh j2sdk.sh j2se.sh sun-j2re.sh sun-j2sdk-doc.sh sun-j2sdk.sh

    Detected Debian build architecture: i386
    Detected Debian GNU type: i486-linux-gnu

    Detected product:
    Java(TM) Runtime Environment (JRE)
    Standard Edition, Version 1.5.0+update09
    Sun Microsystems(TM), Inc.
    Is this correct [Y/n]: y

    Checking free diskspace: done.

    In the next step, the binary file will be extracted. Probably a license agreement will be displayed. Please read this agreement carefully. If you do not agree to the displayed license terms, the package will not be built.

    Press [Return] to continue:

    Sun Microsystems, Inc. Binary Code License Agreement

    <license agreement>
    Do you agree to the above license terms? [yes or no]

    <long list of extracted files>

    The Debian package has been created in the current directory. You can install the package as root (e.g. dpkg -i sun-j2re1.5_1.5.0+update09_i386.deb)

  6. Install the newly created .deb using:

    sudo dpkg -i sun-j2re1.5_1.5.0+update09_i386.deb

  7. You should see the following output:

    Selecting previously deselected package sun-j2re1.5.
    (Reading database ... 117014 files and directories currently installed.)
    Unpacking sun-j2re1.5 (from sun-j2re1.5_1.5.0+update09_i386.deb) ...
    Setting up sun-j2re1.5 (1.5.0+update09) ..

  8. Try Java out, see if it works using:

    java -version

  9. Your should see the following output:

    java version "1.5.0_08"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing)

  10. Also, test with this:

    dpkg -l | grep sun

  11. You should see the following output:
    ii  sun-j2re1.4      1.4.2+11                 Java(TM) 2 RE, Standard Edition, Sun Microsy
    ii  sun-j2re1.5      1.5.0+update09    Java(TM) JRE, Standard Edition, Sun Microsys
    ii  sun-java5-bin  1.5.0-08-1              Sun Java(TM) Runtime Environment (JRE) 5.0
    ii  sun-java5-jre   1.5.0-08-1              Sun Java(TM) Runtime Environment (JRE) 5.0
  12. Got java working?
    Then download the Crossfire Map Editor
  13. Save the editor (it's the .jar file) in an easy to access location
  14. Launch the editor using the following command:

    java -jar CrossfireEditor.jar

    If you have enough memory, it is recommended to run the editor with a higher maximum memory size, like 128 Mb:

    java -jar -Xmx128m CrossfireEditor.jar

    (Note that in this way, the editor won't *always* use 128 Mb. It will only use that much when it is required.)

    For larger machines, explicitely requesting a client type VM can significantly speedup the map editor, so consider using -client

    java -jar -client CrossfireEditor.jar

Special Instructions

NOTE: If you recently upgraded your Java JRE or having problems launching the editor, or would like to specify a particular version of Java, run this command:

update-alternatives --config java

Follow the instructions that appear:
NOTE: actual output, contents and options will vary, you'll want to use: /usr/lib/j2re1.5-sun/bin/java

There are 6 alternatives which provide `java'.

  Selection    Alternative
          1    /usr/lib/j2re1.4-sun/bin/java
*         2    /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
          3    /usr/bin/gij-wrapper-4.0
 +        4    /usr/lib/jvm/java-gcj/jre/bin/java
          5    /usr/bin/gij-wrapper-4.1
          6    /usr/lib/j2re1.5-sun/bin/java
Press enter to keep the default[*], or type selection number: 6
Using `/usr/lib/j2re1.5-sun/bin/java' to provide `java'.

Then try launching the editor again.