How do I execute a returned sql string from a function on the command line?

Hi,
I have written a pl/sql function that will dynamically create a sql select statement. I need to be able to execute this statement from the command line. e.g from sqlplus
Say my function is called "sql_create" and it returns "select * from customer"
How do I execute the returned value from the command line?" Is it possible?
SQL> select sql_create from dual;
SQL_CREATE
select * from customer
SQL>
So I try:
SQL> exec execute immediate 'select sql_create from dual';
SQL>
I don't get an error but I don't get the result set either.
Is there a command I can use instead of execute immediate?
thanks,
Susan
Edited by: Susan123456 on Jul 2, 2009 1:21 AM

depends on the frontend. Most frontends (like Java and .Net) know how to handle REF CURSORS. Instead of returing a "string" which represents a query, return a ref cursor
SQL> ed
Wrote file afiedt.buf
  1  create function sql_q return sys_refcursor
  2  is
  3     rc sys_refcursor;
  4  begin
  5     open rc for select * from emp;
  6     return rc;
  7* end;
SQL> /
Function created.
SQL> var r refcursor
SQL>
SQL> exec :r := sql_q
PL/SQL procedure successfully completed.
SQL> print r
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7369 SMITH      CLERK           7902 17-DEC-80        900                    20
      7499 ALLEN      SALESMAN        7698 20-FEB-81       1700        300         30
      7521 WARD       SALESMAN        7698 22-FEB-81       1350        500         30
      7566 JONES      MANAGER         7839 02-APR-81       3075                    20
      7654 MARTIN     SALESMAN        7698 28-SEP-81       1350       1400         30
      7698 BLAKE      MANAGER         7839 01-MAY-81       2950                    30
      7782 CLARK      MANAGER         7934 09-JUN-81       2551                    10
      7788 SCOTT      ANALYST         7566 19-APR-87       3100                    20
      7839 KING       PRESIDENT            17-NOV-81       5100                    10
      7844 TURNER     SALESMAN        7698 08-SEP-81       1600          0         30
      7876 ADAMS      CLERK           7788 23-MAY-87       1200                    20
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
      7900 JAMES      CLERK           7698 03-DEC-81       1050                    30
      7902 FORD       ANALYST         7566 03-DEC-81       3100                    20
      7934 MILLER     CLERK           7782 23-JAN-82       1400                    10

