Problem to launch browser from URL

Hi All,
I need to launch a web browser from a URL (to send the user from ESS to a benefits provider web site). I created the resource and the service for the URL  in the IMG on R/3 and set it to open the URL on a separate page. I created the links to the URL and they show fine on the iview, but when I click on them, nothing happens.  Does anybody know what I am missing? Do I need to create a URL iview for this? Or how do I do it?
I will appreciate any help on this.

Nagaraju,
thanks for the help. The thred you sent me linked me to another thred which is the one that actually gave me the answer to my problem, but either way you helped me solve the issue. I tried to give you full points but I get an error message that the item is locked for rewarding points, sorry. Either way, this item has been solved.
Thank you.

Similar Messages

  • Launching Browser from Swing Applicaton....

    Hi,
    i am launching browser from my swing application.While opening HTML file, always the HTML file goes behind the application.Everytime i have to maximize the html file window.
    i want the HTML file to come up in front of the swing application.
    any help please ??? itz very urgent.....
    Thanks in advance.
    Manikandan

    Browser Utility - Class to launch a URL in a web browser in
    a platform independent manner. Includes an optional swing
    GUI allowing user customization. [Open Source - GPL]
    http://ostermiller.org/utils/Browser.html
    BrowserLauncher - Open the system web browser with
    particular attention paid to various Macintosh systems.
    (Freeware)
    http://browserlauncher.sourceforge.net/
    Java World - With a little platform-specific Java code, you
    can easily use your system's default browser to display any
    URL in Windows or Unix.
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
    JConfig - Class Libraries that allow a URL to be launched in
    a browser on Windows, Unix, or Macintosh. [Commercial]
    http://www.tolstoy.com/samizdat/jconfig.html
    Apple - MRJFileUtils.openURL() not implemented in Mac OS X.
    http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#MRJToolkit
    Apple - How one would open a URL in a web browser on a
    Macintosh.
    http://developer.apple.com/qa/java/java12.html

  • Launching Browser from Java when Browser URL is very  long

    Hi,
    I am trying to launch a browser from Java.
    I am doing the following.
    String command = "cmd" + "/c" + "start" + " browserURL";
    Process p = Runtime.getRuntime()exec(command);
    Note: My browserURL is very long.
    Now the browser is invoked. But the URL shown is incomplete and hence
    browser is unable to open the required application.
    Can someone help me in this.
    One way is to increase the buffer size on the command prompt?
    Is there any java command for this?
    Is there any other way to solve this issue.
    Thanks,
    AR

    this is my second time posting this, take note of it. I can't remember where i got it from, but credits go to the person that wrote it. It has helped me out thousands of times!!!
    to use, compile, then call from your program:
    org.newio.utils.BrowserLauncher.openURL("your url here")dfwtc
    package org.newio.utils;
    import java.io.File;
    import java.io.IOException;
    import java.lang.reflect.*;
    public class BrowserLauncher
        private static int jvm;
        private static Object browser;
        private static boolean loadedWithoutErrors;
        private static Class mrjFileUtilsClass;
        private static Class mrjOSTypeClass;
        private static Class macOSErrorClass;
        private static Class aeDescClass;
        private static Constructor aeTargetConstructor;
        private static Constructor appleEventConstructor;
        private static Constructor aeDescConstructor;
        private static Method findFolder;
        private static Method getFileType;
        private static Method makeOSType;
        private static Method putParameter;
        private static Method sendNoReply;
        private static Object kSystemFolderType;
        private static Integer keyDirectObject;
        private static Integer kAutoGenerateReturnID;
        private static Integer kAnyTransactionID;
        private static final int MRJ_2_0 = 0;
        private static final int MRJ_2_1 = 1;
        private static final int WINDOWS_NT = 2;
        private static final int WINDOWS_9x = 3;
        private static final int OTHER = -1;
        private static final String FINDER_TYPE = "FNDR";
        private static final String FINDER_CREATOR = "MACS";
        private static final String GURL_EVENT = "GURL";
        private static final String FIRST_WINDOWS_PARAMETER = "/c";
        private static final String SECOND_WINDOWS_PARAMETER = "start";
        private static final String NETSCAPE_OPEN_PARAMETER_START = " -remote 'openURL(";
        private static final String NETSCAPE_OPEN_PARAMETER_END = ")'";
        private static String errorMessage;
        private BrowserLauncher()
        private static boolean loadClasses()
            switch(jvm)
            default:
                break;
            case 0: // '\0'
                try
                    Class aeTargetClass = Class.forName("com.apple.MacOS.AETarget");
                    macOSErrorClass = Class.forName("com.apple.MacOS.MacOSError");
                    Class osUtilsClass = Class.forName("com.apple.MacOS.OSUtils");
                    Class appleEventClass = Class.forName("com.apple.MacOS.AppleEvent");
                    Class aeClass = Class.forName("com.apple.MacOS.ae");
                    aeDescClass = Class.forName("com.apple.MacOS.AEDesc");
                    aeTargetConstructor = aeTargetClass.getDeclaredConstructor(new Class[] {
                        Integer.TYPE
                    appleEventConstructor = appleEventClass.getDeclaredConstructor(new Class[] {
                        Integer.TYPE, Integer.TYPE, aeTargetClass, Integer.TYPE, Integer.TYPE
                    aeDescConstructor = aeDescClass.getDeclaredConstructor(new Class[] {
                        java.lang.String.class
                    makeOSType = osUtilsClass.getDeclaredMethod("makeOSType", new Class[] {
                        java.lang.String.class
                    putParameter = appleEventClass.getDeclaredMethod("putParameter", new Class[] {
                        Integer.TYPE, aeDescClass
                    sendNoReply = appleEventClass.getDeclaredMethod("sendNoReply", new Class[0]);
                    Field keyDirectObjectField = aeClass.getDeclaredField("keyDirectObject");
                    keyDirectObject = (Integer)keyDirectObjectField.get(null);
                    Field autoGenerateReturnIDField = appleEventClass.getDeclaredField("kAutoGenerateReturnID");
                    kAutoGenerateReturnID = (Integer)autoGenerateReturnIDField.get(null);
                    Field anyTransactionIDField = appleEventClass.getDeclaredField("kAnyTransactionID");
                    kAnyTransactionID = (Integer)anyTransactionIDField.get(null);
                    break;
                catch(ClassNotFoundException cnfe)
                    errorMessage = cnfe.getMessage();
                    return false;
                catch(NoSuchMethodException nsme)
                    errorMessage = nsme.getMessage();
                    return false;
                catch(NoSuchFieldException nsfe)
                    errorMessage = nsfe.getMessage();
                    return false;
                catch(IllegalAccessException iae)
                    errorMessage = iae.getMessage();
                return false;
            case 1: // '\001'
                try
                    mrjFileUtilsClass = Class.forName("com.apple.mrj.MRJFileUtils");
                    mrjOSTypeClass = Class.forName("com.apple.mrj.MRJOSType");
                    Field systemFolderField = mrjFileUtilsClass.getDeclaredField("kSystemFolderType");
                    kSystemFolderType = systemFolderField.get(null);
                    findFolder = mrjFileUtilsClass.getDeclaredMethod("findFolder", new Class[] {
                        mrjOSTypeClass
                    getFileType = mrjFileUtilsClass.getDeclaredMethod("getFileType", new Class[] {
                        java.io.File.class
                    break;
                catch(ClassNotFoundException cnfe)
                    errorMessage = cnfe.getMessage();
                    return false;
                catch(NoSuchFieldException nsfe)
                    errorMessage = nsfe.getMessage();
                    return false;
                catch(NoSuchMethodException nsme)
                    errorMessage = nsme.getMessage();
                    return false;
                catch(SecurityException se)
                    errorMessage = se.getMessage();
                    return false;
                catch(IllegalAccessException iae)
                    errorMessage = iae.getMessage();
                return false;
            return true;
        private static Object locateBrowser()
            if(browser != null)
                return browser;
            switch(jvm)
            case 0: // '\0'
                try
                    Integer finderCreatorCode = (Integer)makeOSType.invoke(null, new Object[] {
                        "MACS"
                    Object aeTarget = aeTargetConstructor.newInstance(new Object[] {
                        finderCreatorCode
                    Integer gurlType = (Integer)makeOSType.invoke(null, new Object[] {
                        "GURL"
                    Object appleEvent = appleEventConstructor.newInstance(new Object[] {
                        gurlType, gurlType, aeTarget, kAutoGenerateReturnID, kAnyTransactionID
                    return appleEvent;
                catch(IllegalAccessException iae)
                    browser = null;
                    errorMessage = iae.getMessage();
                    return browser;
                catch(InstantiationException ie)
                    browser = null;
                    errorMessage = ie.getMessage();
                    return browser;
                catch(InvocationTargetException ite)
                    browser = null;
                    errorMessage = ite.getMessage();
                    return browser;
            case 1: // '\001'
                File systemFolder;
                try
                    systemFolder = (File)findFolder.invoke(null, new Object[] {
                        kSystemFolderType
                catch(IllegalArgumentException iare)
                    browser = null;
                    errorMessage = iare.getMessage();
                    return browser;
                catch(IllegalAccessException iae)
                    browser = null;
                    errorMessage = iae.getMessage();
                    return browser;
                catch(InvocationTargetException ite)
                    browser = null;
                    errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException().getMessage();
                    return browser;
                String systemFolderFiles[] = systemFolder.list();
                for(int i = 0; i < systemFolderFiles.length; i++)
                    try
                        File file = new File(systemFolder, systemFolderFiles);
    if(file.isFile())
    Object fileType = getFileType.invoke(null, new Object[] {
    file
    if("FNDR".equals(fileType.toString()))
    browser = file.toString();
    return browser;
    catch(IllegalArgumentException iare)
    browser = browser;
    errorMessage = iare.getMessage();
    return null;
    catch(IllegalAccessException iae)
    browser = null;
    errorMessage = iae.getMessage();
    return browser;
    catch(InvocationTargetException ite)
    browser = null;
    errorMessage = ite.getTargetException().getClass() + ": " + ite.getTargetException().getMessage();
    return browser;
    browser = null;
    break;
    case 2: // '\002'
    browser = "cmd.exe";
    break;
    case 3: // '\003'
    browser = "command.com";
    break;
    case -1:
    default:
    browser = "netscape";
    break;
    return browser;
    public static void openURL(String url)
    throws IOException
    if(!loadedWithoutErrors)
    throw new IOException("Exception in finding browser: " + errorMessage);
    Object browser = locateBrowser();
    if(browser == null)
    throw new IOException("Unable to locate browser: " + errorMessage);
    switch(jvm)
    case 0: // '\0'
    Object aeDesc = null;
    try
    try
    aeDesc = aeDescConstructor.newInstance(new Object[] {
    url
    putParameter.invoke(browser, new Object[] {
    keyDirectObject, aeDesc
    sendNoReply.invoke(browser, new Object[0]);
    catch(InvocationTargetException ite)
    throw new IOException("InvocationTargetException while creating AEDesc: " + ite.getMessage());
    catch(IllegalAccessException iae)
    throw new IOException("IllegalAccessException while building AppleEvent: " + iae.getMessage());
    catch(InstantiationException ie)
    throw new IOException("InstantiationException while creating AEDesc: " + ie.getMessage());
    break;
    finally
    aeDesc = null;
    browser = null;
    case 1: // '\001'
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    break;
    case 2: // '\002'
    case 3: // '\003'
    Runtime.getRuntime().exec(new String[] {
    (String)browser, "/c", "start", url
    break;
    case -1:
    Process process = Runtime.getRuntime().exec((String)browser + " -remote 'openURL(" + url + ")'");
    try
    int exitCode = process.waitFor();
    if(exitCode != 0)
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    catch(InterruptedException ie)
    throw new IOException("InterruptedException while launching browser: " + ie.getMessage());
    break;
    default:
    Runtime.getRuntime().exec(new String[] {
    (String)browser, url
    break;
    static
    loadedWithoutErrors = true;
    String osName = System.getProperty("os.name");
    if("Mac OS".equals(osName))
    String mrjVersion = System.getProperty("mrj.version");
    String majorMRJVersion = mrjVersion.substring(0, 3);
    try
    double version = Double.valueOf(majorMRJVersion).doubleValue();
    if(version == 2D)
    jvm = 0;
    } else
    if(version >= 2.1000000000000001D)
    jvm = 1;
    } else
    loadedWithoutErrors = false;
    errorMessage = "Unsupported MRJ version: " + version;
    catch(NumberFormatException numberformatexception)
    loadedWithoutErrors = false;
    errorMessage = "Invalid MRJ version: " + mrjVersion;
    } else
    if(osName.startsWith("Windows"))
    if(osName.indexOf("9") != -1)
    jvm = 3;
    } else
    jvm = 2;
    } else
    jvm = -1;
    if(loadedWithoutErrors)
    loadedWithoutErrors = loadClasses();
    suck my balls

  • How do you launch browser from a servlet

    I have an interesting issue here. I send data to a servlet and the servlet recieves and processes the data (confirmed through breakpoints) but I want to display the data in a JSP or directly thru the servlet using html tags.
    However I can forward or redirect the data from the servlet to my jsp code but this still doesn't launch a browser.
    A little more detail... I am not sending information from a JSP to the servlet. The servlet is listening on a port for input, so the servlet is being invoked directly when the data comes in. In the current state my servlet sends the results in a session object to a JSP which gets the results but can't display them since it doesn't launch browser.
    Does anybody know how to display my calculated results from the servlet in a browser?

    Ok let me try to be more specific. I have an application that sends data to the servlet over a socket connection. The servlet gets this data and multiplies it by a factor.
    When I put break points in, I see that the servlet gets this data.
    Now I am trying to display the data in a browser.
    Upon entry to doGet the servlet checks if the String variable that gets the parameter is not null. If it is not null then it forwards to a JSP.
    But I tried a scenario where I have a browser open that has the localhost address of the servlet and then I run the program which is outside the war file that contains the servlet to send data to the servlet, but when the servlet gets the data, it does the forward to the JSP but the page is not displayed. However I see the process move to the JSP thru the break points I put in.
    I know its kind of a weird scenario but I suspect that since the program calls the servlet and it gets the data, it must need to launch a new browser in order to be able to display the JSP it forwarded to.
    I could be wrong but so far I have exhausted all possible ideas in my head for now so if you understand what I am saying perhaps you can tell me if you know a better way to do this...
    Thanks

  • CTS+ in PI 7.10 - problem starting cts browser from stms

    Hi folks!
    We have successfully configured and tested CTS+ for PI 7.1 ESR and ID objects as well as for 7.1 SLD objects. So far the world is "brave".
    But we have one little issue and after scanning SMP and SDN it seems as if we are the only ones all over the world having this problem.
    When we launch the CTS Browser (Transport Organizer WebUI) from ESR, ID and/or SLD and/or manually by entering the URL in the browser the CTS browser starts as desired. But when we try to start it from within ABAP transaction STMS (via Icon or via F7) only an empty browser window is launched, but not the CTS borwser in it.
    Has anybody any ideas what's going on here?
    Thanx in advance,
    Regards,
    Volker

    Hi Volker,
    This will work with SAP GUI SP09 or higher.
    Regards,
    Sunil Deopurkar

  • Launching BSP from url in email

    Happy New Year,
    I have a page that automatically generates an e-mail and sends it out to a user.  Inside that e-mail is a link to a page from the same BSP application where the e-mail was created.  When I click the link, it launches the correct page, but it gives me the message, "An internal error occurred. Please try again later."
    I call the .do file, in which it calls the .bsp file.
    I have tried to debug the class method Do Init(), but it's like it doesn't get to it before it crashes.  What could be causing this problem?  This is an MVC BSP.
    Is there some documentation out there on this?
    Best regards,
    Kevin

    Hi Kevin
    I am afraid this approach will not work...
    The eRecruitment 3.0 BSP pages were developed prior to the completion of the full MVC implementation by SAP. As a result they have created their own controllers which inherit from the CL_BSP_CONTROLLER2 standard controller class. These controller classes link into other HRRCF classes at runtime, it is therefore not possible to call the individual pages directly.
    You can only call the eRecruitment pages from outside a current session in two ways. The first is via a start page and the second is via an HRRCF logical application.
    The ABAP report RCF_GENRATE_URL and RCF_GENERATE_URLS will give you some idea of the possible entry points. RCF_GENERATE_URL can be called to give the required URL for either a given start page or a given logical application.
    Adding new logical applications can be achieved by configuring table T77RCF_LOG_APPL and T77RF_LOG_APPLT. The new logical application must have a stand along controller, to see an example of these look at the BSP application HRRCF_PERS_SETT where you will find the controller MAIN_SA.DO [ SA stands for stand alone ] on occasions were no separate controller is required for stand alone use you may find the the main controller [ with _M ] will be called.
    All pages will be called via the base application HRRCF_START_INT [ for users known to the system ] or HRRCF_START_EXT [ user external to the system ]. These applications will instantiate the necessary framework before calling the logical application or start application pages...
    You can see this from the URLs when browsing the system. Normally you will be pointing at /hrrcf_start_int/application.do OR /hrrcf_start_ext/application.do
    Hope that helps
    Jon Bowes

  • Launching EAS from URL not working on client machine.

    We are on version 11.1.1.4. When I use EAS URL on the server it is working fine. But when I use from a different machine other than the server it is not working, after selecting the "locale country" and clicking launch button it is giving the following error. i checked the java version also and client machine is on 1.6. I also tried on different IE versions. But from the same client machine I am able to connect through the installed version of EAS.
    Is something I need to open ports or anything like that. Please let me know your suggestions or comments.
    HTTP Status 404 -
    type status report
    description the requested resource () is not available
    Hyperion embedded java container/1.0.0
    Thanks,

    Shiva -- Java version on the server and the client machine is same which is 1.6.0_24.
    That is good point about the network. Actually the client and the server are not in the same network but I opened ports on the network router as well as I disabled windows firewall on the server to make sure it is not creating the problem.

  • Launching Browser From Swing Application - Help Needed

    Hi,
    I am opening a HTML file in Internet Explorer from my swing application.
    I am using the code given below
    private final static String WIN_FLAG = "url.dll,FileProtocolHandler";
    private final static String WIN_PATH = "rundll32";
    String cmd = WIN_PATH + " " + WIN_FLAG + " " + url;
    // url is HTML file Path
    Process p = Runtime.getRuntime().exec( cmd );
    The HTML file is opening up,but it always opens behind the swing application,that makes me every time to maximize the HTML file after it being opened up.
    I want to open it in front of the Swing Application.
    Any Help Please ?
    - Manikandan

    Browser Utility - Class to launch a URL in a web browser in
    a platform independent manner. Includes an optional swing
    GUI allowing user customization. [Open Source - GPL]
    http://ostermiller.org/utils/Browser.html
    BrowserLauncher - Open the system web browser with
    particular attention paid to various Macintosh systems.
    (Freeware)
    http://browserlauncher.sourceforge.net/
    Java World - With a little platform-specific Java code, you
    can easily use your system's default browser to display any
    URL in Windows or Unix.
    http://www.javaworld.com/javaworld/javatips/jw-javatip66.html
    JConfig - Class Libraries that allow a URL to be launched in
    a browser on Windows, Unix, or Macintosh. [Commercial]
    http://www.tolstoy.com/samizdat/jconfig.html
    Apple - MRJFileUtils.openURL() not implemented in Mac OS X.
    http://developer.apple.com/techpubs/macosx/ReleaseNotes/JavaGMWebReleaseNotes.html#MRJToolkit
    Apple - How one would open a URL in a web browser on a
    Macintosh.
    http://developer.apple.com/qa/java/java12.html

  • Problem to run forms from URL

    Hello all:
    I need help to solve this problem, I great URL to run forms from browser , then I teak the URL and go to another machine. When I run the URL the browser closed and gives message to send report to Microsoft or not. I tray this again and the browser closed again and give the same message.
    I teak the URL and make it as link to call forms java code ,then before the forms started the browser closed again and give the same message.
    So please can anyone help me in this.
    Thanks for anticipation.

    hello Gerd Volberg :
    thanks for replying, i use database and forms 10g Release 2 .the application server is oracle application server 10g Release 2 (10.1.2).
    the url is
    http://localhost:8889/forms/frmservlet?config=spewin&userid=hr/hr@orcl&form=E:\final_form\test.fmx&otherparams=USID=10070+COMID=5554442075
    thanks

  • Error occurred when launch browser from BEx

    Dear All,
    i have problem when i tried to display my query from Bex to Web browser. or the same problem occurred when i open the portal BI open tab Business Intelligent --> BEx Web Analyzer. i already maintained the parameter for icm/host_name_full. please refer to this link to see the message error.
    http://docs.google.com/leaf?id=0B3rgxsXR4tPzNjBiODM3NDItY2UxNy00OWY5LWFiYjMtNTVkYzU2YTM4ZWU3&sort=name&layout=list&num=50
    please kindly to help.
    Best Regards,
    dinie.

    Hi Gochi,
    you mean alias in BW system, like /etc/hosts? if yes here is the list.
    #BW Systems
    172.16.1.18     prodbwbo       prodbwbo.elnusa.co.id
    172.16.1.14     devbwbo          devbwbo.elnusa.co.id
    172.16.1.15     qabwbo          qabwbo.elnusa.co.id
    172.16.1.37 eoffice
    if no, please explain me more specific,  what is SAP_BW? is tcode or what. and about table RST_P_PORTAL, it gives me message "Table RST_P_PORTAL is not active in the Dictionary". so what should i do next?
    Regrads,
    dinie.

  • Problem with opening browser from Java app.

    Hi guys, I'm not sure if this is the right place to post this, so please excuse me if I'm wrong. I'm trying to open an html page (it's a help file) from a Java application. I'm currently using java.awt.Desktop.     browse(URI uri); which gets the job done, as long as I don't pass any parameters to the page. (e.g. http://www.site.com/site.html?param1=1). Doing that gives me an IOException. Is there a way to do this without using the JNLP API?

    This is the file path copied directly from the browser's address bar:
    file:///home/riaan/EMCHelp/Help.html?page=WorkFlowActivityCategory.html"{code}
    Which causes the app to throw an exception, but when I change it to:
    {code}file:///home/riaan/EMCHelp/Help.html{code}
    it opens Help.html in the browser.  That's why I thought that it might be the query that's a problem.  Perhaps it's a simple issue of not escaping a character or something that I failed to see.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problem loading & displaying images from URL

    hi,
    I can't manage to display an image into a component from a url... here is what my code looks like :
    public class ImageComponent extends JComponent{
        private ImageIcon imageIcon;
        public void paint(Graphics g){
            if(imageIcon!=null){
                imageIcon.paintIcon(this, g, posX, posY);
        private void loadsImage(String imageURL){
            imageIcon = new javax.swing.ImageIcon(imageURL);
            invalidate();
    }when I call loadImage with a proper url, the image doesn't seem to be loaded...
    it might be that the image is big and long to come (also my connection isn't that fast)... but forcing the repaint of the component (by hiding/showin the component's window) after a good while doesn't do much...
    can anybody tell me where I'm doing wrong...
    cheers,
    DrLeinster

    hi,
    looks like PaintComponent() instead of paint did the job.
    thanks a million..
    for those interested in loading images, I find ImageIcon very limited and at the end I found a better solution :
    public class ImageComponent extends JComponent implements ImageObserver{
        private Image image;
        public void loadImage(URL imageURL){           
                image = Toolkit.getDefaultToolkit().getImage(imageURL);
                prepareImage(image,getWidth(),getHeight(), this);
        public boolean imageUpdate(Image img, int infoflags, int x, int y, int width, int height){
            System.out.print("."); // loading progress...
        public void paintComponent(Graphics g){
            if(image!=null){
                 g.drawImage(image,0,0,null);
    }it is far nicer as it displays dots while loading... up to you to attach progress bars or favorit loading guizmo...
    DrLeinster.

  • Applescript to launch browser from a list of many... needs help completing

    Need some help with this, I can't seem to find any info on this, or my just bad at searching the net
    So I wanted to make a script that would list a number of web browsers and then launch the one that was selected.
    set AppName to {"Safari", "Firefox", "Opera", "Google Chrome", "SeaMonkey", "Camino", "OmniWeb"}
    set AppName1 to {choose from list AppName}
    tell application AppName1 to open
    Please could someone help me correct this.
    Many Thanks ~ in advance

    Here:
    set AppName to {"Safari", "Firefox", "Opera", "Google Chrome", "SeaMonkey", "Camino", "OmniWeb"}
    set AppName1 to (choose from list AppName) as string
    tell application AppName1 to run
    (51697)

  • Problem accessing a file from URL connection

    My swing application uses a file(5MB).
    I tried to open an inputStrem to this file using following codes:
    URL u = new URL("http://..../myfile.jat");
    URLConnection uconn = u.openConnection();
    InputStream iin = uconn.getInputStream();
    DataInputStream in = new DataInputStream(iin);
    System.out.println(iin.available());
    But it gives me available number of bytes sometimes 6761 and sometimes
    1711. But I need the available # of bytes to be equal to 5B.
    can anybody tell me how I can do that?
    thanks

    I think this got posted in the wrong forum, but at any rate: the "available()" method tells you how much data is available to be read at this instant. As soon as you read that data, more data will become available. Write a loop that reads repeatedly until there is no more data available.

  • How do I launch report from menu using RUN_REPORT_OBJECT?

    Hi all,
    Re: How do I launch report from menu (and have it print to the screen) using RUN_REPORT_OBJECT?
    I am using Oracle 9iAS on Windows 2000 and I have a similar problem with launching reports from the menu. The application should call the report via the RUN_REPORT_OBJECT builtin feature from Forms. The report is never displayed.
    The report is in the same folder as the menu form calling it. Do the reports have to be in a specific format? How do I get the report_id?
    The name of the report is seconds_calls. No user-specified parameters are passed. Also, the report object in the object navigator in Forms is Report4 (is this relevant?)
    When I try to run report via the form using this code:
    DECLARE
         report_id REPORT_OBJECT;
         rep_status VARCHAR2(200);
         v_rep VARCHAR2(100);          
         report_job_id VARCHAR2(200);
    --     job_number NUMBER;
    --     server_name VARCHAR2(200) := 'repserver';
    BEGIN
         report_id:= FIND_REPORT_OBJECT('seconds_calls');
         rep_status:=REPORT_OBJECT_STATUS(report_job_id);
         v_rep := RUN_REPORT_OBJECT(report_id);
    END;
    I get this error message:
    FRM-41219 Cannot find report:Invalid ID
    And this message
    FRM-40738 Argument 1 to builtin RUN_REPORT_OBJECT cannot be null
    When I tried to use the same code (above), substituting the object name for the form name,
    I got these messages:
    FRM-41219 Cannot find report:Invalid ID
    FRM-40738 Argument 1 to builtin RUN_REPORT_OBJECT cannot be null
    And FRM-10259 Invalid null argument to packaged procedure or function (???)
    Any ideas?
    Cheers,
    Pippa

    Philippy,
    substr(v_rep,instr(v_rep,'_',-1)+1)
    This code extracts the Reports job id from the Reports Server name. The run_report_object() built-in
    retrieves e.g. RepServ_9 as a job id, but in Reports9i you only need the '9' as a value to retrieve the
    output.
    Use the following sample a template. It is a procedure that expects the reports object name, teh reports server name and the
    output format as an argument. The call to Web.show_document expects the ReportsSrevices to be accessible from teh same server
    (relative addressing is used)
    PROCEDURE RUN_REPORT_OBJECT_PROC (vc_reportobj Varchar2, vc_reportserver varchar2, vc_runformat varchar2) IS
    v_report_id           Report_Object;
    vc_ReportServerJob      VARCHAR2(100); /* unique id for each Report request */
    vc_rep_status      VARCHAR2(100); /* status of the Report job */
    vjob_id               VARCHAR2(100); /* job_id as number only string*
    BEGIN
    /* Get a handle to the Report Object itself. */
    v_report_id:= FIND_REPORT_OBJECT(vc_reportobj);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,CACHE);
    /* Define the Report output format and the name of the Reports Server as well as a user-defined parameter, passing the department number from Forms to the Report. We don't need a parameter form to be displayed, and therefore paramform is set to "no". */
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT, vc_runformat);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER, vc_reportserver);
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_OTHER,      'p_deptno='||:dept.deptno||'paramform=no');
    vc_ReportServerJob:=RUN_REPORT_OBJECT(report_id);
    /* remove the Reports Server name from teh job id */
    vjob_id := substr(vc_ReportServerJob,length(reportserver)+2,length(vc_ReportServerJob));
    /* Check the report status if finished. */
    vc_rep_status := REPORT_OBJECT_STATUS(vc_ReportServerJob);
    IF vc_rep_status='FINISHED' THEN
    /* Call the Report output to be displayed in a separate browser window.
    The URL for relative addressing is only valid when the Reports Server
    is on the same host as the Forms Server. For accessing a Remote Reports
    Server on a different machine, you must use the prefix http://hostname:port/ */
    WEB.SHOW_DOCUMENT ('/reports/rwservlet/getjobid '||vjob_id ||'?server='vc_reportserver,'_blank');
    ELSE
    message ('Report failed with error message '||vc_rep_status);
    END IF;
    END;
    Frank

Maybe you are looking for