Vuze/Azureus openjdk hardcoded to executeable

Bug #348109 reported by rohdef on 2009-03-24
82
This bug affects 7 people
Affects Status Importance Assigned to Milestone
azureus (Ubuntu)
Low
Unassigned

Bug Description

Binary package hint: azureus

There is a bug in the vuze and azureus startup-script. They default to openjdk and totally ignore whatever I have set with update-java-alternatives

When I try to run it I get:

rohdef@Elysia:~$ vuze
exec: 11: /usr/lib/jvm/java-6-openjdk/jre/bin/java: not found
rohdef@Elysia:~$ azureus
exec: 11: /usr/lib/jvm/java-6-openjdk/jre/bin/java: not found

and I'd hardly blame it since I completely removed openjdk

Please make those files refer to the Java in /etc/alternatives as it should.

For others who like me doesn't want/can't work with openjdk, the current modification (has to be done with root) can be done to /usr/bin/azureus:
#!/bin/sh
## JAVA='/usr/lib/jvm/java-6-openjdk/jre/bin/java -Xmx1024M'
JAVA='/etc/alternatives/java -Xmx1024M'

hseffler (hseffler) wrote :

Just hit this too. Seems easy to fix.

Pekka Vuorela (pvuorela-iki) wrote :

+1 after Jaunty RC upgrade. My java alternative points to /usr/lib/jvm/java-6-sun/jre/bin/java which obviously doesn't help there.

kingof1981 (kingof1981) wrote :

same here... frostwire works
and azureus/vuze don't....

frix@frix-kingof1981:~$ azureus
exec: 11: /usr/lib/jvm/java-6-openjdk/jre/bin/java: not found
frix@frix-kingof1981:~$ vuze
exec: 11: /usr/lib/jvm/java-6-openjdk/jre/bin/java: not found
frix@frix-kingof1981:~$

Kellsens Willamos (kellsens) wrote :

For me, work perfect! Thank's rohdef

Changed in azureus (Ubuntu):
importance: Undecided → Low
status: New → Confirmed
tags: added: regression-release
tags: added: bitesize
tags: added: metabug
Andres Mujica (andres.mujica) wrote :

This seems to be the expected behaviour according to bug #296880. However i'll let this bug as metabug so Stefano can take a look

Reuben Firmin (reubenf) wrote :

I don't know anything about deb packaging, but surely you can specify version numbers in your dependencies. Can't you declare: "sun-java version 1.6.*" OR "openjdk version 6.*"?

Hardcoding in the script is trying to fix a problem that deb is already set up to provide you the answer with. Right?

Aaron Kelley (aaronkelley) wrote :