Similar Messages

  • How can I start a second window of a second profile through the command line?

    I have two profiles set up, 'default' and 'second'. If both are already running how can I start a second window of profile 'second'?
    firefox -p 'second' : opens a new window of the default and,
    firefox -p 'second' -no-remote : tells me that firefox is already running.

    I don't think that this is possible.<br />
    You need to open this second instance (Firefox profile folder) with the -no-remote command line switch and that makes it impossible to open external links via the command line or via a double-click.<br />
    You can only open a link in such an instance by dragging the link on the tab bar of that Firefox window.

  • Returning XML String From Servlet

              Is there a simple way to disable the HTML character escaping when returning
              a string from a servlet. The returned string contains well formed XML, and
              I don't want the tags converted to > and < meta characters in the
              HTTP reply.
              The code is basically "hello world", version 7.0 SP2.
              Thanks
              > package xxx.servlet;
              >
              > import weblogic.jws.control.JwsContext;
              >
              >
              > /**
              > * @jws:protocol http-xml="true" form-get="false" form-post="false"
              > */
              > public class HelloWorld
              > {
              > /** @jws:context */
              > JwsContext context;
              >
              > /**
              > * @jws:operation
              > * @jws:protocol http-xml="false" form-post="true" form-get="false" soap-s
              tyle="document"
              > * @jws:return-xml xml-map::
              > * <HelloWorldResponse xmlns="http://www.xxx.com/">
              > * {return}
              > * </HelloWorldResponse>
              >
              > * ::
              > * @jws:parameter-xml xml-map::
              > * <HelloWorld xmlns="http://www.xxx.com/">
              > * <ix>{ix}</ix>
              > * <contents>{contents}</contents>
              > * </HelloWorld>
              >
              > * ::
              > */
              > public String HelloWorld(String s)
              > {
              > return "<a> xyz </a>";
              > }
              > }
              

              Radha,
              We have a client/server package which speaks SOAP over a
              streaming HTTP channel for which we are writing a WebLogic
              servlet. For reasons of efficiency, we want to deserialize
              only the very top-level tags of the messages as they pass
              through the servlet. Yes, in theory, we should probably
              deserialize and validate the entire message contents...
              When we add support for other clients, we will fully
              deserialize inside those servlets.
              I have not looked any further into how to stop the inner
              tags from being escaped yet -- it is an annoyance more than
              a disaster, since the client handle meta escapes.
              My current guess is to use ECMAScript mapping...
              -Tony
              "S.Radha" <[email protected]> wrote:
              >
              >"Tony Hawkins" <[email protected]> wrote:
              >>
              >>Is there a simple way to disable the HTML character escaping when returning
              >>a string from a servlet. The returned string contains well formed XML,
              >>and
              >>I don't want the tags converted to > and < meta characters in the
              >>HTTP reply.
              >>
              >>The code is basically "hello world", version 7.0 SP2.
              >
              >>
              >>Thanks
              >>
              >>> package xxx.servlet;
              >>>
              >>> import weblogic.jws.control.JwsContext;
              >>>
              >>>
              >>> /**
              >>> * @jws:protocol http-xml="true" form-get="false" form-post="false"
              >>> */
              >>> public class HelloWorld
              >>> {
              >>> /** @jws:context */
              >>> JwsContext context;
              >>>
              >>> /**
              >>> * @jws:operation
              >>> * @jws:protocol http-xml="false" form-post="true" form-get="false"
              >>soap-s
              >>tyle="document"
              >>> * @jws:return-xml xml-map::
              >>> * <HelloWorldResponse xmlns="http://www.xxx.com/">
              >>> * {return}
              >>> * </HelloWorldResponse>
              >>>
              >>> * ::
              >>> * @jws:parameter-xml xml-map::
              >>> * <HelloWorld xmlns="http://www.xxx.com/">
              >>> * <ix>{ix}</ix>
              >>> * <contents>{contents}</contents>
              >>> * </HelloWorld>
              >>>
              >>> * ::
              >>> */
              >>> public String HelloWorld(String s)
              >>> {
              >>> return "<a> xyz </a>";
              >>> }
              >>> }
              >>
              >>
              >Hi Tony,
              >
              > Can you let me know for what purpose you want to disable the
              >HTML character
              >escaping.In case if you
              >
              >have tried this using someway,pl. let me know.
              >
              >rgds
              >Radha
              >
              >
              

  • How to display the contents of a text file on the command line?

    I realize I need to utilize classes from the java.io.* package, but I don't know which ones to use exactly. This is what I would like to do in a nutshell:
    public static void main(String[] args) throws IOException {
    File inputFile = new File( <path to the file>);
    // code that reads data from the above file and is able to
    // append it to  a string object or display it on the command
    // line (System.out.println)
    }Thanks for your time!

    It's pretty easy. Here's a little example that reads a file, stores it in a string, and prints it to the command line.
    import java.io.*;
    public class OpenFile {
         public static void main(String args[]) {
              try {
                   File fileToOpen = new File("something.txt");
                   FileReader fileIn = new FileReader(fileToOpen);
                   BufferedReader br = new BufferedReader(fileIn);
                   String fileContent = new String();
                   String line;
                   while ((line = br.readLine()) != null) {
                        fileContent += line + "\n";
                   System.out.println(fileContent);
                   br.close();
              catch (IOException e) {
                   System.out.println("Exception: " + e);
    }Good luck,
    Alex

  • How to use execute immediate for character string value 300

    how to use execute immediate for character string value > 300 , the parameter for this would be passed.
    Case 1: When length = 300
    declare
    str1 varchar2(20) := 'select * from dual';
    str2 varchar2(20) := ' union ';
    result varchar2(300);
    begin
    result := str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || ' ';
    dbms_output.put_line('length : '|| length(result));
    execute immediate result;
    end;
    /SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    length : 300
    PL/SQL procedure successfully completed.
    Case 2: When length > 300 ( 301)
    SQL> set serveroutput on size 2000;
    declare
    str1 varchar2(20) := 'select * from dual';
    str2 varchar2(20) := ' union ';
    result varchar2(300);
    begin
    result := str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || ' ';
    dbms_output.put_line('length : '|| length(result));
    execute immediate result;
    end;
    /SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 6

    result varchar2(300);Answer shouldn't be here ? In the greater variable ?
    Nicolas.

  • Copy/paste sql strings from development ide's.

    Our team have just started using this tool in favor of the well-known toad. Frist impressions are really good, so keep up the good work! But sometimes you find that a very simple feature has great impact on coding effectiveness.
    Very often people copies sql strings from their java development ide's and want to test this in their database tool. For instance:
    " SELECT ... " +
    " FROM ...." +
    " JOIN ...." +
    " WHERE ....";
    Should become
    SELECT ...
    FROM ...
    JOIN ...
    WHERE ....
    The same goes backwards, if you write a sql statement in your database tool you would like to quickly convert it to a java string. This perhaps simple, but beloved by us, little feature was available in our previous tool, but I can't find it in sql developer. I've temporarily solved this by using the search-and-replace dialog box with regular expressions. This is however quite awkward to do each time so my options are:
    * Assign this search-and-replace operation to a hot key (is this possible?)
    * Write an extension (I have trouble finding good documentation of extension development for sql developer)
    * Request a feature (will probably take time even if it's accepted)
    Could anyone give me some hints on how to solve this?
    Or have I missed anything, is it already available somewhere in the tool?
    Thanks.

    Hi,
    sometimes you find that a very simple feature has great impact on coding effectiveness.Tell me about it ;-)
    * Assign this search-and-replace operation to a hot key (is this possible?)
    By default, ctrl-r does a search-and-replace. There's a history drop-down to have a quick access to your regular expression once you've entered it once.
    * Write an extension (I have trouble finding good documentation of extension development for sql developer)
    You have some samples on Kris' blog.
    * Request a feature (will probably take time even if it's accepted)
    I agree, think it's difficult to make it some universal feature everyone wants to use.
    Another thing that comes to mind is recording a macro (see the tip on the Exchange for help on this).
    And I supose you could even make an external tool for this, using a batch file or something. This is much easier than an writing an extension i guess, and you can write it in the language you like best...
    Hope this helps,
    K.

  • Returning SQL cursor from Stored Procedure

    Hi,
    I have a query regarding returning sql cursor from stored procedure to java in oracle 11g.
    I want to query some data ex: my query returns A, B, C. Also, now I want to query some other data ex: D, E, F. Now I want to return this data as an sql cursor as a single row . Example: A,B,C,D,E,F. Is it possible to return/create a cursor in stored procedure?
    assume both query returns equal number of rows.. however both are not related to each other..

    RP wrote:
    Hi,
    I have a query regarding returning sql cursor from stored procedure to java in oracle 11g.
    I want to query some data ex: my query returns A, B, C. Also, now I want to query some other data ex: D, E, F. Now I want to return this data as an sql cursor as a single row . Example: A,B,C,D,E,F. Is it possible to return/create a cursor in stored procedure?
    assume both query returns equal number of rows.. however both are not related to each other..It sounds like what you need is a ref cursor.
    First thing to remember though is that cursors do not hold any data (see: {thread:id=886365})
    In it's simplest form you would be creating a procedure along these lines...
    SQL> create or replace procedure get_data(p_sql in varchar2, p_rc out sys_refcursor) is
      2  begin
      3    open p_rc for p_sql;
      4  end;
      5  /
    Procedure created.
    SQL> var rc refcursor;
    SQL> exec get_data('select empno, ename, deptno from emp', :rc);
    PL/SQL procedure successfully completed.
    SQL> print rc;
         EMPNO ENAME          DEPTNO
          7369 SMITH              20
          7499 ALLEN              30
          7521 WARD               30
          7566 JONES              20
          7654 MARTIN             30
          7698 BLAKE              30
          7782 CLARK              10
          7788 SCOTT              20
          7839 KING               10
          7844 TURNER             30
          7876 ADAMS              20
          7900 JAMES              30
          7902 FORD               20
          7934 MILLER             10
    14 rows selected.
    SQL> exec get_data('select deptno, dname from dept', :rc);
    PL/SQL procedure successfully completed.
    SQL> print rc
        DEPTNO DNAME
            10 ACCOUNTING
            20 RESEARCH
            30 SALES
            40 OPERATIONS
            50 IT SUPPORTWhich takes an SQL statement (as you said that both your queries were unrelated), and returns a ref cursor, and then your Java code would fetch the data using that cursor.
    Now, as for getting your rows to columns and combining two queries that do that... something along these lines...
    SQL> select * from x;
    C
    A
    B
    C
    SQL> select * from y;
    C
    D
    E
    F
    SQL> ed
    Wrote file afiedt.buf
      1  select x.col1, x.col2, x.col3
      2        ,y.col1 as col4
      3        ,y.col2 as col5
      4        ,y.col3 as col6
      5  from (
      6        select max(decode(rn,1,col1)) as col1
      7              ,max(decode(rn,2,col1)) as col2
      8              ,max(decode(rn,3,col1)) as col3
      9        from (select col1, rownum rn from (select * from x order by col1))
    10       ) x
    11  cross join
    12       (
    13        select max(decode(rn,1,col1)) as col1
    14              ,max(decode(rn,2,col1)) as col2
    15              ,max(decode(rn,3,col1)) as col3
    16        from (select col1, rownum rn from (select * from y order by col1))
    17*      ) y
    SQL> /
    C C C C C C
    A B C D E F... will do what you ask. For further information about turning rows to columns read the FAQ: {message:id=9360005}

  • Return a string from a method: a problem in C++ but is it a problem in java

    I have a method which return a String from it as:
    String pattern(short i)
    String s="":
    if (i==1)
    s = "test1";
    else
    s = "test2";
    return s;
    Since s is a local vaariable to pattern(), does the code above
    create problems? I know it is a problem for C++ since the local
    variable memory address will be reused by others and thus the
    returned value may take other values sometime later or not
    readable.

    Actually, this is not a problem in C++ either if you
    just use the string class instead of the old-style
    char* from C.True, I was assuming he/she meant (in C++):
    char mylocalbuf[80];
    // put stuff in mylocalbuf here
    return mylocalbuf;
    which would be very very bad to do indeed.

  • How to execute SAPGUI script from the command line?

    I have created a script and would like to execute it from the command line. There must be some flag that goes with SAPGUI.EXE. Any help appreciated.
    Thanks,
    Jeff

    Hi Jeff,
    the best way to do this is to run the script using the Windows Script Host, for example like this:
    cscript myscript.vbs
    This will execute the script which in turn can access SAP GUI. You may however have to make sure the script attaches to the correct session.
    Best regards,
    Christian

  • SQL 2012 SSIS package runs from the command line (dtexec.exe) and completes right away ...

    Hi
    I’m upgrading our SSIS packages from SQL 2005 to SQL 2012 .
    Everything is working fine in Visual Studio, but when I’m submitting dtexec.exe it’s finishing right away in the command line (the actual execution takes long time). 
    It looks to me that as the return code doesn’t pass properly.
    As I have depending tasks how I can make sure all jobs will be executed in the proper order.
    (We never had this issue in SQL 2005)
    C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn>dtexec.exe /ISSERVER "\"\SSISDB\Direct_Prod\Direct_SSIS_Package
    \DD_Load_Customer.dtsx\"" /SERVER TORSQLSIS01 /ENVREFERENCE 2
    Microsoft (R) SQL Server Execute Package Utility
    Version 11.0.2100.60 for 32-bit
    Copyright (C) Microsoft Corporation. All rights reserved.
    Started:  10:21:55 AM
    Execution ID: 21138.
    To view the details for the execution, right-click on the Integration Services Catalog, and open the [All Executions] report
    Started:  10:21:55 AM
    Finished: 10:21:56 AM
    Elapsed:  0.766 seconds

    As per MSDN /ENVREFERENCE argument is used only by SQL Server Agent
    see
    https://msdn.microsoft.com/en-us/library/hh231187.aspx
    below part is what it says
    /Env[Reference] environment reference ID
    (Optional). Specifies the environment reference (ID) that is used by the package execution, for a package that is deployed to the Integration Services server. The parameters configured to bind
    to variables will use the values of the variables that are contained in the environment.
    You use /Env[Reference] option together with the /ISServer and the /Server options.
    This parameter is used by SQL Server Agent.
    Please Mark This As Answer if it solved your issue
    Please Vote This As Helpful if it helps to solve your issue
    Visakh
    My Wiki User Page
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • Returning focus to the command line?

    I am trying to write a text based card game but I am stuck again. When I run this code after I type "help" to view the key words the program terminates. How would I go about retuning focus to the command line instead of terminating the program.
    import java.util.*;
    import java.io.*;
    public class BlackJack {
    public static String help = "\tKey Words\n--------------------\nhelp = Help\ndeal = New Game\nhit = Get Another Card\ncall = Dealer shows cards";
    public static void main(String[] args) {
    System.out.println("Welcome to Black Jack!\nPlease enter a value.\nEnter \"help\" for help.");
    String input = "";
    InputStreamReader isr = new InputStreamReader(System.in);
    BufferedReader buffer = new BufferedReader(isr);
    try {
    input = buffer.readLine();
    buffer.close();
    if(input.equals("help")) {
    System.out.println(help);
    else {
    System.out.println("Incorrect please try again!");
    catch(IOException e) {
    System.out.println("Incorrect value please try again!");
    }Edited by: Aj_Green on Aug 7, 2008 11:25 AM

    I have created a method for getInput() however; when I type "help" the while loop infinately prints my else string. Here is the code. If I type "quit" into the command line the program terminates as it should.
    import java.util.*;
    import java.io.*;
    public class BlackJack {
         public static String help = "\tKey Words\n--------------------\nhelp = Help\ndeal = New Game\nhit = Get Another Card\ncall = Dealer shows cards";
         public static String getInput() {
              InputStreamReader isr = new InputStreamReader(System.in);
               BufferedReader buffer = new BufferedReader(isr);
              String input = "";
              try {
              input = buffer.readLine();
              buffer.close();
              return input;     
              catch(IOException e) {
              System.out.println("An input error has occured!");
              return input;
         public static void main(String[] args) {
              System.out.println("Welcome to Black Jack!\nPlease enter a value.\nEnter \"help\" for help.");
              boolean gameOver = false;
              while(!gameOver) {
              String ans = getInput();
              if("quit".equals(ans)) {
              gameOver = true;
              else if("help".equals(ans)) {
              System.out.println(help);
              else {
              System.out.println("Incorrect please try again!");
    }Edited by: Aj_Green on Aug 7, 2008 12:38 PM

  • How to hide the command line arguments from solaris process

    Hi All,
    When I execute a JAR application from a java file using the Runtime.getRuntime, the command line arguments (user ID and Password details) which I passed for executing the application displayed on Solaris process (ps -ef).
    Could anybody please help me, how can I hide either the process or the command line arguments from the Solaris process?
    I cannot pass any asterix or any special character in place of password, because the executing application doesn't have any functionality to retreive the password which send as asterix characters.
    Please help me
    SumodeV

    Thanks for all the response.
    I have created a design and implement the functionality which executes the JAR application in Solaris environment without showing any details in the process details.
    I have used the Java Reflection method, which invokes the JAR application. I am sharing the details here for all those who looking for it.
    1, Inside the Customer application [Jar File is running for it], collect the necessary session details [Using System.get property method]
    2, Create an independent Java file, which should be used to invoke the JAR application
    3, Create the ProcessBuilder object and use a command - execute the Java file [a wrapper code] using normal Java command
    4, Pass the necessary session details to the ProcessBuilder using the environment() function.
    5. Collect the environment values in the independent Java file (Which was invoked by ProcessBuilder) and set details for its environment using System.setProperty.
    6, Use reflection technique to invoke the JAR plugin [which you want to run]. You can use the standard Java functionality to read the MANIFEST file of JAR and load the main class using URLClassLoader.
    7, Invoke the main method of the JAR file, which run the JAR application in Solaris window
    This solution will make sure that the process cannot display any session details in the Solaris Environment.
    Note: Use String[] array while create the command. Otherwise the JAR application cannot pop-up.
    Regards
    Sumode

  • How to output instructions to the command line?

    How can I make my java program give instructions to the command line, eg to execute programs with command line parameters?

    How can I make my java program give instructions to the command line, eg to execute programs with command line parameters? well you can execute the instruction directly not even going(piping through) to commandline.
    try{
    String command = "ls"; // for windows for example String command = "notepad";
    Process execCommand = Runtime.getRuntime().exec(command);
    // now if you want to pass parameters along with the  command use this
    String command2 ="ls /tmp" ; //respectively for windows
    // if there are many arguments which needs spaces then use
    String [] longCommand = new String[]{"find","whatever","path"}; // here find is the command and rest two are desired arguments.
    // now if you want to read the output from command line
    InputStream in = execCommand.getInputStream();
    int c;
    while ((c=in.read())!= -1)
    // process c the way you want
    } catch(IOException io)
    {}Edited by: KillerDev on Nov 2, 2008 12:00 AM

  • Question about reading a string or integer at the command line.

    Now I know java doesn't have something like scanf/readln buillt into it, but I was wondering what's the easiest, and what's the most robust way to add this functionality? (This may require two separate answers, sorry).
    The reason I ask is because I've been learning java via self study for the SCJA, and last night was the first time I ever attempted to do this and it was just hellish. I was trying to make a simple guessing game at the command line, I didn't realize there wasn't a command read keyboard input.
    After fighting with the code for an hour trying to figure it out, I finally got it to read the line via a buffered reader and InputStreamReader(System.in), and ran a try block that threw an exception. Then I just used parseInt to get the integer value for the guess.
    Another question: To take command line input, do you have to throw an exception? And is there an easier way to make this work? It seems awfully complicated to take user input without a jframe and calling swing.
    Edited by: JGannon on Nov 1, 2007 2:09 PM

    1. Does scanner still work in JDK1.6?Try it and see. (Hint: the 1.6 documentation for the class says "Since: 1.5")
    If you get behaviour that doesn't fit with what you expect it to do, post your code and a description of our expectations.
    2. Are scanner and console essentially the same thing?No.
    Scanner is a class that provides methods to break up its input into pieces and return them as strings and primitive values. The input can be a variety of things: File InputStream, String etc (see the Scanner constructor documentation). The emphasis is on the scanning methods, not the input source.
    Console, on the other hand, is for working with ... the console. What the "console" is (and whether it is anything) depends on the JVM. It doesn't provide a lot of functionality (although the "masked" password input can't be obtained easily any other way). In terms of your task it will provide a reader associated with the console from which you can create a BufferedReader and proceed as you are at the moment. The emphasis with this class is the particular input source (and output destination), not the scanning.
    http://java.sun.com/javase/6/docs/api/java/util/Scanner.html
    http://java.sun.com/javase/6/docs/api/java/io/Console.html

  • Problem - reading an abitrary string from the command line in basic swing

    Hi,
    I'm sorry if this problem is a bit basic, but I've only just started swing in Java. Anyway, I'm trying to adapt a basic swing version of the HelloWorld class. When I try to pass an abitrary string from the command line to the label within the class, I get the following error,
    Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1
            at week2.HelloWorldSwing_commandline.main(HelloWorldSwing_commandline.java:31)
    Java Result: 1I must be missing something because I can't see where the problem is in the following code.
    import javax.swing.*;
    import java.awt.*;
    public class HelloWorldSwing_commandline {
        String message;
        private static void createAndShowGui(String message){
            JFrame.setDefaultLookAndFeelDecorated(true);
            JFrame frame = new JFrame("HelloWorldSwing");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JLabel label = new JLabel(message);
            Container content = frame.getContentPane();
            content.add(label);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[ ] args) {
         createAndShowGui(args[1]);
    }Any help would really be appreciated.

    Hi,
    I've tried changing the index value to O in the main method, but I still get the same error.
    I'm running this in NetBeans 4.1, and when I try to run the class I get the error as listed above.
    Any ideas how to correct this error?
    Thanks

Maybe you are looking for

  • HP DV6700 Operating System Not Found- How Can I Access & Back Up Files?

    1. HP Pavillon DV6700 -> old yes, I know 2. Operating System: Vista 3. Black Screen -> Err2Err3 Operating System Not Found I ran the Primary Hard Drive Self Test > Hard Disk Self Test and it was a quick test. After it finished it came back with "#100

  • Weblogic talking to Websphere

    Hi, As anyone tried to call WebSphere EJB from weblogic? If so, how is it achieved, and what to look out for? Any pointers appreciated. Thanks! ph [email protected]

  • Accidentally RM'd contents of /var/lib/pacman/local/

    I have been working on setting up a new workstation for myself, and getting it to be consistent with the old workstation that I had (with the exception of encrypting all of / this time rather than just encrypting /home).  Have been working on this fo

  • Excise duty to be inventoried

    Hi Gurus, I have a scenario where excises will be inventoried i.e. will be taken on material cost.At the same time , VAT is deductible. So during MIGO the following are the postings: Stock A/c Dr. ( Basic Price + Excises) Gr/ir clearing A/c Dr. by th

  • AUC with Internal order

    Hello I want to know the full cycle for the Asset under construction.........if i go for line item settlement or without this...........what should be the treatment............. what is the step by step procedure for it............ regards