Java

From VuzeWiki
Jump to: navigation, search

Contents

[edit] Test Java

When encountering "strange" problems with Vuze, the first thing to do is to check that Java itself works normally. Vuze is a Java program, which runs on top of a "Java virtual machine" runtime program. You have either installed Java separately, or Vuze has installed it automatically for you.

  • You can test Java with the following webpage:
http://www.java.com/en/download/help/testvm.xml

If your Java works ok, you should see a summary of your java version.

[edit] Which Java version Vuze is using?

By using the "Help / About Vuze" command in Vuze, you should see the current Java version as part of the short system summary text.

  • Verify that Vuze uses the Java version you think it should, as you might have multiple Java versions installed in your system.

Example of the system summary:

Java 1.6.0_20
Sun Microsystems Inc.
SWT v3650, win32
Windows 7 v6.1, x86
V4.4.0.7_B02/4 az2
Help AboutVuze SystemInfo.png

Note: You can copy-paste that system summary text with mouse, so that it can be attached to a bug report ro forum discussion.

[edit] Java installed by Vuze installer to non-regular place

If there was no Java installed in your computer when you installed Vuze, the Vuze installer (EXE4J) may install Java (Java Runtime environment "JRE") for you. Depending on your operating system and its settings, the installed Java may end up at some non-regular place, and that may cause trouble later when you try to update Java.

For example, in Windows the installed Java JRE may be at least in C:\Program files\Vuze\jre\ or at C:\Program Files\Common Files\i4j_jres\jre6 .

If you notice that there is a Java JRE installed in such a place, you might consider deleting it and reinstalling the newest Sun Java to the normal place.

Based on forum discussion, it may even be that Sun Java version checker checks the normal Java version, but does not notice the special Java installed by the Vuze installer. Evidence of that private Java JRE is e.g. if you see error messages with the string EXE4J_JAVA_HOME.

[edit] How to update to the latest Sun Java version

Using an old Java version, or having more than one installed, may cause severe problems like 100% CPU usage! If you have installed Vuze but it is crashing or behaving strangely (eg. no windows display after the program launches) you possibly need to upgrade your Java.

  • The latest official Java is version 7u3 (1.7.0_03) as of March 2012.
  • The latest version of the still common Java 6 is update 31 (1.6.0_31) as of March 2012. This is also the version offered by Java's update system.
  • You can verify from Sun's web pages that you have the newest java installed: Detect Java version

[edit] Windows

[edit] Installing Java

You must be running as an administrator to be able to install Java successfully. If your regular user account is a limited user (following the best practices for safe computing), you will need to temporarily switch the account to an administrative user in order to install Java successfully. After Java is installed on that account, you can switch that account back to a limited user account.

[edit] Java troubleshooting issues

[edit] Outdated Java

You should update to the newest Java, either through the Java's built-in update checker (launched from Control Panel --> Java), or by the manual install process described below.

  1. Hit the Windows-key and R, enter cmd /k java -version and hit OK to find out which JRE is currently installed (or visit Sun java web pages: Detect Java version)
  2. If your version is not the latest (see above), download it from Sun
    1. click on Download JRE 6
    2. on the next page, read the license agreement and click Accept if you accept it (you must accept it to continue)
    3. then click on Windows Offline Installation, Multi-language
    4. pay careful attention to WHERE you save the file.
  3. Shut down Azureus
  4. Uninstall every Java you may find in Start->Settings->Control panel->Add/remove Programs
  5. Reboot your PC (it's very important! Don't skip this!)
  6. Install the latest Java JRE

[edit] More than one Java installed

Sun says that you are able to have multiple JRE versions installed, but in case you experience problems there, you might remove older versions.

  1. If you should already have the latest Java version check Start/Programs to see if there's more than one J2SE Runtime Environment.
  2. Shut down Vuze
  3. Uninstall every Java you may find in Start->Settings->Control panel->Add/remove Programs
  4. Reboot your PC
  5. Install the latest Java again

[edit] Azureus.exe/Vuze.exe fails to launch with a 'could not create JVM' error

Alternative error messages: The JVM could not be started. The main method may have thrown an exception

This is often caused by one of two things

1) EXE4J (the Vuze launcher) is finding the wrong Java version

Open a command prompt and change directory into the directory containing the Vuze executable. By default this will be

   cd "c:\Program Files\Vuze"

or

   cd "c:\Program Files (x86)\Vuze"

Then set an environment variable to enable log file creation:

   set EXE4J_LOG=yes

Finally run Vuze

   Azureus.exe

This will create a log file starting with the name

   i4j_nlog_

in your temporary directory - to find this directory type

   cd %temp%

Check the log file to see if you can work out what went wrong

2) You have created a .vmoptions file with invalid entries (e.g. a VM memory size that is too large). There are two places that this can reside:

   c:\Program Files\Vuze  or  c:\Program Files (x86)\Vuze

and

   %appdata%\Azureus

If you find a Azureus.exe.vmoptions file in any of these locations, delete them and see if that fixes it

[edit] Mac OS X

Older (for Mac OS X 10.4.5 or later):

[edit] Configure Mac to use the correct Java

You should be able to change the preferred Java version *for applications* by using the Java Preferences utility. Make sure that Java 6 is the first in the list, before Java 5 or 4.

MacOSXjavaPreferences.png

[edit] Linux

Most Linux variants include Sun Java by default. It is also possible that there are additional java variants packaged in the Linux release.

To find out which version is installed in your system, run the command java -version.

The following instructions will help you install Java, e.g., if you got back "command not found", or if you want to upgrade Java.

The following links lead to advice specific to different Linux variants.

[edit] On Ubuntu

https://help.ubuntu.com/community/Java

[edit] On Debian

http://wiki.debian.org/Java

http://www.debian.org/doc/manuals/debian-java-faq/

[edit] On Fedora Core

http://fedoraproject.org/wiki/Java/FAQ

[edit] On OpenSUSE

http://wiki.opensuse.org/SDB:Installing_Sun%27s_Java_on_openSUSE

[edit] On RedHat Enterprise Linux

http://www.java.com/en/download/help/linux_install.xml

[edit] Running with GCJ

Azureus 2.4.0.0 and greater may run with GCJ 4.1.0 or greater, however some people experience problems which does not occur with the J2SE version.

[edit] Other Resources

Read the Azureus FAQ. See also: Jar