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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • I have a problem with your purchase from the App Store

    I have a problem with your purchase from the App Store
    To understand the problem as well as view images on a flow
    https://www.icloud.com/photostream/#A7GI9HKK27lHY

    You will need to do what it says, contact iTunes Support. These are user-to-user support forums, if you thought you were contacting Apple by posting here. Go here:
    http://www.apple.com/emea/support/itunes/contact.html
    to contact the iTunes Store.
    Regards.

  • Problems with iMovie downloaded from the App Store

    I downloaded iMovie 11 from the App Store Yesterday. When I try to use it I get this message, "Missing QuickTime Component." "The QuickTime component necessary to view, edit, import and export MPEG2 movies is not installed." "It is included with the iMovie installed, Please re-install." I have tried to re-download it from the App Store and then get the message "Installed." I have searched the Apple site for information as to how to accomplish this to no avail. I have looked at the iMovie Help files all to no avail. Can anyone please tell me what to do to fix this. When installing from the App Store you do not seem to get a standard installer.
    Thanks to anyone who can help fix this problem.
    Mike

    When installing from the App Store you do not seem to get a standard installer.
    True.
    I have found that the physical possession of the software on a DVD or CD is a better way to go.
    In the event you have a computer problem and must rebuild your system or reinstall software, it is always easier to do so if you have the physical media in your possession.
    I would spend a few dollars more and purchase the iLife 11 disc.

  • Opening new default browser from java app

    Hi There,
    I would like to know if there is away to execute the following in a Java app that will open a new browser window.......in other words, I don't want it to take over the already opened window - just open a new window every time.
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler
    www.google.co.nz");Any help with this would be greatly receievd.

    There might be. However it would be done by modifying that Windows-specific command that you have in red there. As such it's nothing to do with Java. Searching in Windows-specific websites might get you somewhere.
    However Firefox gives the choice (new window, new tab, or same tab in same window) to the user as a configuration option, so I wouldn't bet on getting somewhere. I don't know if IE has a similar configuration option.

  • Problems with WLST embedded in java app.

    Hi,
    I have a problem with the WLST embedded in a java app.
    I want to programatically create or reconfigure a domain from a java application. Following is a simple example of what I want to do.
    import weblogic.management.scripting.utils.WLSTInterpreter;
    public class DomainTester {
      static WLSTInterpreter interpreter = new WLSTInterpreter();
      private void processDomain() {
        if(domainExists()) {
          System.out.println("Should now UPDATE the domain");
        } else {
          System.out.println("Should now CREATE the domain");
      private boolean domainExists() {
        try {
          interpreter.exec("readDomain('d:/myDomains/newDomain')");
          return true;
        }catch(Exception e) {
          return false;
    }The output of this should be one of two possibles.
    1. If the domain exists already it should output
    "Should now UPDATE the domain"
    2. If the domain does not exist it should output
    "Should now CREATE the domain"
    However, if the domain does not exist the output is always :
    Error: readDomain() failed. Do dumpStack() to see details.
    Should now UPDATE the domain
    It never returns false from the domainExists() method therefor always states that the exec() worked.
    It seams that the exec() method does not throw ANY exceptions from the WLST commands. The catch clause is never executed and the return value from domainExists() is always true.
    None of the VERY limited number of examples using embedded WLST in java has exception or error handling in so I need to know what is the policy to detect failures in a WLST command executed in java??? i.e. How does my java application know when a command succeeds or not??
    Regards
    Steve

    Hi,
    I did some creative wrapping for the WLSTInterpreter and I now have very good programatic access to the WLST python commands.
    I will put this on dev2dev somewhere and release it into the open source community.
    Don't know the best place to put it yet, so if anybody sees this and has any good ideas please feel free to pass them on.
    Here is the wrapper class. It can be used as a direct replacement for the weblogic WLSTInterpreter. As I can't overload the actual exec() calls because I want to return a String from this call I created an exec1(String command) that will return a String and throw my WLSTException which is a RuntimeException which you can handle if you like.
    It sets up stderr and stdout streams to interpret the results both from the Python interpreter level and at the JVM level where dumpStack() just seem to do a printStackTrace(). It also calls the dumpStack() command should the result contain this in its text. If either an exception is thrown from the lower level interpreter or dumpStack() is in the response I throw my WLSTException containing this information.
    package eu.medsea.WLST;
    import java.io.ByteArrayOutputStream;
    import java.io.PrintStream;
    import weblogic.management.scripting.utils.WLSTInterpreter;
    public class WLSTInterpreterWrapper extends WLSTInterpreter {
         // For interpreter stdErr and stdOut
         private ByteArrayOutputStream baosErr = new ByteArrayOutputStream();
         private ByteArrayOutputStream baosOut = new ByteArrayOutputStream();
         private PrintStream stdErr = new PrintStream(baosErr);
         private PrintStream stdOut = new PrintStream(baosOut);
         // For redirecting JVM stderr/stdout when calling dumpStack()
         static PrintStream errSaveStream = System.err;
         static PrintStream outSaveStream = System.out;
         public WLSTInterpreterWrapper() {
              setErr(stdErr);
              setOut(stdOut);
         // Wrapper function for the WLSTInterpreter.exec()
         // This will throw an Exception if a failure or exception occures in
         // The WLST command or if the response containes the dumpStack() command
         public String exec1(String command) {
              String output = null;
              try {
                   output = exec2(command);
              }catch(Exception e) {
                   try {
                        synchronized(this) {
                             stdErr.flush();
                             baosErr.reset();
                             e.printStackTrace(stdErr);
                             output = baosErr.toString();
                             baosErr.reset();
                   }catch(Exception ex) {
                        output = null;
                   if(output == null) {
                        throw new WLSTException(e);
                   if(!output.contains(" dumpStack() ")) {
                        // A real exception any way
                        throw new WLSTException(output);
              if (output.length() != 0) {
                   if(output.contains(" dumpStack() ")) {
                        // redirect the JVM stderr for the durration of this next call
                        synchronized(this) {
                             System.setErr(stdErr);
                             System.setOut(stdOut);
                             String _return = exec2("dumpStack()");
                             System.setErr(errSaveStream);
                             System.setOut(outSaveStream);
                             throw new WLSTException(_return);
              return stripCRLF(output);
         private String exec2(String command) {
              // Call down to the interpreter exec method
              exec(command);
              String err = baosErr.toString();
              String out = baosOut.toString();
              if(err.length() == 0 && out.length() == 0) {
                   return "";
              baosErr.reset();
              baosOut.reset();
              StringBuffer buf = new StringBuffer("");
              if (err.length() != 0) {
                   buf.append(err);
              if (out.length() != 0) {
                   buf.append(out);
              return buf.toString();
         // Utility to remove the end of line sequences from the result if any.
         // Many of the response are terminated with either \r or \n or both and
         // some responses can contain more than one of them i.e. \n\r\n
         private String stripCRLF(String line) {
              if(line == null || line.length() == 0) {
                   return line;
              int offset = line.length();          
              while(true && offset > 0) {
                   char c = line.charAt(offset-1);
                   // Check other EOL terminators here
                   if(c == '\r' || c == '\n') {
                        offset--;
                   } else {
                        break;
              return line.substring(0, offset);
    }Next here is the WLSTException class
    package eu.medsea.WLST;
    public class WLSTException extends RuntimeException {
         private static final long serialVersionUID = 1102103857178387601L;
         public WLSTException() {
              super();
         public WLSTException(String message) {
              super(message);
         public WLSTException(Throwable t) {
              super(t);
         public WLSTException(String s, Throwable t) {
              super(s, t);
    }And here is the start of a wrapper class for so that you can use the WLST commands directly. I will flesh this out later with proper var arg capabilities as well as create a whole Exception hierarchy that better suites the calls.
    package eu.medsea.WLST;
    // Provides methods for the WLSTInterpreter
    // just to make life a little easier.
    // Also provides access to the more generic exec(...) call
    public class WLSTCommands {
         public void cd(String path) {
              exec("cd('" + path + "')");
         public void edit() {
              exec("edit()");
         public void startEdit() {
              exec("startEdit()");
         public void save() {
              exec("save()");
         public void activate() {
              exec("activate(block='true')");
         public void updateDomain() {
              exec("updateDomain()");
         public String state(String serverName) {
              return exec("state('" + serverName + "')");
         public String ls(String dir) {
              return exec("ls('" + dir + "')");
         // The generic wrapper for the interpreter exec() call
         public String exec(String command) {
              return interpreter.exec1(command);
         private WLSTInterpreterWrapper interpreter = new WLSTInterpreterWrapper();
    }Lastly here is some example code using these classes:
    its using both the exec(...) and cd(...) wrapper commands from the WLSTCommand.class shown above.
        String machineName = ...; // get name from somewhere
        try {
         exec("machine=create('" + machineName + "','Machine')");
         cd("/Machines/" + machineName + "/NodeManager/" + machineName);
         exec("set('ListenAddress','10.42.60.232')");
         exec("set('ListenPort', 5557)");
        }catch(WLSTException e) {
            // Possibly the machine object already exists so
            // lets just try to look it up.
         exec("machine=lookup('" + machineName + "','Machine')");
    ...After this call a machine object is setup that can be allocated later like so:
         exec("set('Machine',machine)");Regards
    Steve

  • Strange problem with procedure calling from Java!!!

    I am using Oracle 8.1.7 Database, Oracle 8i Application server and WInNT platform.
    I am facing a strange problem while inserting a String from Java to Oracle database through Procedure. When i am passing the String containing single quotes(e.g "test' and ' and ' end") and without including any escape charactes for the single quotes I am passing the String by the setString() method then the procedure is inserting the single quotes without any problem.
    Of course when I am independently executing the procedure thru backend and passing the same String containing single quotes then the error message comes as " quoted string not properly terminated" which is justified,
    I have even printed the String in a file through sql on the runtime of the procedure when it is called by Java and then also the String contatins single quotes that is passed through java without any escape characters. This means that procedure is inserting the String into the column without any hassles!!!!!
    Can anyone tell me what may be the reason for the peculiar behaviour of Database?
    Thanks

    Sri Ram wrote:
    No actually in the documentation of oracle database 10g plsql user guide, oracle explains the concept of declaring nested plsql subprograms he gave the example but in the main block he gave NULL, without calling any procedure.Can you provide a link to where in the Oracle documentation you saw this example?
    in order to know which procedure is getting first i added a dbms statement in both the functions and called the function from the main block.
    the original example was
    DECLARE
    PROCEDURE proc1(number1 NUMBER); -- forward declaration
    PROCEDURE proc2(number2 NUMBER) IS
    BEGIN
    proc1(number2); -- calls proc1
    END;
    PROCEDURE proc1(number1 NUMBER) IS
    BEGIN
    proc2 (number1); -- calls proc2
    END;
    BEGIN
    NULL;
    END;
    ---------------------------------------------------------------------------------------------------------The original example is equivalent to:
    BEGIN
       NULL;
    END;That is, the main block never calls anything. Either you are misinterpreting the Oracle documentation, or if the example came from a non-Oracle source as I suspect, the author of that example has a deeply flawed understanding of how programming works.
    John

  • Problems with opening files from older iMacs on my iMac6, 1

    I can't open files from my older iMac Power PC G3 on my iMac6, 1. I keep getting the error message "file is used by Mac OS X and cannot be opened." The file types that won't open are .psd, .doc, and even some .pdfs. I was trying to transfer info from my old computer via flash/jump drive and nothings seems to work. PLEASE HELP!

    I can't open files from my older iMac Power PC G3 on my iMac6, 1. I keep getting the error message "file is used by Mac OS X and cannot be opened." The file types that won't open are .psd, .doc, and even some .pdfs. I was trying to transfer info from my old computer via flash/jump drive and nothings seems to work. PLEASE HELP!

  • Problems with opening files in correct app

    Hi guys
    Recently we have switched over at my company to OSX tiger. I work for a design firm doing artwork for various clients in the retail sector. We have a bank of logos and images on file that we use, mostly Illustrator eps saved in version 10 of the application. We are having problems opening these files in the right app. It keeps defaulting to opening in Photoshop. When we change the settings in get info and apply them to all, all our photoshop eps try and open in Illustrator. This is proving a real pain especially when opening the files from Quark after double clicking on the image and pressing the edit original button. Is there any way we can tell the system to open Illustrator files in Illustrator and Photoshop files in Photoshop.
    Cheers Thom

    Hi, Thom.
    You wrote: "We have a bank of logos and images on file that we use, mostly Illustrator eps saved in version 10 of the application. We are having problems opening these files in the right app. It keeps defaulting to opening in Photoshop. When we change the settings in get info and apply them to all, all our photoshop eps try and open in Illustrator."You are describing the procedure in "Mac OS X 10.4 Help: Changing the application that opens a document."
    The problem is due to the fact that a given file type or extension, e.g. .eps, can be bound via "Change All" to only one application. If you bind (set the default application) all .eps to Illustrator, that's what they'll all open in.
    For the situation you have, you need to bind the documents individually to the specific application. If you can gather a selection of the documents, you can use the contextual menu of the selection (Control-click or right-click the selection), hold the Option key, select "Always open with..." and select the desired application. The selected documents will open in that application and they will henceforth be bound to it until you again change the documents default application.
    You can reset all the default bindings you've defined by using the Tiger-specific procedure in my "Resetting Launch Services" FAQ. Start with Step 6 since you also want to eliminate user-defined bindings.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X
    Note: The information provided in the link(s) above is freely available. However, because I own The X Lab™, a commercial Web site to which some of these links point, the Apple Discussions Terms of Use require I include the following disclosure statement with this post:
    I may receive some form of compensation, financial or otherwise, from my recommendation or link.

  • Crystal Report - problem with passing parameters from J2EE app

    i'm trying to pass a few parameters from my java application to a crystal report using the code below:
    ParameterField pfield1 = new ParameterField();
    ParameterField pfield2 = new ParameterField();
    Values vals1 = new Values();
    Values vals2 = new Values();
    ParameterFieldDiscreteValue pfieldDV1 = new ParameterFieldDiscreteValue();
    ParameterFieldDiscreteValue pfieldDV2 = new ParameterFieldDiscreteValue();
    pfieldDV1.setValue("1056");//dform.getSelectedPeriod());
    pfieldDV1.setDescription("termId");
    vals1.add(pfieldDV1);
    pfield1.setReportName("");
    pfield1.setName("@p_termId");
    pfield1.setCurrentValues(vals1);
    fields.add(pfield1);
    // check here for null condition otherwise will throw nullpointerexception
    pfieldDV2.setValue("elect");
    pfieldDV2.setDescription("allocType");
    vals2.add(pfieldDV2);
    pfield2.setReportName("");
    pfield2.setName("@p_allocType");
    pfield2.setCurrentValues(vals2);
    fields.add(pfield2);
    this report calls a stored procedure (sql server). the report displays the data but the same is not the case when i call ity from my java application. with a single parameter it works fine (even though i get a "Some parameters are missing values" ERROR on the console. But when i pass, say 2 parameters, it give me the above error first and then "JDBC Error: Parameter 2 not set or registered for output"
    Can anyone bail me out of this one?
    thanks,
    ptalkad

    I don't know about naming conventions, but could the @ signs in the variable names cause a problem?
    How have you set up the mapping in Crystal?
    Is this parameter 2 an "out" parameter returning a value?
    What version of Java are you using?
    Version of Crystal?
    What JDBC driver?

  • Problems with data controls from java classes in JSF pages.

    Hi! We have a problem in our Application that we are developing with JSF pages using Data Controls generated from facades java classes. When we running a page in debug mode and the page are loading, if we insert a breakpoint in the first line of method referenced in the data control, the execution enter two times in the method, and this is a problem for us. How to solve this?
    We are using JDeveloper 11.1.1.2 with ADF faces.

    You might need to play around with the refresh property of the action binding.
    http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/adf_lifecycle.htm#BJECHBHF

  • Problem with calling Webservice from Java Webdynpro

    Hi,
    I have a scenario where I need to call a Webservice through my Webdynpro application. I need to pass few parameters(of type string) and the Webservice is suppose to retrun a few records based on the input values.
    When I run the webservice directly using the browser, the output is in XML format.
    When I create a model for the webservice in webdynpro, the return value is a Node element of type java.lang.Object. From webdynpro, I am successfully able to make a call to the Webservice (as there is no exception with model execute command), but the return value is always null. I am not sure if the webservice is not returning any data or if I am not reading the correct context element. There is no documentation available for the webservice either.
    Can anyone tell me what is that I am missing. Is it not possible for Webdynpro to call a webservice which can return only XML data?
    Any help on this issue would be greatly appreciated.
    Thanks,
    Sudheer

    Hi Sudheer,
    You can refer to wiki link (& other links available at the end in this)
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/wdjava/faq-Models-AdaptiveWebService
    Kind Regards,
    Nitin

  • Problem with opening RAWs from LR3 in CS5

    Hi,
    I came back from 3 weeks of shooting and was working on some picture when I tried to open one picture in Photoshop CS5 and instead of as usual opening the image in TIFF, CS5 opened the OPEN window to find a file ?!?!?!
    Someone could explain me what happened and how to solve this problem.
    I tried to check many preferences, and tried to open and close many times CS5 and LR3 but nothing, I am lost !
    Thanks for the help,
    Best

    Hi,
    I use the function Edit in from the LR menu Photo> edit in PS CS5. And after CS5 opens but asking for the file...Ok probelm solved without any answer.
    I tried again to open and now it opened the file without any problem...Very strange !
    But thanks !
    best

  • Open PDF from java app

    How can I create a link in a java standalone application to open a pdf file??? (with Acrobat)
    thanks

    And what do you mean by "link"?

  • Problem with opening Workitem from Outlook.

    Hi Experts,
    When I have have a workitem I receive a mail in my outlook with an SAP Icon. When I click the icon, it opens the SAP screen and I am unable to see my workitem and also cannot close my SAP. I have to close it from Task Manager by clicking End Process.
    Could you please let me know, what could be the reason.
    Thank you in advance.
    Best Regards,
    Sandipan

    Hi,
    The workitem is not completed, it can be viewed if logged on to the SAP system externally (not from the Icon in outlook mail).
    The issue is it cannot be viewed and the SAP screen hangs when it is clicked from the Icon in the Outlook mail.
    Thanks,
    Sandipan

  • IE Problem with opening XLS from remote host

    So I’m having a problem opening/saving my generated Excel Spreadshhet in Internet Explorer on a remote client. Basically, I click on my button to generate the spreadsheet, it then sends the data to my servlet that generates the document and then sends it back in a response. When I do via localhost everything works the way its supposed to, I get the document to open in IE. However if I try this from another machine, the document doesn’t open; when tried in Firefox remotely everything works. So I then started down the road of reviewing my response headers and haven’t had any luck.
          resp.setContentType("application/vnd.ms-excel");
          resp.setContentLength(document.size());
          resp.setHeader("Pragma", "no-cache");
          resp.setHeader("Expires", "-1");
          resp.setHeader("Accept-Ranges", "bytes");
          resp.setHeader("Content-disposition", "inline; filename=report.xls");
          OutputStream outputStreamToClient = resp.getOutputStream();
          document.writeTo(outputStreamToClient);
          try {
            outputStreamToClient.flush();
            outputStreamToClient.close();
          } catch (Exception e) {
            if (DEBUG) {
              System.out.println(e.getMessage());
          }My next step was to run a wireshark trace and verify that I was in fact getting my generated document sent to the remote machine and I was able to confirm the response was in fact sent and that all my necessary headers were in place. I’m open to any suggestions as I'm quite stumped at the moment.
    Matt

    So I made the changes for removing the extra headers as was recommend and still didn't have a problem. Now I did realize I forgot to mention that this is all being executed from an Applet on the client side. I build up my request dynamically in the post string and then send it via the connection I create. Now I did actually notice when I reworked my DEBUG statements that on the applet side I would get the following
    AppletConnection.getContent() warning: no content-type
    However, I have a servlet that generates a PDF based on the same data and that works just fine off a remote client and also returns the above "no content-type" error. Below I have the code from the Applet side that is actually sending the data to the servlet and receiving the response. I just wanted to reiterate that I am assuming the content-length field is in fact valid because I am able to successfully send a spreadsheet to a remote client if they are using FireFox as opposed to IE.
          final URLConnection appletConnection = url.openConnection();
          // inform the connection that we will send output and accept input
          appletConnection.setDoInput(true);
          appletConnection.setDoOutput(true);
          // Don't use a cached version of URL connection.
          appletConnection.setUseCaches(false);
          appletConnection.setDefaultUseCaches(false);
          appletConnection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
          //Write object to servlet
          OutputStreamWriter wr = new OutputStreamWriter(appletConnection.getOutputStream());
          wr.write(post);
          try {
            wr.flush();
          } catch (Exception e) {
              System.err.println("Error: Could not write object to servlet from client!");
          try {
            appletConnection.getContent();
          } catch (IOException ioe) {
            System.err.println("AppletConnection.getContent() warning:"+ioe.getMessage());
          }Thanks,
    Matt

Maybe you are looking for

  • Web dynpro java application to update data in CRM system

    Hello All, I need to develop a web dynpro java application which will read and update data in CRM. How can I do this? Thanks and Regards, Deepti

  • Stumped: Why won't DITA-OT process my Frame 9 map file?

    I'm stuck and hope someone might provide some guidance. I'm running Frame 9 on Windows XP. I've created a very simple map file and am trying to get it to process in the DITA OT. Everything appears to be set up correctly (I specify which Dita map is t

  • IMovie exporting to camera

    I am trying to export a movie back to my camera, the video exports fine but the audio does not follow. However if I playback the camera through the Imovie the audio is there. I assume there is some encoding that only Imovie can playback, how can I ch

  • Intel vs PowerMAC compatability

    I currently have a Power MAC G5 (no Intel inside) and am looking to buy a MacBookPro to take work on the road. Will I be able to share FCP files back and forth between these computers without any issues?

  • Satellite A210-131 sound driver does not support DirectSound input

    Starting Premiere Pro CS3 , an error message appears: - "Der zurzeit installierte Soundkartentreiber unterstuetzt keine DirectSound-Eingaenge" Es ist keine Audioaufnahme moeglich". - "The installed sound card driver does not support the DirectSound i