Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » [SOLVED] Mozilla extenal browser does not work in Eclipse on Ubuntu
[SOLVED] Mozilla extenal browser does not work in Eclipse on Ubuntu [message #336162] Wed, 27 May 2009 16:07 Go to next message
Sandip Chitale is currently offline Sandip ChitaleFriend
Messages: 27
Registered: July 2009
Location: California, USA
Junior Member
I was investigating why the Mozilla external browser (Preferences > General > Web Browser) does not work in Eclipse (3.4.x and 3.5 Mx) on Ubuntu. For example, with Mozilla (/usr/bin/mozilla) as the default external browser and Help set to show in external browser ((Preferences > Help) and invoking Help > Help Content nothing happens.

To investigate further I wrote the following program:

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class MB {
public static void main(String[] args) {
try {
Process exec = Runtime.getRuntime().exec(
"/usr/bin/mozilla"
// Uncommenting out following line will launch mozilla browser on Ubuntu
//, new String[] {"DISPLAY=:0.0", "HOME="+System.getProperty("user.home")}
);
BufferedReader br = new BufferedReader(new InputStreamReader(exec.getInputStream()));
String aLine;
while ((aLine = br.readLine()) != null) {
System.out.println(aLine);
}
System.out.println(exec.waitFor());
} catch (IOException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}

And sure enough the Mozilla browser would not launch. If I ran the same program in a terminal window it worked.

When I passed the explicit environment:

new String[] {"DISPLAY=:0.0", "HOME="+System.getProperty("user.home")}

it worked also.

So I commented out the explicit environment and replaced /usr/bin/mozilla with /usr/bin/env and captured the output (A). Then
I ran /usr/bin/env on command line and captured the output (B). Then compared the outputs A and B and sure enough...
I found two extra environment variables (that may be of interest to this issue) that were appearing in output (A). And they were:

LD_LIBRARY_PATH=/usr/lib/jvm/java-6-sun-1.6.0.13/jre/lib/amd 64/server:/usr/lib/jvm/java-6-sun-1.6.0.13/jre/lib/amd64:/us r/lib/jvm/java-6-sun-1.6.0.13/jre/../lib/amd64:/usr/lib64/xu lrunner-addons
MOZILLA_FIVE_HOME=/usr/lib64/xulrunner-addons

And it seems to me that is the cause of failure to launch Mozilla browser. I think Eclipse sets these to make the internal browser widget (xulrunner based) work.
However I think Eclipse should not pollute the process environment that may be inherited by the child processes.

I will report this in bugzilla.

Cheers,
Sandip
Re: [SOLVED] Mozilla extenal browser does not work in Eclipse on Ubuntu [message #893643 is a reply to message #336162] Thu, 05 July 2012 05:05 Go to previous message
sunil kumar is currently offline sunil kumarFriend
Messages: 1
Registered: July 2012
Junior Member
MOZILLA_FIVE_HOME not set for eclipse pluging or any pluging gives unhandled error please do the follwoing process and you are done.

You may get a "MOZILLA_FIVE_HOME not set" error after you install eclipse color theme plugin in ubuntu 12.04. Here's a workround.
1. Download and Install libhunspell-1.2-0 from here and install it.

sudo dpkg -i libhunspell-1.2-0_1.2.14-4_amd64.deb

2. Download and install xulrunner-1.9.2 from here and install it.

sudo dpkg -i xulrunner-1.9.2_1.9.2.28+build1+nobinonly-0ubuntu0.11.04.1_amd64.deb
Previous Topic:Platform wide DebugOptionsListener
Next Topic:Eclipse RCP Product export issue
Goto Forum:
  


Current Time: Tue Apr 16 09:21:33 GMT 2024

Powered by FUDForum. Page generated in 1.36769 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top