Same problem here. I have sun-java6-jre installed, and after upgrading to 9.04, Azureus will not launch. Worked great in 8.10. (Changing the launch script to point to the correct Java executable works great, but this is a completely silly problem. Shouldn't hard-code the path to the Java executable when there is more than one JVM that will work...)

rohdef (krdata) wrote :

Reuben Firmin> You probably could do that, but the point is partly that it should depend on what Java you use, it should use the more independent system with /etc/alternatives as Ubuntu does, since it works fine with both Javas

jimp (jimmy-basicmatrix) wrote :

Thank you, rohdef! Your fix worked perfectly for me.

Lumberjack (papatrexas) wrote :

Thanks a lot! It worked!!! Thank you very much, I couldn't stand transmission any more!!!

Sidarth Dasari (sirsid) wrote :

Thanks for the quick fix rohdef

Draco (dracomg) wrote :

I still doesn't understand what to do to fix that problem. Please someone write what I must to do step by step.

Cruncher (ubuntu-wkresse) wrote :

Draco, open a terminal (Applications->Accessoires->Terminal), and enter this command:
gksudo gedit /usr/bin/azureus

After entering your password, an editor will open.
Near the beginning there should be a line that looks like this:
JAVA='/usr/lib/jvm/java-6-openjdk/jre/bin/java -Xmx1024M'

Replace everything after the JAVA=' and before the /java with the text /etc/alternatives
Taking the example of the line above (not sure whether yours is identical to that, I use a different installation), the line should now look like this:
JAVA='/etc/alternatives/java -Xmx1024M'

Make sure you don't delete the ' after the =
Save and exit, start Azureus.

Draco (dracomg) wrote :

Thanks for help Crouncher

gika2002 (gika2002) wrote :

Thanks for your detailed answer Crouncher.

extremss (extremss) wrote :

Thanks for help Crouncher and Rohdef, now it works.

andrew4737 (techmonkey) wrote :

Another thanks rohdef. Works like a charm.

GaryW (gnubyexample) wrote :

Fixes previously provided by rohdef and Cruncher seem to be doing the trick fine.

Just wanted to add my support for this being treated as a bug. One other issue that might be considered at the same time is the -Xmx1024M default.

I have two oldish PCs with 512M and 1Gig of memory respectively, on which Ubunty Jaunty runs fine.
I would be reluctant to give java the freedom of eating a maximum of 1Gig (-Xmx1024M) on either of these machines and so made an additional modification (-Xmx512M) as shown below:

gnubyexample@ad2k1g:~$ date;uname -a;cat /etc/debian_version;cat /etc/lsb-release;dpkg -l | egrep '(vuze|azure|jdk)';more /usr/bin/vuze;grep -H jdk /usr/bin/azureus
Mon Aug 10 17:38:48 BST 2009
Linux ad2k1g 2.6.28-14-generic #47-Ubuntu SMP Sat Jul 25 00:28:35 UTC 2009 i686 GNU/Linux
5.0
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=9.04
DISTRIB_CODENAME=jaunty
DISTRIB_DESCRIPTION="Ubuntu 9.04"
ii azureus 3.1.1.0-4ubuntu1 BitTorrent client
ii icedtea-java7-jdk 7~b21-1.4+20071007-0ubuntu6 Java runtime based on OpenJDK
ii vuze 3.1.1.0-4ubuntu1 Multimedia BitTorrent client
::::::::::::::
/usr/bin/vuze
::::::::::::::
#!/bin/sh
VUZE=1 exec azureus "$@"
/usr/bin/azureus:JAVA='/usr/lib/jvm/java-6-openjdk/jre/bin/java -Xmx1024M'
gnubyexample@ad2k1g:~$ ls -l /usr/lib/jvm/java-7-icedtea/jre/bin/java
-rwxr-xr-x 1 root root 3252 2007-10-16 00:37 /usr/lib/jvm/java-7-icedtea/jre/bin/java
gnubyexample@ad2k1g:~$ sudo emacs /usr/bin/azureus
[sudo] password for gnubyexample:
gnubyexample@ad2k1g:~$ date;grep -H jdk /usr/bin/azureus Mon Aug 10 17:41:39 BST 2009
/usr/bin/azureus:#JAVA='/usr/lib/jvm/java-6-openjdk/jre/bin/java -Xmx1024M'
gnubyexample@ad2k1g:~$ date;grep -H iced /usr/bin/azureus
Mon Aug 10 17:41:46 BST 2009
/usr/bin/azureus:JAVA='/usr/lib/jvm/java-7-icedtea/jre/bin/java -Xmx512M'
gnubyexample@ad2k1g:~$ vuze
file:/usr/share/java/Azureus2.jar ; file:/usr/share/java/swt-gtk-3.4.jar ; file:/home/gnubyexample/

#In short the -Xmx1024M looks on the high side unless the package can be amended to query how
#much physical memory the system has installed.

#Perhaps /usr/bin/free or /proc/meminfo?

gnubyexample@ad2k1g:~$ /usr/bin/free
             total used free shared buffers cached
Mem: 1025520 1000644 24876 0 49816 421840
-/+ buffers/cache: 528988 496532
Swap: 746980 34272 712708

gnubyexample@ad2k1g:~$ cat /proc/meminfo | head -1 | /usr/bin/awk '{print $2}'
1025520

Vuze 4.2.0.4-1 has been synced from debian and is now in karmic, see [1].
The new package uses java-wrappers for launch, fixing the issues reported above.

I'm setting this bug as fix released.

[1] https://bugs.launchpad.net/ubuntu/+source/azureus/+bug/413225

Changed in azureus (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers