How do i  open browser in java application

hi....
please help me!!!!!!!!!!!!!!!!!!!!!!!!!!
how do i open browser in java application ? ( for show javascript in java application)
thank you.......

You can run any program from java by doing
Runtime.getRuntime().exec("mybrowser myjavascriptfile.js");
The real question is why would you want to.
I would suggest you rethink whether running Javascript from Java is a good idea.

Similar Messages

  • How do i show javascript in java application?

    hi.......
    how do i show javascript in java application? ( run javascript in java application )
    thank you...
    ( i love java developer)

    From java you can run any program. You can run javascript in a browser.
    So you need to open a browser in java to run the javascript.
    This is unlikely to have the desired effect however. Why do you want to this?

  • How do i show vbscript into java application?

    hi
    how do i show vbscript into java application? ( looks like microsoft frontpage)
    or what is interpreter of vbscript for java ?
    thank you?

    There probibly isn't one.
    vbscript and java are rather different. You are better of opening a vbscript viewer from java as a sperate program.

  • Help--How can I open only one java program at one time?

    How can I open only one java program(same program) in Windows at one time?

    In Java 1.5, you can use the JVM's own monitoring APIs to examine what other JVMs are running on the system, and what applications they're running.
    It's general and powerful, but complex. The socket/file/whatever approach is cleaner, and probably more suited to your usage.
    Don't bother trying to use the Windows task manager for this sort of thing. You have to write messy native code, and it isn't reliable after all that anyway.

  • How to run ear file in java application server

    i want how to run .ear file in java application server
    1. i m created ear file
    2. i m created jar file (bean,home,remote)
    3.i m created war file(in the form of jsp)
    but till now i couldnt run ear file
    how to run
    please hel me

    You must create :
    1.Jar file
    2.War file
    And then put them into an ear file
    Exemple : myapp.ear contains
    myappEJB.jar
    myappWEB.war
    META-INF/application.xml
    and application.xml looks like this :
    <application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com /xml/ns/j2ee
                            http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
        <display-name>myapp</display-name>
        <description>Demo application</description>
        <module>
            <ejb>myappEJB.jar</ejb>
        </module>
        <module>
          <web>
             <web-uri>myappWAR.war</web-uri>
             <context-root>/myapp</context-root>
          </web>
        </module>
    </application>Good luck

  • How many web.xml in a java application

    Hi,
    can anyone give tell the answer for this question "How many web.xml in a java application?"

    1Why ?Because the Web container refers to only one web.xml for one web application.
    I havent heard of an application having more than 1 web.xml
    How?It reads all the definitions of servlet mappings, filters, welcome-file etc from this file itself.
    Where?From the following folder ...
    /WEB-INF
    By the way ..... the way you questioned me was amuzing ... Why? How ?Where ? Its funny :D
    I actually wanted to reply as below ..
    Why ?Why not
    How?
    Wait lemme think ....ummm... What do you mean how??
    Where ?
    Inside the web ;-)
    -Rohit

  • How to transfer parameters to Webdynpro Java application ?

    Hello guys,
    I had developed a Webdynpro Java application "ZWD", it's URL is
    "http://jt-pldev:50000/webdynpro/dispatcher/local/ZWD_FLIGHT/ZWD".
    "ZWD" had 2 input parametere "InputField" and "InputField1" .
    Accroding to SAP Online Help  document, we can transfer parameter Webdynpro application .
    I want to transfer parameters to application "ZWD"  via URL
    "http://jt-pldev:50000/webdynpro/dispatcher/local/ZWD_FLIGHT/ZWD?InputField=Frankfurt" .
    But it failed.
    My questions:
    1. How to transfer parameter to Webdynpro Java application "ZWD" ?
    2. Does it possible that transfer input parameter to Webdynpro application and run the applicaiton via specific URL ?
    BR,
    Louis

    Hi Louis,
    You can refer to the following Bertram's article:
    [Inter-Application-Navigation in Web Dynpro|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sapportals.km.docs/library/user-interface-technology/wd%20java/wdjava%20archive/inter-application-navigation%20in%20web%20dynpro.pdf]
    The process of accessing the Application URL parameters is explained for Target Component.
    Regards,
    Alka.

  • How to detect whether browser's java script  disabled or not from server

    How to detect whether browser's java script disabled or not from server side

    I would use a hidden parameter created by a javascript. if this is null, javascript is disabled...

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

  • How do i show javascript into  java application?

    hi
    ( please help me!!!!!!!!!!!!!!!!!)
    how do i run javascript into java application ?( looks like microsoft frontpage )
    thank you ?

    There is a JavaScript interpreter called Rhino implemented in Java, maybe you can use it: http://www.mozilla.org/rhino/

  • How to add images into a java application (not applet)

    Hello,
    I am new in java programming. I would like to know how to add images into a java application (not an applet). If i could get an standard example about how to add a image to a java application, I would apreciated it. Any help will be greatly apreciated.
    Thank you,
    Oscar

    Your' better off looking in the java 2d forum.
    package images;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.FileInputStream;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    /** * LogoImage is a class that is used to load images into the program */
    public class LogoImage extends JPanel {
         private BufferedImage image;
         private int factor = 1; /** Creates a new instance of ImagePanel */
         public LogoImage() {
              this(new Dimension(600, 50));
         public LogoImage(Dimension sz) {
              //setBackground(Color.green);      
              setPreferredSize(sz);
         public void setImage(BufferedImage im) {
              image = im;
              if (im != null) {
                   setPreferredSize(
                        new Dimension(image.getWidth(), image.getHeight()));
              } else {
                   setPreferredSize(new Dimension(200, 200));
         public void setImageSizeFactor(int factor) {
              this.factor = factor;
         public void paintComponent(Graphics g) {
              super.paintComponent(g);
              //paint background 
              Graphics2D g2D = (Graphics2D) g;
              //Draw image at its natural size first. 
              if (image != null) {
                   g2D.drawImage(image, null, 0, 0);
         public static LogoImage createImage(String filename) { /* Stream the logo gif file into an image object */
              LogoImage logoImage = new LogoImage();
              BufferedImage image;
              try {
                   FileInputStream fileInput =
                        new FileInputStream("images/" + filename);
                   image = ImageIO.read(fileInput);
                   logoImage =
                        new LogoImage(
                             new Dimension(image.getWidth(), image.getHeight()));
                   fileInput.close();
                   logoImage.setImage(image);
              } catch (Exception e) {
                   System.err.println(e);
              return logoImage;
         public static void main(String[] args) {
              JFrame jf = new JFrame("testImage");
              Container cp = jf.getContentPane();
              cp.add(LogoImage.createImage("logo.gif"), BorderLayout.CENTER);
              jf.setVisible(true);
              jf.pack();
    }Now you can use this class anywhere in your pgram to add a JPanel

  • How To Open Word In Java Application

    Hello
    How To Open Ms-Word Or Ms-Excel Or Any Other Format In Java Application
    According To Their Own ForMat

    The best is to know which program you like to execute. Make those many strings available. Suppose you like to execute M$ Word and M$ Excel. Now do like this..
    String word = "";  // null
    String excel = ""; //null
    /* In the File Class you can find out the methods that can search these files and return thier
    absolute and relative paths. Save those paths in uppe String(s) word and excel and place them in
    runtime.exec( word/excel)...etc. Place this code before a tolbar button and click that..*/

  • How to connect other mobile web browser to java application.

    I'm trying to write an application in j2me and wondering how can i take the requested url from the default web browser of mobile phone to my java application and download page using java application and send the downloaded data to that browser.
    I don't know any API that do this.
    Please help...

    take a look at [Java ME Content Handler API (CHAPI), JSR 211|http://java.sun.com/products/chapi/]
    - CHAPI +"...manages the action to handle [Uniform Resource Identifiers|http://en.wikipedia.org/wiki/Uniform_Resource_Identifier|Wikipedia article] (URI) based on a MIME-type or scheme. CHAPI provides the capabilities for browsers and native applications as well as Java ME applications to invoke other Java ME applications which dynamically extend the media types and capabilities supported by the device's application environment...."+

  • How to let users run your Java application

    Hello,
    I'm writing an application using JBuilder7 and it's wonderful designer: so far it is composed by only 2 class and imports java.awt.* and javax.swing.* (SDK 1.4)
    Now, I've yet to finish it but I was wondering: "how will users be able to use it?"
    I don't want them to install 30+ Mb of SDK so I've looked into the forums and elsewhere and come up with several answers:
    1) Let them install JRE: but it's 10+ Mb and they would need to download it separately from my program.
    2) Let them use somehow their browser's JVM..(should I turn my application into applet for this? I guess so)
    3) Make an .exe: I know there are many programs to make .exe from java but they would make a one-platform-based file.
    Also there were many hints about using .jar files to get things easier.
    Is there a 4th option in which users have to download only a few mbs to use the application?
    And about .jar, how should I use it?
    Thank you very much for all your help :)

    Simply put - the users must download or be supplied the JRE. This must be installed before they can execute your java application.
    As to distributing the application itself - You can jar (Java Archive) your classes into a single file.
    You could as has been suggested create an EXE, but these generally are very large and tend to severely restrict the range of java technologies able to be used (EG Serialization, RMI, Reflection, class loading, ...)
    Java is not intended for little tools that get installed separately - It is intended for larger applications or small applets in which case the download of the JRE is a minor concern.
    Note that applets targeting Java 1.1.7 functionality work fine with most old browsers inbuilt JVMs - Your customers browser may not however have an inbuilt JVM and the user will still need to download the JRE to execute a SWING based applets.
    Talden

  • Closing the IE browser thro' Java application

    Hi,
    I have a requirement wherein I have to close the applications launched like (Internet exploer window) thro my java application.
    Can anyone help me on this?
    I tried using Runtime class Process.destroy( ) method. But still not able to find the exact one.
    Thanks.

    maybe this is because the code did not create the process directly, ao destory() method doesn't work as expected.
    Process ps = Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + "my website open here")
    maybe ps not reference to the process create by rundll32
    then there is no way to close a browser directly from java application?

Maybe you are looking for

  • Word & Excel for Mac - any good?

    I took a while to adapt from Word to Pages, but now I'm perfectly happy and the Mac is the best thing ever... whole different planet to microsoft and windoze. However, I've been given Microsoft Office Mac: Home & Student edition as a Christmas presen

  • CS4 software serial number

    Installed my cs4 software on new mac but serial number is not being recognised. I have de installed from previous mac about 12 hours ago. Do I need to do anything else to allow it to work? Currently only trial version operating.

  • Rotate entire .swf OR load interactive .swf into .fla?

    Hello, I've searched extensively for solutions to my problem and decided to come here finally. I need to rotate an entire .swf flash game from horizontal display to vertical display. Not a change in aspect ratio, but a 90-degree rotation. Having foun

  • Can anyone guide me on how to retrieve a stolen Apple 1 IPad ?

    Can anyone help me how I could retrieve a stolen Apple 1 IPad ?  I have the Walmart receipt for it.

  • Photoshop Elements 12 and Windows 8.1 error message

    Hi, I have just installed Photoshop Elements 12 on my laptop which went fine. but when I search the computer for photograph's the following error appears; ''Direct X/Direct Play could not be initialised. Please be sure that it is installed on your sy