To show a html page from java application

hi everyone,
I am trying to show a html page through java application. What i tried is Runtime.getRuntime().exec("start url"); this shows it opens default browser. It works fine for win Nt but does not work on win98 or linux.
Is there any other way of achieving the same?
can anyone help me in this regard. I am in urgent need of it. any reply will appreciate.

I hope this works.
String urlName = "http://forum.java.sun.com";
String browser = "iexplore "; //EXE file name --> for iexplore.exe
Runtime.getRuntime().exec(browser+urlName);

Similar Messages

  • Get parameters from html page from java application standalone ...

    Hi all,
    I work in one solution that i have values in Html Page and i want get the parameters values from html and cath they in java application standalone.
    The Html page is in same host than de java application.
    I want know if this is possible. I wnat know if without HttpServlet i can get the parameters from Html Page pure.
    Thanks in Advance for the ideas,
    Antonio.

    Hi Abdul,
    The problem is my client want one solution where i have one page simple page Html and one application java standalone. This application runs in one machine, but we don't have web server. So the question is: Is possible without web server i can get the parameters values that is inside the html page from java application. I remember you that the application java is one .jar that run's with one command line from crontab "java -jar teste.jar".

  • Write HTML Files from java application

    Hello,
    i have to write HTML files from a java application.
    I am asking if anybody can give me a hint about a good simple solution (library) which can do some of the job for me.
    i know FOP for example is good to create pdf or html from xml, but i dont want to go via xml.
    the sites i need are really very simple presents emails.
    body and maybe a link for next and pervious.
    however, thank you in advance.
    a little hint will also help :)
    Sako.

    That, too, is my question.
    Be the "server" local or remote, wouldn't JSPs still
    be the easier solution? No. it will not. because you need a server. Server for a stand alone application is not esier. according to who said JSPs are easy?
    Its very very difficult.
    >
    When answering, please clarify. I'm a bit of a newbie
    here. :)To get sence about how hard is JSP, check Struts. this is very good open source Framework to simplify the JSPs. but it still complecated enough.
    or Tapestry my lovely open srouce Framework.
    its easier than Struts. but sill complecated because of the documentation.
    All in all, using JSP is the purpose of Java in the internet. but not for me. My application will not be available in the internet, i.e. no server, i.e. no need for JSP.
    i hope that helps a little.

  • Access HTML Pages from Forte Applications

    We are currently looking at how to redevelop our online help facility for a
    Forte application. We are investigating the use of HTML pages.
    Has anyone written a Forte application that opens particular HTML pages? If so,
    how was it done?
    Regards,
    Steve Isaac
    Senior Consultant, Information Services Group
    Hydro Electric Corporation of Tasmania
    4 Elizabeth St, Hobart, Australia, 7000
    Phone : +61 03 6230 5161
    e-mail: [email protected]

    We have created the idea of an OnLineAssistant that uses HTML pages to drive
    help in a Wizard-like fashion.
    We use an embedded ActiveX browser control in a Forte window to display the
    HTML pages. The pages are launched by passing the application, window, and
    widget name to the OnLineAssistant window, which uses the information to load
    the correct page.
    For example: an application screen for entering customer name and address
    passes it's information to the on-line assistant, which links and displays the
    page associated with that particular step of a task wizard defined for that
    widget. The ActiveX control then allows the user to link into any of the
    other pages associated through standard HTML.
    This context-sensitive mechanism is also used to launch on-line help (without
    the task orientation) at the user's request.
    One of the benefits of this approach is that we can put the message passing
    into a generic framework ancestor without making any application code changes,
    and the OnLineAssistant HTML pages can then be created by non-programmers and
    deployed independently from the application, and HTML can do most of the
    navigation work.
    -DFR

  • Opening an Html page from java code

    Hi
    I have created an application and in order to complete it i need to configure help file with it. Now i have created a menubar in which help button is present.
    My requirement is that clicking the help button should display the help file which is in the form of an html file in a new window just as in any other application.
    Can anybody help me on this issue? Your help would ge really appreciated :)
    Thanks

    My requirement is that clicking the help button should display the help file which is in the form of an html file in a new window just as in any other application.Do you want to open a new "Browser"? is this a hard and fast requirement? If not why don't you use javahelp instead.
    For more details refer : http://java.sun.com/developer/technicalArticles/J2SE/Desktop/javahelp/index.html

  • I need to show an html file from an application

    Hi there!, I really need your help...
    I have the absolute path in an String variable:
    String fileHTML = "C:\\AllCitiHTML\\GeneralHTML_Files\\Temp\\2002030925General.htm";
    Now, I need to show this page in a browser(explorer or netscape) but the page must be showed in both.
    I tried with this code, but it doesn't show nothing
    String urlName = fileHTML;
    String browser = "iexplore ";
    Runtime.getRuntime().exec(browser + urlName);
    in addition it would only serve for explorer and not for netscape.
    reply this message with all the possible code that you can use...
    Please I need help very urgent, thanks

    Multiple cross-post.

  • Loading web pages from an application

    Hi All
    I've tried hunting on this web site for info about how to show an html page from an application. Unfortunatley I couldnt find anything.
    So how do I fire up a web browser, and load in a specified web page?
    I can get a URL pointing to a file on my system ie File:c:/MyDoc/Help.htm, but am unsure what I need to do next.
    Any advice welcome.
    Cheers

    From an applet? - I assume this is a java web app ...
    import java.awt.*;
    import java.awt.event.*;
    import java.net.*;   
    public class URLCheckBox extends java.applet.Applet implements ItemListener {
       Choice chqbx = new Choice();
       Label lblOutput, lblfalse;
       URL url; 
       public void init() {
           this.setLayout(new FlowLayout());
                   chqbx.addItem("URL link to ..."); // add URL names here eg: www.yahoo.com/
           chqbx.addItemListener(this);
           setFont(new Font("Arial", 0, 18));
           setForeground(new java.awt.Color(255,255,55));
           setBackground(new java.awt.Color(95,100,215));
           lblOutput = new Label("Link to other web pages: ");
           add   (lblOutput);
           add(chqbx_MMedia);
           chqbx_MMedia.setForeground(new java.awt.Color(210,210,255));
           chqbx_MMedia.setBackground(new java.awt.Color(50,50,95)); 
       public void paint(Graphics g) { // this just makes it look pretty!
          g.drawRect(2,2,216,196);
          g.setColor(Color.white);
          g.drawRect(4,4,212,192);
          g.setColor(Color.blue);
          g.drawRect(6,6,208,188);
          g.setColor(Color.white);
          g.drawRect(8,8,204,184);
          g.setColor(Color.gray);
          g.drawRect(10,10,200,180);
       public void itemStateChanged(ItemEvent e) {
           String URLstr = "http://";
           String selection;
           selection = (String)chqbx.getSelectedItem();
           String urlText =  URLstr + selection";
              try {
                 url = new URL(urlText);        
                 getAppletContext().showDocument(url);
              catch(MalformedURLException ignore){ }
    }

  • Creating a HTML page from the J2ME application

    Hi,
    I am developingan application in J2ME. Can anyone of you out there, help me whether there is any way I can generate a HTML page from the application.
    I have the data but I don't know ho to create a HTML page from a J2ME application.
    Any document or any code will prove handy.
    Thanking in anticipation.
    Ashish

    When you say that "you have the data" you mean that you have HTML code data(<html><body>Hello World</body></html>)? If yes you should create an algorithm that "read" html tag and display text in the appropriate layout/font/size/color...
    A solution could be simplify your HTML code (server side), so you can easly "decode" and display text.
    Giovanni
    Italy

  • How to populate a table in the html page from the java script

    Hi all,
    I have doubt in populating a table in the html page. my application is as follows
    I have a html page in which i have a combo box and a table following the combo box.
    i have to populate the table depending on the item selected in the combo box.
    for this i am using javascript to get the value of combo box onClick
    then i have to call some function thru jsp to get the data and then i have to populate the table with thst into from java script
    how can i do this, i.e populating html table from java script
    Thanks in advance
    satya

    Hi Mihai,
    You can populate data in DO_INIT_CONTEXT method of ur impl class in your Z component.
    data:
    lv_struct_ref type ref to YOUR_STRUCTURE,
    lv_value_node type ref to cl_bsp_wd_value_node,
    lv_bo_coll type ref to if_bol_bo_col.
    Data: current type ref to if_bol_bo_property_access.
    data: dref type ref to data.
    data: lv_guid_h type crmt_object_guid.
    data: lt_attr type table of YOUR_STRUCTURE.
    data: ls_attr type YOUR_STRUCTURE.
    data: lr_entity type ref to cl_crm_bol_entity.
    create object lv_bo_coll type cl_crm_bol_bo_col.
    lt_attr is ur internal table.
    Loop at lt_attr into ls_attr.
      create data lv_struct_ref.
      create object lv_value_node
           exporting
                iv_data_ref = lv_struct_ref.
    call method lv_value_node->if_bol_bo_property_access~set_property
    exporting
    iv_attr_name = 'YOURFIELDNAME1'
    iv_value = ls_attr-firstname.
    call method lv_value_node->if_bol_bo_property_access~set_property
    exporting
    iv_attr_name = ' YOURFIELDNAME2'
    iv_value = ls_attr-lastname.
    lv_bo_coll->add( lv_value_node ).
    typed_context->YOURCONTEXTNODE->set_collection( lv_bo_coll ).
    endloop.
    Regards,
    Raghu

  • How to call javascript from java application

    How can we call a function written in javascript from java application (core java not applet)? How will java identify javascript?
    Is there any such options ?

    Try creating a page called launcher.html (for example). That does this:
    <html>
    <head>
    <script language="javascript">
    windowHandle=window.open("http://www.javasoft.com", "", "height=700,width=1000,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,top=5,left=5");
    </script>
    </head>
    </html>Now you launch IE (or whatever) with this page using the Runtime class. After x seconds (after the second window has been launched) try killing the process. Hopefully it will kill the original window you opened and not the window you popup (the one without toolbars etc)
    It might kill both windows but I can't be bothered to test it. If it does you'll have to try and find a workaround.

  • Storing chinese in client odb from java application

    Hi all,
    first i like to thank Greg Rekounas for his wonderful support and contribution....
    This is my server setup.
    os-windows 2000 sp4
    db-oracle 9ir2 (unicode with AL32UTF8 charset)
    lite-oracle10g r2 (with latest patchset)
    nls_lang- AMERICAN_AMERICA.AL32UTF8
    storing and retriving chinese in oracle 9i database from isql*plus works.
    lite configuration.
    1. In $OLITE_HOME\mobile_oc4j\j2ee\mobileserver\applications
    \mobileserver\setup\common\webtogo\webtogo.ora file edited the JAVA_OPTION
    to:
    JAVA_OPTION=-Djava.compiler=NONE -Dfile.encoding=UTF8
    2. In $OLITE_HOME\mobile_oc4j\j2ee\mobileserver\applications
    \mobileserver\setup\dmc\common\win32.inf file, added the following:
    a. In the <file> section, added the following:
    <item>
    <src>/common/win32/olilUTF8.dll</src>
    <des>$APP_DIR$\bin\olilUTF8.dll</des>
    </item>
    b. In the <ini> section, added the following:
    <item name='POLITE.INI' section='All Databases'>
    <item name="DB_CHAR_ENCODING">UTF8</item>
    </item>
    <item name='POLITE.INI' section='SYNC'>
    <item name="DB_ENCODING">UTF8</item>
    </item>
    published the application developed in java using packaging wizard.
    downloaded the client in the pc with the following config:
    windows 2000 (english)
    nls - default.
    installed chinese language support.
    tried to access 9i database from isql*plus and stored & viewed chinese characters sucessfully.
    tried to store a chinese character from java application in the client odb -- failed.
    values are getting inserted from the application but when i view them back it shows & # 2 6 0 8 5 ; (i have included a space in between all 8 characters.
    but when i copy this no and paste in msword it shows 日(chinese character)
    i dont know the exact reason for the above scenerio...................
    Also please help me on this too.......
    why can i store & view chinese characters sucessfully in isql*plus from the client machine while i cannot do the same on client odb from java application even though the lite config are done to support utf8?
    is anything i left out?
    should i do any codes changes in java?(java application is of verision jdk1.4_13)
    Thanks,
    Ashok kumar.G

    Sorry for late replay!! in the SharePoint server both the Claim based and Classic mode is enabled in the server, but still I want to get authenticated via Classic mode just like it happens in SharePoint  2007 and 2010, so do i have to use a different
    set of classes to do that if yes can you please tell me those ?

  • How can I display the HTML page from servlet which is called by an applet

    How can I display the HTML page from servlet which is called by an
    applet using the doPost method. If I print the response i can able to see the html document. How I can display it in the browser.
    I am calling my struts action class from the applet. I want to show the response in the same browser.
    Code samples will be appreciated.

    hi
    I got one way for this .
    call a javascript in showDocument() to submit the form

  • Execute html file from java code - urgent!!!

    Hi,
    I need help!!
    My application should open html file that located in my computer
    it should be open when some line in JList was choosen
    my question is: How can I open html file from my application
    I work with window XP
    I tried this one :
    Runtime.getRuntime().exec(cmdLine);
    but it doesn't work
    the exeption was: CreateProccess
    Please help! it's urgent!!!!

    http://forum.java.sun.com/thread.jsp?forum=31&thread=497600

  • How to create dom treeof html page with java

    hi, all
    i met with a problem how to create dom tree of html page wih jave, that is, given a html page, how to create a dom tree of this page with java?
    thanks in advance.
    regards
    richard

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • How to create hyperlink in Html page using Java

    Hello every one
    I want to know that how can I create a hyperlink in Html page using java ?
    Let for example
    I have code like this and i want to give hyperlink to it using java.
    rember that i am creating node using this id="name" which give me multiple value. and i want to assign diff link to each name..?
    <tr>
    <td ><span id="name"></span>
    </tr>

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

Maybe you are looking for

  • Is there a way to contact Apple with concepts?

    I have a valid concept that would utilize existing Apple iconsumer devices in a way that hasn't been presented yet. It could probably get mostly built into an app, but think Apple itself would benefit by writing it into their AppleTV coding. Many hav

  • Implementing versioning with a Java SDK

    I have an SDK that I supply to vendors who want to develop custom classes that extend the classes in my SDK .jar (the specifics of the SDK is unimportant). I am trying to devise a way find out what version of the SDK the vendor compiled their class a

  • Number to Word Convert Function

    Dear All, Plz anybody have function name which can convert NUMBER to WORD. example:  1213 to One Thousand Two Hundred Thirteen thanks, RP

  • How to remove an affect?

    I was wondering how to remove a blur effect from my design that I created? Also was wondering how to crop using adobe illustrator?

  • Mac os x 10.4.6 install booting help

    Hi everyone, I recently got Mac from a retail store, i wanted to switch from windows cuz it overall looked and felt way better. But... i got to installing mac i get throught the whole thing, it start the timer to restart your computer, and then i jus