score:1
Accepted answer
this works just fine here on windows 7 using a browser
with swt.none
:
public static void main(string[] args)
{
display display = new display();
final shell shell = new shell(display);
shell.settext("stackoverflow");
shell.setlayout(new filllayout());
browser browser = new browser(shell, swt.none);
string url = "start.html";
try
{
uri uri = new file(url).touri();
url urls = uri.tourl();
browser.seturl(urls.tostring());
}
catch (malformedurlexception e)
{
e.printstacktrace();
}
shell.pack();
shell.setsize(400, 300);
shell.open();
while (!shell.isdisposed())
{
if (!display.readanddispatch())
{
display.sleep();
}
}
display.dispose();
}
this is the content of the start.html
:
<a href="./test.html">click here</a>
and the content of test.html
:
<h1>hello</h1>
Source: stackoverflow.com
Related Query
- SWT Browser in eclipse plugin behaves differently in Mac and Windows
- Eclipse text cursor has changed and editor behaves differently
- Sharing Eclipse directory on Dropbox between Windows and Mac OS X
- How to transfer Eclipse workspace and project from Windows to Linux and Mac
- Error in Eclipse connecting to respository and installing ADT Plugin on Windows 8
- Can't use JFace and SWT in eclipse without creating plugin
- Eclipse SWT browser and Firebug lite?
- Encoding Issues in Eclipse for Mac and for Windows
- Why ThreadPoolExecutor behaves differently when running Java program in Eclipse and from command line?
- Eclispe RCP SWT menus for Windows and Mac OS
- Is Eclipse and Android SDK (Simulator) is faster on Windows or Mac machine?
- Eclipse plugin and swt
- Eclipse hangs on Mac when using schema browser and double-clicking on returned results (Force.com)
- Custom Android build script in eclipse that behaves differently for release and debug without ant
- Using external JARs on eclipse when working between Windows and Mac
- Eclipse SWT ImageData getPixel returns different values on Windows vs Mac OSX
- Eclipse - pass and view raw HTML in SWT browser
- Trouble installing archive ADT 1.7.0 Eclipse Plugin on Eclipse Classic 3.7.2 and Windows 7-64Bit
- Eclipse plugin manifest problem - empty package inconsistency between mac and PC
- Eclipse and Windows newlines
- Error "A JNI error has occurred. Please check your installation and try again in Eclipse x86 Windows 8.1"
- Aptana Plugin for Eclipse and jQuery code assist
- What are the shortcut keys to change to the next and previous tab in Eclipse on Mac OS X?
- What is the difference between Eclipse with Spring IDE plugin and Spring Tool Suite alone?
- How to make Eclipse behave well in the Windows 10 taskbar and program search?
- How to delete Eclipse completely (including settings and plugins) from Mac OS X?
- Eclipse with android plugin - Blocked at "calculating requirements and dependencies"
- Qt Eclipse Integration and custom widget plugin
- Eclipse Plugin and ADT modification for API Integration in Create Project menu
- Where does Maven store the source and javadocs when downloaded via the Eclipse plugin
More Query from same tag
- How to determine why m2e is slowing down eclipse builds?
- Import Maven project into eclipse looping
- How to check mandatory field whether it is empty or not in Selenium WebDriver using Java?
- Couldn't install derby in eclipse
- Resigning my app with the same keystore failed
- How do I change the font size of the Eclipse editor tab's title (in Eclipse v4.4 (Luna))?
- How to install Web Dynamic Module in Eclipse?
- Autogenerate method response in Eclipse
- How do I run DataNucleus from within an Eclipse executable JAR?
- In Eclipse, how can i display WEB-INF as a flat view?
- Can“t open an submitted sap app (via Eclipse Neon) on Fiori LaunchPad
- "is an unknown property": custom properties in Spring's application.properties
- Debugging FuseESB application in Eclipse
- Eclipse no longer can auto import java Classes
- Mapping UML Class Diagram in Eclipse (modelling tools) to actual Classes
- Is there a way to integrate Properties View within the Eclipse Multipage editor?
- Can Eclipse launcher ini -configuration variable take a relative path?
- JSF Gui-Testing with Selenium
- it's possible to change message when Android application is unfortunately apps has stopped?
- Array Out of Bounce Exception for Jar, but not Eclipse
- Can't lock files in TFS eclipse
- Running a jar file that has an image
- command in hadoop source code for map time and reduce time
- Printing in android studio - folding sections
- What is target/m2e-wtp/web-resources in Deployment Assembly?
- Eclipse - find all classes that extend interface
- How do I prevent the command line arguments of the run configuration for my GWT project from being overwritten?
- jboss is not making hibernate/JNDI connections
- Issue in applying the xml fonts and structure to .abc files in Ecllipse
- AbstractMethodError when including [org.eclipse.jetty.websocket/websocket-client "9.3.6.v20151106"]