Solved

Eclipse Browser

Posted on 2006-11-07
9
601 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Oracle SQL syntax check  without executing 6 107
Which non-HTML GUI front end to use with Java? 3 52
SequenceInputStream example 3 22
Java program running SQL query 5 48
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

749 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