Web browsing component in java

hi every body
is there a java class or free component or something like to browse the web inside java Application
thank u

A JEditorPane is capable of displaying HTML pages, but there is no scripting support and the quality is very low.

Similar Messages

  • Is there a web browser control in java?

    Is there a web browser control in java?

    I'm also looking to build a java-based web controller.
    I know that using Microsoft's MFC, you can build such browser control.
    The interface in C++ that they use (for web control) is IWebBrowser2
    Having a web control embedded in your application, it enables you to:
    1- start a web browser (Netscape or IE)
    2- listen to user actions on the browser (i.e. user types in a URl and hits enter. Upon doing this, a call back method will be invoked on your application , thus allowing you to write code on what exactly you want to do when you detect that a new URL was entered in the browser. For example you may send this URL through a socket connect to another user application for the purpose of sharing the web browsing activities)
    I wonder if you can achieve this in java
    Thank you very much to whom knows and can help me here on this one..

  • Launch a default web browser from my java application

    Hello,
    I have been trying to launch my default web browser from my java application, but am unable do it. Right now, I am using ---- "Runtime.getRuntime().exec("cmd /c start <url>"); to launch my webbrowser. It launches the browser but displays the command prompt for a second or so, and then replaces my already existing page with the new url.
    Is there any way for me to launch the url in a completely new browser each and every time. And I don't want the command prompt to show up for a sec. Please help...!
    Thanks in advance.
    -BusyBusyBee

    If by any chance your application is an Applet, you can use this to open a new browser window:
    getAppletContext().showDocument(new URL(theUrl), "_blank");
    But, you probably would have specified if that were the case. Oh well. Hope it helps someone!
    -sheepy.

  • Open URL in Web Browser from a Java Application

    Hi,
    I have an HTML document that I want to load in a browser window by clicking on a button in my java GUI application.
    Any suggestions?
    Thanks.

    You can use the Process class to start the web browser with the proper command line arguments (depends on the web browser though). Or on windows, you can have your program create a batch file with the code start url (where [url] is your url), and this will open the default web browser when run (again you must run it with a Process).

  • Opening a web browser from a Java prog

    I am writing a pseudo-wordprocessor, and would like to be able to set a JMenuItem's action so that when a user clicks it, the system default web browser opens with the web page that I have selected. (e.g. open up a "Help" web page).
    The JavaDoc/tutorial doesn't seem to have anything on running external programs from within a Java program, so does nayone know how this is done?

    If you don't want to go the Java Runtime route and make your program a bit more cross-platform friendly, you could use the JEditorPane to render an html page directly in your application (assuming of course that you're using Swing).

  • How can I launch a web browser from my Java application?

    I've reed about this at Question of the Week (http://developer.java.sun.com/developer/qow/archive/15/index.html). It doesn't work for me. I'm running win2000 and trying:
    try {
    Runtime.getRuntime().exec("start iexplore http://java.sun.com");
    } catch (Exception e) {
    System.out.println( e.getMessage() );
    I get:
    CreateProcess: start iexplore http://java.sun.com error=2
    What's wrong?

    This function will launch the default browser under Windows.
    public static void displayURL(String url) throws IOException   {
        String cmd = null;
        Process p;
        try  {
            String os = System.getProperty("os.name");     
            if (os != null && os.startsWith("Windows")) {
                if (os.startsWith("Windows 9") || os.startsWith("Windows Me"))  // Windows 9x/Me
                    cmd = "start " + url;
                else // Windows NT/2000/XP
                    cmd = "cmd /c start " + url;
                p = Runtime.getRuntime().exec(cmd);     
        catch(IOException x)        {
            // couldn't exec browser
            System.err.println("Could not invoke browser, command=" + cmd);

  • How to launch the default web browser from a java app on MAC

    I know, this topic has been brought up over, and over, however I couldn't find info regarding MAC environments. I don't have any former experience with MAC, but now I'm getting desperate for a solution. I need to be able to pop up the default browser showing a certain URL on MAC/OS. Any clue would be appreciated.
    thanks,
    m. berdan

    I wrote libraies that will do this:
    http://ostermiller.org/utils/Browser.html
    I also keep a list of other resources to help you out:
    http://dmoz.org/Bookmarks/D/deadsea/Java_Help/Web_Browser/
    Stephen

  • Web browser in Java

    I am wondering if there is any way to add a web browser to your Java application.
    I found http://www.javio.com/webwindow/webwindow.html but you have to pay for it in order to be able to use it( except a trial version that expires in a hour :s). But I didn't find another web browser on the internet ... :x
    So any idea's / tips ?

    you can fireup any web-browser from java... just Runtime.exec() it... the trick will be getting it to go to your URL.

  • How to open a web browser from java

    Hi
    Would anybody please help me with this. I need to open a web browser from my java app but I don't know. What method I can use?
    Thanks.
    Hung.

    You can use the Runtime class for this. It can run any command. So, you can run the .exe file of your Web browser.
    The following code will run Internet Explorer (assuming iexplorer.exe is in C:\Program Files\Internet Explorer):
    import java.lang.Runtime;
    public class Explore{
    public static void main(String[] args) {
    try{
    Process p = Runtime.getRuntime().exec("C:\\Program Files\\Internet Explorer\\iexplore");
    }catch (Exception e) {
    System.out.println("Exception: " + e);

  • A web browser in Swing

    Hi,
    I am writing a Lotus Notes add-in. In that I need to show a web page (which will have two applets). For this I need a browser control in Swing, in which this page can be displayed.
    Please suggest what should I use?
    Regards
    Nitin

    Hi,
    I tried using the same in my Lotus notes add-in, but received the following exception -
    java.lang.IllegalStateException: The version of SWT that is required is 3.7M5 or later!
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.initialize_(SWTNativeInterface.java:208)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:71)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.open_(SWTNativeInterface.java:315)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:100)
    at test.SimpleWebBrowserExample.test(SimpleWebBrowserExample.java:56)
    at desktopapplication2.lotusconnector.start(lotusconnector.java:18)
    at desktopapplication2.JavaAgent.NotesMain(JavaAgent.java:16)
    at lotus.domino.AgentBase.runNotes(Unknown Source)
    at lotus.domino.NotesThread.run(Unknown Source)
    Even though swt-3.7M5-win32-win32-x86.jar(alongwith DJNativeSwing.jar and DJNativeSwing-SWT.jar) has already been imported in the library.
    The code in which I used it -
        JPanel webBrowserPanel = new JPanel(new BorderLayout());
        webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Native Web Browser component"));
        final JWebBrowser webBrowser = new JWebBrowser();
        webBrowser.navigate(<some web url to browse to>);
        //webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
        //add(webBrowserPanel, BorderLayout.CENTER);
        webBrowser.setMenuBarVisible(false);
        webBrowser.setLocationBarVisible(false);
        webBrowser.setBarsVisible(false);Regards
    Nitin

  • Desktop App, like a web browser

    I need to develop a reusable (by developers) content delivery desktop app, cross platform. I'm working in a web developer environment. A couple questions:
    1. Is there a good browser component for java that will give me full dHTML capabilities? Static content could be stored as XHTML or XML.
    2. For some projects, there will be a need for some dynamic data. I saw HSQL, is that my best option? I know SQL.
    I guess I'm describing a self contained 2-tier local web server environment. Any ideas?
    ~ Steve

    I need to develop a reusable (by developers) content
    delivery desktop app, cross platform. I'm working in a
    web developer environment. A couple questions:
    1. Is there a good browser component for java that
    will give me full dHTML capabilities? Static content
    could be stored as XHTML or XML.
    2. For some projects, there will be a need for some
    dynamic data. I saw HSQL, is that my best option? I
    know SQL.
    I guess I'm describing a self contained 2-tier local
    web server environment. Any ideas?
    ~ Steve

  • Include a web browser in a multi frame application

    I am trying to include a web browser in my java app. i.e. embed one in a JInternalFrame. or JFrame.
    Is this possible. could i use like a JBrowser or something.
    Thanks
    Kind Regards
    michael

    Hi,
    I tried using the same in my Lotus notes add-in, but received the following exception -
    java.lang.IllegalStateException: The version of SWT that is required is 3.7M5 or later!
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.initialize_(SWTNativeInterface.java:208)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.initialize(NativeInterface.java:71)
    at chrriis.dj.nativeswing.swtimpl.core.SWTNativeInterface.open_(SWTNativeInterface.java:315)
    at chrriis.dj.nativeswing.swtimpl.NativeInterface.open(NativeInterface.java:100)
    at test.SimpleWebBrowserExample.test(SimpleWebBrowserExample.java:56)
    at desktopapplication2.lotusconnector.start(lotusconnector.java:18)
    at desktopapplication2.JavaAgent.NotesMain(JavaAgent.java:16)
    at lotus.domino.AgentBase.runNotes(Unknown Source)
    at lotus.domino.NotesThread.run(Unknown Source)
    Even though swt-3.7M5-win32-win32-x86.jar(alongwith DJNativeSwing.jar and DJNativeSwing-SWT.jar) has already been imported in the library.
    The code in which I used it -
        JPanel webBrowserPanel = new JPanel(new BorderLayout());
        webBrowserPanel.setBorder(BorderFactory.createTitledBorder("Native Web Browser component"));
        final JWebBrowser webBrowser = new JWebBrowser();
        webBrowser.navigate(<some web url to browse to>);
        //webBrowserPanel.add(webBrowser, BorderLayout.CENTER);
        //add(webBrowserPanel, BorderLayout.CENTER);
        webBrowser.setMenuBarVisible(false);
        webBrowser.setLocationBarVisible(false);
        webBrowser.setBarsVisible(false);Regards
    Nitin

  • About install netscape6 web browser

    Hi,fine:
    I already install netscape 6 on my solaris 7 for x86 system.But
    I open web browser appear "hot java"browser through CDE environment.
    Now I hope my web browser is netscape 6 browser .Please tell me
    how to to it.
    Thank again.

    Make sure the command "netscape" can be found in your $PATH.
    When you click on the "Web-Browser" icon, CDE runs the shell
    script /usr/dt/bin/sdtwebclient to start the web browser. This
    script searches your $PATH for the commands "netscape", "sdthotjava"
    and "hotjave". The scripts starts the first one it finds.

  • Opening  browser window from Java Swing

    Hi
    I am trying to open
    1) a word document on the click of a button from a Java-Swing based application running only on windows based system.
    Currently the code uses 'rundll' and calls 'a.doc'
    it requires that the application be installed and run only from a specific location in the windows' system.
    i would like to modify the code in one of the following ways
    1) open the word doc irrespective of its location and that of the executable jar which is trying to open this file
    2) upload the word document to a website and direct the application to open that webpage on button click, etc
    i believe that the latter may be simple but i do not have any idea about how to go about it
    i would appreciate some guidance about it.

    Hi,
    I was trying to run the code, for embeding the mozilla web browser in my java application which is running at linux fedoracore2. I set all the environment variables, like MOZILLA_FIVE_HOME and LD_LIBRARY_PATH. I can able to compile successfully but if i run the code, i got the error message like this
    Exception in thread "main" java.lang.Error: Untranslated exception
    at sun.nio.ch.Net.translateToSocketException(Net.java:63)
    at sun.nio.ch.Net.translateException(Net.java:79)
    at sun.nio.ch.Net.translateException(Net.java:85)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:61)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:52)
    at org.jdesktop.jdic.browser.MsgClient.<init>(Unknown Source)
    at org.jdesktop.jdic.browser.NativeEventThread.<init>(Unknown Source)
    at org.jdesktop.jdic.browser.WebBrowser.<clinit>(Unknown Source)
    at IEInJava.main(IEInJava.java:8)
    Caused by: java.net.SocketException: Unresolved address
    at sun.nio.ch.Net.translateToSocketException(Net.java:55)
    ... 8 more
    Caused by: java.nio.channels.UnresolvedAddressException
    at sun.nio.ch.Net.checkAddress(Net.java:30)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:115)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
    ... 5 more
    Thats the error.
    I could not find out, where i had made the mistake, i need help. Any suggestion and comments are most welcome. Thanks.

  • Displaying a web browser on an appplication (possibly grabbing DLL's?)

    Hi,
    I've been working on a loader for a game called RuneScape. I don't want to add the applet from a jar and it would most likely be easier to just add a browser page if possible. There's a program called SwiftKit (http://swiftkit.com/) which does it, but I highly doubt it's written in Java.
    All in all I'm wondering if it's possible to add a web browser to a Java applcation.

    Kleopatra wrote:
    then why a browser to start with? You could run it (locally) as a standalone application or as a webstartable. Why do you think "applet"?
    And no, Desktop is for showing a webpage as referenced by the given url in the default browser. It's not (and should not be) for controlling that browser.
    CU
    Jeanettecould you give me an example or a referrence web site to look at for showing the standalone application?

Maybe you are looking for

  • Azure TechNet Guru Announced for June 2014

    The Results are in! And the winners of the TechNet Guru Competition June 2014 have been posted on the Wiki Ninjas Blog. Below is a summary, heavily trimmed to fit the size restrictions of forum posting.  BizTalk Technical Guru - June 2014   Steef-Jan

  • How to create a parent without children in JTree

    I got a question here, i got a tree of file directories, after i check the file is a folder it will show a parent node instead of a leaf node and only files will be shown as a leaf node.. can anyone guide me thru? thanks

  • Report on Parked document status

    Hello Experts, Is there a way to pull the report on status of a Parked document. Also, can we track a deleted parked document? Please advise! Regards, N All answers will be duly rewarded.

  • Escape Release strategy based on purchasing group

    Dear Experts, In our system,  PO release strategy is set up, But, some of the POs are not subjected to release strategy because they belong to a perticular Purhasing Group (P01). Where this set up is done? Regards, Shashidhar

  • About Software Update...

    Can your system gain some HDD space back after running software update and installing the new updates? Because when I updated to the newest version of Java (Update 3) through software update I noticed that there was a .10 GB (102 Megabyte Gain) in fr