Solved

Eclipse Browser

Posted on 2006-11-07
9
603 Views
Last Modified: 2012-06-27
I am using Eclipse browser in my application, it works fine with non java script page(URL), but amy application hangs when I try to load java script page.
Here is the code

Composite container = new Composite(parent, SWT.NONE);
container.setLayout(new FillLayout());

browser = new Browser(container, SWT.NONE);
browser.setUrl("http://192.168.1.41");

I also tried OLE objects instead of browser, but the result is same.
Here is the code

OleFrame frame = new OleFrame(container, SWT.NONE);
OleControlSite controlSite = new OleControlSite(frame, SWT.NONE, "Shell.Explorer");
OleAutomation automation = new OleAutomation(controlSite);
controlSite.doVerb(OLE.OLEIVERB_INPLACEACTIVATE);
int[] rgdispid = automation.getIDsOfNames(new String[]{"Navigate", "URL"});
int dispIdMember = rgdispid[0];

Variant[] rgvarg = new Variant[1];//this is the URL parameter
rgvarg[0] = new Variant("http://192.168.1.41/");
Variant pVarResult = automation.invoke(dispIdMember, rgvarg);
rgvarg[0].dispose();


Kindly let me know where I am wrong...I am using Eclipse 3.2

Thanks
0
Comment
Question by:Shabzt
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
9 Comments
 
LVL 7

Expert Comment

by:tomboshell
ID: 17888703
I would check to see if the Javascript is in error.  You should be able to call the same site in a normal web browser, if it runs there then there may be a problem with the Eclipse version and then you should enter a bug at Eclipse and include the relevant code and errors/traces.  If it does not run there then recheck the URL and such, you set the host but is there a particular page you are trying to visit?  like: http://192.168.1.41/myProject/index.html or such?  Is the server running?  

Or you could try out the ATF project which includes a Javascript debugger and a Mozilla Gecko integrations. http://www.eclipse.org/atf/  It is aimed at the Ajax crowd but does have some nice tools with the debugger, just watch out on the build types (incremental build may make it slower due to more parsing)
0
 

Author Comment

by:Shabzt
ID: 17888860
Page loads normally, if I try to use normal browser. If I try to catch exceptions from my code even then it does not throw any exception. It means everything from application point of view seems to be normal, but application hangs, that why even I tried to use OLE classes but without luck :(
0
 
LVL 7

Expert Comment

by:tomboshell
ID: 17889265
If you are using applets it is a known error:  https://bugs.eclipse.org/bugs/show_bug.cgi?id=59506

There have been many other bugs reported to Eclipse along similar themes that have been linked to this error.  I would suggest following the status of this bug.  May be of interest.  

Other ideas is to try out the ATF project and see about the debugging aspects
0
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 

Author Comment

by:Shabzt
ID: 17890016
Thanks for your reply,

Can I have some way to even catch this exception so that I can prevent my application to be in the hanging condition, which is very bad
0
 
LVL 7

Expert Comment

by:tomboshell
ID: 17892306
If it just hangs then it would be hard to say.  I would look into profilers, and/or debug (java debug) your application...or mix up both.  You will need to find in what method it is hanging.  I will be hitting the road again tomorrow and then wont be able to check the messages further (sorry).  
0
 

Author Comment

by:Shabzt
ID: 17895632
Thanks for your reply,

I tried debugging it, but from my application's end it is running smoothly. The method is executing properly and there is no exception. but it hangs in browser.setUrl("192.168.1.41");
0
 
LVL 7

Accepted Solution

by:
tomboshell earned 500 total points
ID: 17913144
step into the setUrl method, you should have the sources for eclipse in the install, so you can debug the Eclipse specific items too.  If you can find out where it is broken in Eclipse you would have a better chance of getting it fixed.
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question