FreeMind on Linux: Difference between revisions

From FreeMind
Jump to navigationJump to search
Line 152: Line 152:
     export PATH=$PATH:''/usr/java/j2re1.4.2_04/bin''
     export PATH=$PATH:''/usr/java/j2re1.4.2_04/bin''
     export JAVA_HOME=''/usr/java/j2re1.4.2_04''
     export JAVA_HOME=''/usr/java/j2re1.4.2_04''
(the part in italic depends on your installation)
; Note : if you've installed FreeMind from a package, you can alternatively add these two lines either to <tt>/etc/freemind/freemindrc</tt>, for all users, or to <tt>$HOME/.freemind/freemindrc</tt>, for you, so that only FreeMind is impacted (and no other program).
=== How to print from FreeMind? ===
=== How to print from FreeMind? ===



Revision as of 19:03, 30 October 2004

Installation

Java installation

FreeMind is a Java program, hence you need Java to make it work. There is the "Java runtime engine" (JRE or J2RE) required to run (use, start) FreeMind, and there is the "Java Development Kit" (JDK or J2DK) if you want to compile FreeMind.

If you don't know what compile means, then you need only the JRE. In the following lines, I will concentrate on making FreeMind run and the JRE installation.

From the distribution's RPM package

It's probably the easiest way:

  1. start the software or package installation manager of your distro (e.g. YaST under SuSE),
  2. search for java, JRE or J2RE,
  3. choose (one of) the package providing the JRE,
  4. install the chosen package (plus dependencies),
  5. and quit the software manager.

It may be that the package for Java is already installed or doesn't exist, but then the software manager will tell you. In the first case, you can install FreeMind  ; in the 2nd case, you can try the next section.

From Sun's RPM package

On Fedora Core 2 and Mandrake, it looks like there is no 'native' Java package, hence installing the one from Sun seems to be the standard procedure:

  1. go to http://java.sun.com/j2se/1.4.2/download.html
  2. click on the link Download J2SE JRE
  3. accept the license agreement if you do agree with it.
  4. Download the file marked RPM in self-extracting file
  5. unpack it (with an example filename):
   $ sh j2re-1_4_2_06-linux-i586-rpm.bin
  1. and then install the so created file as root user:
   # rpm -Uvh j2re-1_4_2_06-linux-i586.rpm

You're done (there are more detailed Instructions on the Sun page)!

Some additional notes:

  • if you plan to do some Java development, you can alternatively install the JDKpackage, it provides as well the Java runtime engine.
  • I've shown Java 1.4.2 as example, it looks like Java 1.5 aka 5.0 works as well but I haven't tested it yet, comments are welcome.
  • you can of course install and download the Linux self-extracting file (i.e. not the RPM), but that's not the recommended way, as you loose the dependency checks (and the FreeMind RPMs won't install properly).

Further RPM alternatives

  • Personally, on my SuSE 8.2 system, I have used the "Blackdown J2SDK" package from PackMan to create my own Java RPMs. It was pretty easy.
  • The JPackage Project offers as well JRE and JDK packages in the non-free section, but I haven't tried them yet.

On a Debian system

As Java isn't really free or open, there is no official Debian package for it. The procedure is hence to install java-package from the contrib section, e.g. with

   # apt-get install java-package

Read the instructions delivered with the package, and create your own little Java package(s).

On a Gentoo system

No clue, feel free to write this one yourself.

FreeMind installation

We come now to the interesting part, the installation of FreeMind itself.

All the files we speak about here, are to be downloaded from the Files section on the FreeMind Sourceforge Project Page.

On an RPM system

Download the correct RPM file from the Files section, choose the one which fits best your system:

  1. freemind-0.7.1-6.noarch.rpm for SuSE systems (tested on 8.2, 9.0 and 9.1).
  2. freemind-0.7.1-6mdk.noarch.rpm on Mandrake systems (tested on 10.0).
  3. freemind-0.7.1-6notsuse.noarch.rpm on all other systems (tested on Fedora Core 2).

(the version might change, but the release postfix should remain)

Then, as root, install the package:

   # rpm -Uvh freemind-...noarch.rpm

Done!

