LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Defining Java environment variables - getting Freeplane to work (https://www.linuxquestions.org/questions/linux-software-2/defining-java-environment-variables-getting-freeplane-to-work-767154/)

jefm 11-05-2009 04:27 PM

Defining Java environment variables - getting Freeplane to work
 
I've been using Freemind for a while, thought I'd try it's fork, Freeplane.
http://sourceforge.net/projects/freeplane/
I'm on Debian Lenny. After some messing around, I got Java to go, verified at javatester.org.
But Freeplane does not fire up:
Code:

jeffm@jeffm-wks1:~/down/freeplane/freeplane-1.0.33$ ./freeplane.sh
ERROR:  Your Java is not a derivative from Sun's code,
        =======================================
        FREEMIND WILL MOST PROBABLY *NOT* WORK,
        =======================================
        define JAVACMD, JAVA_BINDIR, JAVA_HOME or PATH
        in order to point to such a VM.
        See the manpage of freeplane(1) for details.
Knopflerfish OSGi framework, version 4.1.10
Copyright 2003-2009 Knopflerfish. All Rights Reserved.

See http://www.knopflerfish.org for more information.
Loading xargs file /home/jeffm/down/freeplane/freeplane-1.0.33/props.xargs
Loading xargs file /home/jeffm/down/freeplane/freeplane-1.0.33/init.xargs
Installed and started: reference:file:/home/jeffm/down/freeplane/freeplane-1.0.33/plugins/org.freeplane.plugin.svg (id#1)
Installed and started: reference:file:/home/jeffm/down/freeplane/freeplane-1.0.33/plugins/org.freeplane.plugin.latex (id#2)
Installed and started: reference:file:/home/jeffm/down/freeplane/freeplane-1.0.33/plugins/org.freeplane.plugin.script (id#3)
Installed and started: reference:file:/home/jeffm/down/freeplane/freeplane-1.0.33/plugins/org.freeplane.plugin.bugreport (id#4)
Installed and started: reference:file:/home/jeffm/down/freeplane/freeplane-1.0.33/plugins/org.freeplane.core (id#5)
5-Nov-09 4:19:17 PM org.freeplane.core.util.LogTool info
INFO: freeplane_version = 1.0.33 beta; freeplane_xml_version = 0.9.0
java_version = 1.5.0; os_name = Linux; os_version = 2.6.26-2-686
User properties not found, new file created
5-Nov-09 4:19:17 PM org.freeplane.core.util.LogTool info
INFO: called ResourceController.setResourceController(...)
^C
jeffm@jeffm-wks1:~/down/freeplane/freeplane-1.0.33$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games
jeffm@jeffm-wks1:~/down/freeplane/freeplane-1.0.33$

I've tried messing around with things like 'export JAVA_HOME=/usr/bin/java' for the JAVACMD, JAVA_HOME and the other variables mentioned at the error, but no luck. I think I'm just messing up the export. Any ideas? Thanks for any help.

PS: I thought to read the freeplane manpage like the error said to, but there is none

AlucardZero 11-05-2009 04:43 PM

is sun-java6-jre or sun-java5-jre installed? If not, install it.

Then, run
Code:

/usr/sbin/update-alternatives --config java
and select a Sun java.

jefm 11-06-2009 10:57 AM

Thanks for the reply. It is basically working now. Glad I didn't mess with export for too long, I was worried since a lot of the help I was finding via Google seemed to be 5=< years old...

Quote:

Originally Posted by AlucardZero (Post 3746262)
is sun-java6-jre or sun-java5-jre installed? If not, install it.

Code:

jeffm@jeffm-wks1:~$ sudo apt-get install sun-java6-jre -s
Reading package lists... Done
Building dependency tree     
Reading state information... Done
sun-java6-jre is already the newest version.
The following packages were automatically installed and are no longer required:
  gs-esp libavahi-compat-libdnssd1 cups-client openssl-blacklist libslp1 ghostscript-x foomatic-db-engine avahi-utils
  cups-common ssl-cert cups cups-bsd foomatic-filters foomatic-db
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
jeffm@jeffm-wks1:~$

So that was ok. Not sure why it wants to remove cups, but whatever.

Quote:

Originally Posted by AlucardZero (Post 3746262)
Then, run
Code:

/usr/sbin/update-alternatives --config java
and select a Sun java.

Code:

jeffm@jeffm-wks1:~$ sudo /usr/sbin/update-alternatives --config java

There are 4 alternatives which provide `java'.

  Selection    Alternative
-----------------------------------------------
          1    /usr/bin/gij-4.3
 +        2    /usr/lib/jvm/java-gcj/jre/bin/java
*        3    /usr/bin/jamvm
          4    /usr/lib/jvm/java-6-sun/jre/bin/java

Press enter to keep the default[*], or type selection number: 4
Using '/usr/lib/jvm/java-6-sun/jre/bin/java' to provide 'java'.

3 is the default, 4 wound up doing the trick. There are a lot of Java-looking bugs in the app, that could be anything, at least it starts now. Thanks again for the help!


All times are GMT -5. The time now is 11:25 PM.