Report Execution from within Java application

I am currently running my Oracle reports through a Java application where I just create a HttpURLConnection to the reports server and push in my report request, and then read the connection input stream in order to obtain the generated report. This is working without too many problems except that in some cases where the report is generated but the application does not seem to understand the reponse.
I see that there is in fact a Java API available for the reports. Is it possible to integrate this into my application in the same/similar way as I am doing now? If so, where can I get the associated docs as the supplied Javadocs are not too explicit.
Thanks
Justin

You'll have to write a custom ClassLoader to do this - modifying the existing ClassPath from within the JVM just isn't possible.

Similar Messages

  • Executing a perl script from within java application

    Hi,
    Does anyone knows a way to execute a perl script from within java.
    ---kirk

    Runtime.exec("perl myscript.pl");
    Of course whether that "works" depends on what the script does and where the java program runs.

  • How can i call a jasper report from a java Application

    Hi,
    i am chiranjit , currently i working in a web based ERP project, in this project as a report building tool we are using JasperReport wih eclipse plugin . in eclipse report's are generating very well but i am unable to call that report from a java application because i have no idea about the How to call a Jasper Report from a Java Application . so please send me the necessary class names, jar files names and programe code as early as possible.
    Chiranjit

    Ahh, kind of a duplicate thread:
    http://forums.java.sun.com/thread.jspa?threadID=631642
    @OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Trying to use grep from within java,using exec command!

    Hi all!
    I would like to run a grep function on some status file, and get a particular line from it, and then pipe this line to another file.
    Then perfom a grep on the new file to check how many of the lines above are present in that file, and then write this value to a new file.
    The final file with a numerical value in it, i will read from within java,as one reads normal files!
    I can run simple commands using exec, but am kinda stuck with regards to the above!
    Maybe i should just do all the above from a script file and then run the script file from exec. However, i dont want to do that, because it kinda makes the system dependent,..what if i move to a new machine, and forget to install the script, then my program wont work!
    Any advise?
    Thanks
    Regards

    With a little creativity, you can actually do all that from the command line with a single command. It'll look a little crazy, but it can be done.
    Whether the script exists on the local machine or not has zero to do with platform indpendence. You assumedly have to get the application onto the local machine, so including the script is not really an issue at all. However, you're talking about system independence, yet still wishing to run command line arguments? The two are mutually exclusive.

  • Automatic Creation of ODBC Data Source From Within Java App

    Good Day Good People :)
    I was wondering if it were possible for a java application to automatically set up an ODBC data source for a JDBC connection in a windows environment.
    This is the method I call to initialise a connection to my database:
    public void initialiseLocalConnection ()
    url = "jdbc:odbc:ICUDB";
    try
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    icuCon = DriverManager.getConnection (url);
    catch (Exception e)
    JOptionPane.showMessageDialog (null, "Error Creating Connection to ICU Database!\n" +
    "Please set up an ODBC data source pointing\n" +
    "to the icudb.mdb file located in the data\n" +
    "folder of the ICU directory and call the\n" +
    "connection 'ICUDB'.", "Database Connection Error", JOptionPane.ERROR_MESSAGE);
    Is it possible to create the ODBC data source ICUDB if it does not exist from within my application.
    All information regarding the possibilty and the application of doing this would be greatly appreciated.
    Kind Regards
    Matt

    Thank you.
    During my search I for dsn-less connections I found the soloution:
    url = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=" +
    System.getProperty ("user.dir") + System.getProperty ("file.separator") +
    "data" + System.getProperty ("file.separator") + "icudb.mdb";
    try
    Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
    icuCon = DriverManager.getConnection (url);
    This works.
    Thanks for the replies.
    Matt :)

  • Running a dos command from a java application

    hello,
    I'm trying to execute a batch file from a java application. I tried with:
    try
    Process proc=Runtime.getRuntime().exec("fop -fo "+iXmlFoFile+" -
    svg "+SvgFileName);
    }catch (IOException e){System.err.println("Error in conversion of
                               the Xml FO file into Svg file: "+e);}
    and with:
    try
    Process proc=Runtime.getRuntime().exec("cmd ./c fop
    -fo "+iXmlFoFile+" -svg "+SvgFileName);
    }catch (IOException e){System.err.println("Error in conversion of
                the Xml FO file into Svg file: "+e);}
    but i have a IOException: CreateProcess: .... error=2
    When I try these line to launch a .exe file it works but not with a .bat file.
    I also tried:
    String execstr = "fop -fo "+iXmlFoFile+" -svg "+SvgFileName;
    String [] commandArray = { execstr };
    try {
    Runtime.getRuntime().exec(commandArray);
    } // end try
    catch ( Exception e ) {
    System.out.println( e.getMessage() );
    e.printStackTrace();
    }// end catch
    but i got the same exception in java.lang.Win32Process.create
    What did i do wrong?

    Your execution string is a bit more that I want to figure out, but here are a couple ideas:
    Is the working directory of any importance? If so you'll need to set that when you do your exec()
    I think I remember reading something about batch files that couldn't be kicked off via this method. Perhaps you need to execute the string "start mybatchfile.bat". Seems like you need to do something like that to get a command interpreter to run your batch file.

  • Displaying a URL from a Java application

    Hi,
    I recently implemented a test Java application based on Steven Spencer's Java Tip 66: "Control browsers from your Java application" (http://www.javaworld.com/javaworld/javatips/jw-javatip66.html). Spencer's example tests for the current operating system, sets some constants based on the OS that it finds, and then calls the Runtime.getRuntime( ).exec( ) method. During the call, you can pass either a file:// or http:// URL. I can get the example to work perfectly given a file:// URL but have limited success supplying the http:// URL. When I supply a specific http:// URL such as "http://someserver/somedir/testfile.htm" the browser returns a "Cannot open URL" error. However, if I supply a URL that does not resolve to a specific HTML file, such as "http://someserver/somedir", and the directory has either a "index.htm" or "index.html" file, the application works fine. I would like to be able to pass an http:// URL that resolves to a specific HTML file. I am trying to implement context-sensitive help from within a Java application. I am testing this on a machine running Windows 2000 and using Microsoft's IE 5.x browser. Any help would be appreciated.
    Thanks,
    Scott Rifenbark

    The browser doesn't know that it was started by this Java code, you know. So you are asking why your browser (Internet Explorer) doesn't let you get at specific files. The answer is, that isn't how the Internet works. A URL is a "Uniform Resource Locator" (or something a lot like that). It locates a resource on the Internet. This resource may or may not be a file, but as the client you have no way of knowing whether what you get in response to that is a file on the server or whether it has been generated by some CGI program there.
    When you send an http:// URL to a web server, it looks at what you have sent and goes through its configuration files. Using this it translates that URL into either a file on the server (which it returns to you) or a program which it calls to return data to you. If it was a file, its local name on the server doesn't have to be related in any way to the contents of the URL.
    It sounds like you are planning to be the one setting up those files on the server, though. If that's the case, you have to configure the server appropriately for your needs.

  • How can i call a VB6 project from my java application using JNI

    hi
    can anyone tell me the procedure of calling a VB6 project from any java application using JNI
    if anyone does know then tell me the detail procedure of doing that. I know that i have to create a dll of that VB6 project then to call it from the java application.
    if anyone know that procedure of creating dll file of an existing VB6 project please reply
    please if anyone know then let me know

    Ahh, kind of a duplicate thread:
    http://forums.java.sun.com/thread.jspa?threadID=631642
    @OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Calling a web service from a Java application

    Does anyone have sample code showing how to call a web service over from a Java application? I'm deploy to HP-UX and seeking out the most standard and reliable approach.
    Thank you in advance.

    Keith,
    Download JWSDP 1.2, look at the tutorial for JAXRPC, especially
    the client portion.

  • What are the reporting tools available for Java applications??

    hi..
    please tell me some reporting tools available for java applications.... if there are some, please mention how to find their documentation????

    http://jasperreports.sourceforge.net is a nice one, there is also a link to a graphical design tool.

  • Timecapsule - opening files from within an application!!

    I have a time capsule... 500Mb
    I have an airport extreme with external hard drive - 250 Mb.
    Through Finder, I can place files on either of these drives and open them from Finder.
    If I open Numbers, or Pages, then try to open any file on Timecapsule, it appears that there are no files
    If I open Number, or Pages, then try to open any file on the Airport Extreme external disk - it works!
    Simple question really.... why cannot I see or open any file from within an application that resides on Timecapsule?? It's driving me crazy!!!
    Message was edited by: GrahamDurkin

    File dialogs have the ability to "group" items, which prohibits you from changing sort options.  The group icon looks like six little squares.  Click on it and instead of grouping by date, group by "none" and then you can change sort orders.

  • How do i Hyperlink to a web page from a java application?

    How do i Hyperlink to a web page from a java application using internet explorer as my default web browser?

    It's very simple.You can start any Application with the class Runtime. The command is an array consisting of the path of .exe and the file to be open.
    String [] cmd={path of IE+Filename.exe,"URL of your website"}
    try
    Runtime.getRuntime().exec(cmd);
    catch (Exception e)
    System.err.println(e.toString());
    }

  • How to call pdf forms developed in ABAP from WD Java application?

    Hi
    I have a web dynpro ABAP application that that is responsible for generating PDF forms for all other applications (WD ABAP and WD Java).
    How can I call the pdf forms generated by the WD ABAP application from WD Java application in a separate window?
    These forms are to be called on click of a "Print" button. Also, these forms are non interactive.
    Kindly let me know if you need any other information.
    Regards
    Vineet Vikram
    Edited by: vineet vikram on Jun 24, 2009 7:28 AM

    in addtion to Nikhil's response. you can write following code on action of print button:
        IWDWindow window = wdComponentAPI.
            getWindowManager().createExternalWindow(
                  "<ABAP Application URL>",
                  "<Title for window>",
                  false);
       window.open();
    to Close the application, you can use the window close or u can fire an event to close current window.
    Abhinav

  • Re-use message mapping from within java mapping?

    Hi there,                                                                               
    I have a question regarding java mapping. What I would like to do is to re-use an existing message mapping from within java mapping.
    Technicaly, message mapping is perfomed by com.sap.aii.mappingtool.tf3.AMappingProgram.execute, right? I would like to call that mapping program for a specifc message mapping from within my java mapping.
    Pseudo java code would look like this:
    public void execute(InputStream in, OutputStream out)
      throws StreamTransformationException {
    com.sap.aii.mappingtool.tf3.AMappingProgram.execute(in,out,'SomeMessageMapping');
    SomeMessageMapping is a message mapping that is defined in the integration repository.
    Is it possible? If so, could you provide me with some details?
    Thank you and best regards,
    Wolfgang

    Hi Wolfgang,
    very interesting idea?
    I would activa a dummy message mapping. than I would have a look in the file directory of the java-stack and try to find out the name of the *.class or *.jar file.
    On the other hand you could generate a tpz-transport-file an unpack this file, to explore the name of the *.class or *.jar
    Unfortunately I do not have access to the file system. So I can't explore the name.
    Regards Mario

  • Control browser properties from a java application while launching a browse

    How to control the properties of a browser when it is launched from a java application?
    I am using the command " Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler "+url); " to launch the browser. The syntax of "exec" command is "public Process exec(String command,String[] envp) throws IOException". I would like to know whether we can give the arguments in this command to control the browser properties.
    If you know any other option by which we can open a URL in a controlled browser, please share it.
    Thanks in advance :).
    Surekha_Venugopal

    Hi All,
    I have found a solution to control browser parameters from Java applications.
    1. Create an intermediate HTML file at runtime which contains Javascript to launch a browser. Pass the parameters like the URL and browser control parameters to the Javascript of this HTML file.
    2. Open this HTML file and invoke the javascript while loading the file. Javascript will launch the required URL in a controlled browser.
    3. Close the intermediate HTML file.
    Limitation:
    1. There will be a flickering of windows.
    2. Applets will have permission issues with the above solution. For applets a better solution is JSobject. No need of an intermediate file here.
    Hope this will be useful for someone. :-)
    Cheers,
    Surekha_Venugopal

Maybe you are looking for