Note
the RPMs offered might not work with your specific system, then your best chance is to download the RPM from the same Files section and rebuild it. It's more for advanced users, so I don't go here into details. You will need the JDK and ant to be successful (have a look at man rpmbuild if you don't come further).

On a Debian system

From the Files section, download the .deb file called something like freemind_0.7.1-3_all.deb and install it as root:

   # dpkg -i freemind_0.7.1-3_all.deb

That was the hard way. The comfortable way is to add the following lines to your /etc/apt/sources.list:

   deb http://eric.lavar.de/comp/linux/freemind/ ./
   deb-src http://eric.lavar.de/comp/linux/freemind/ ./

and call as root the two following commands:

   # apt-get update
   # apt-get install freemind

(it's more comfortable because, each time you call "apt-get upgrade", you'll get automatically the new freemind package)

Note
with the second method, you can get as well the sources for the .deb package using "apt-get source freemind".

On a Gentoo system

I never used and don't plan to use Gentoo (which is most probably a wonderful distribution, but I've got enough distros running for my pleasure :-) ). Nevertheless anonymous said on some mailing list:

   Freemind is setup on portage for gentoo
   
       emerge app-misc/freemind
   
   bang 
   zap
   done

So, you know it...

On any UN*X kind of system (also Linux)

Download the file called something like freemind-bin-0_7_1.zip, create somewhere a sub-directory and unpack there the file (as normal user or root, depending where you created the sub-directory:

   $ unzip freemind-bin-0_7_1.zip
   $ chown +x freemind.sh

You're done!

Starting FreeMind

Installed from RPM or DEB package

Just type "freemind" in a console or an Alt+F2 command line, you're normally done. There should also be a menu entry under "Applications" in KDE and GNOME (under Debian, in any window manager).

Installed from ZIP file

Type the full path of the installation directory in a console or an Alt+F2 command line to start freemind.sh, e.g.:

    $ /some/directory/path/freemind.sh

You will need to create your own menu entry if you need it.

Frequently and less frequently Asked Questions

When starting FreeMind, it says "java: command not found"

It's a problem from Fedora Core, Mandrake and the Java Sun RPM, which neither add the java command to the PATH nore defines properly the variable JAVA_HOME.

Add the following two lines to one of the startup scripts (/etc/profile and/or /etc/bash.bashrc for all users, or $HOME/.profile and/or $HOME/.bashrc only for you):

   export PATH=$PATH:/usr/java/j2re1.4.2_04/bin
   export JAVA_HOME=/usr/java/j2re1.4.2_04

(the part in italic depends on your installation)

Note
if you've installed FreeMind from a package, you can alternatively add these two lines either to /etc/freemind/freemindrc, for all users, or to $HOME/.freemind/freemindrc, for you, so that only FreeMind is impacted (and no other program).

How to print from FreeMind?

At least up to version 1.4, the java runtime under Linux is using the BSD printing system (also known as the lp commands, or old lp). Most modern distributions offer the CUPS printing system, which needs a compatibility layer to work with Java:

  • Under SuSE 8.2, the package required is called cups-client
  • Under Debian, it's called cupsys-bsd.

Install this package and you should be able to print from FreeMind.

Note: it looks like Java 1.5 is supporting CUPS directly.

I get an error java.lang.NoClassDefFoundError: javax/swing/JFrame when starting FreeMind

When trying to start FreeMind from a console, you get the following error messages and FreeMind doesn't start:

./lib/freemind.jar 
java.lang.NoClassDefFoundError: javax/swing/JFrame 
at java.lang.ClassLoader.defineClass0 (ClassLoader.java) 
at java.lang.ClassLoader.defineClass (ClassLoader.java:179) 
at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:33) 
at kaffe.lang.AppClassLoader$JarSource.findClass (AppClassLoader.java:143) 
at kaffe.lang.AppClassLoader.findClass (AppClassLoader.java:291) 
at java.lang.ClassLoader.loadClass (ClassLoader.java:142) 
at java.lang.ClassLoader.loadClass (ClassLoader.java:121) 
at kaffe.jar.ExecJarName.main (ExecJarName.java:55) 
at kaffe.jar.ExecJar.main (ExecJar.java:75) 

This is because you use kaffe, which doesn't offer all features of Sun's Java. Blackdown's Java does as well work, I would have doubts on any other implementation (beside perhaps IBM's one). So, remove this Java version and install a version from Sun or Blackdown.

While installing a FreeMind package, it complains Java isn't installed, though I've installed it and Java programs do work

You've probably installed Java manually, and not from an RPM resp. DEB package. This means that the FreeMind RPM resp. DEB package can't know that Java is installed.

Three solutions (from better to worse):

  • Install Java from an RPM or DEB package and retry to install the FreeMind package.
  • Install FreeMind using the ZIP file.
  • Install the FreeMind package by ignoring the missing dependencies, e.g.:
   # rpm -Uvh -nodeps freemind....noarch.rpm

While installing a FreeMind RPM package, it complains Java isn't installed, though I've installed it from an RPM package

You've probably installed the JDK package from Sun, which provides also a JRE but doesn't say it. Your best chance is to install the dummy package j2sdk-provides-j2re-1.4.2-2.noarch.rpm. The source package is available as well.