Need a bit of help with some theory...

I'm just looking over some past paers for my exam and I'm having trouble understanding exactly what this question is asking for:
What is an Enterprise computer system? Give an example of an Enterprise system. Critically discuss two alternative development environments that could be used to develop such a system. Suggest which development environment you would choose to develop the example enterprise system you have suggested and why.
I'm just sure exactly what it means by development enviroments, does it mean a program like JDeveloper? A couple of examples would be really handy
Thanks

Think of an Enterprise computer system as nothing more than a resouce pool. A pool of database connections, persistant database objects, mail sessions, messaging sessions. Basically any resouce a developer would need to develop any type of application.
As for environments... the two I think of are Microsoft .NET and Sun's Java System Application Server Platform. Thay are basically the same in concept, microsoft just repackaged everything good about Java and called it .NET. .NET is (of course) dependant on the Microsoft OS platform, Sun/Java is not.

Similar Messages

  • Need a bit of help with css and fullscreen

    I am currently doing a javaFX application for my university project, I have it everything nearly finished, but need to finish the css component to make the application "prettier" (I am not very good on graphic design to be honest). So if i could get a bit of help on this little issue I'd be very grateful.
    is there any way to make fullscreen (and if possible resizing window) to instead rearranging everything to actually do a fullscreen (like the games) and everything "grows accordingly (even though in games what it usually does is to change the screen resolution, is that possible to reproduce with javaFX?) also how to remove the message and the effect on click the "esc" key to exit the fullscreen mode?
    i know that removing the focus effect on an element is with the following (if a button)
    .button:focused{
         -fx-background-insets: 0;
    }but,is there any way to remove the effect on anything focused (TextField, Combo Box, ...)? (tried with a .textfield:focused but it did not work)
    also i wanted to produce the focused effect by this way but it didn't work, how should i do it? (in fact even if i try to put this line on the button:focused, the focused effect gets removed from there, because of the insets line)
    #highlight{
         -fx-background-insets: 2;
         -fx-background-color: yellow;
    public class controller extends StackPane implements Initializable{
         public void highlight(){
              this.getStyleClass().add("highlight");
    and last thing (for the moment) the .button seems to work for all the buttons, but trying another thing like .gridpane or .textfield or .scrollpane does not seem to work, is there any way to make it work or i should add "id" to all the elements and use the # instead?

    i wrote all them in the same thread becsause there were a total of 4 (and could had been more) separated by ----
    should i leave it how it is or open now 4 threads for each question?

  • Need a bit of help with a code

    Hello adobe community!
    i have been fiddling around with FLASH MX and have been making a game VERY slowly.
    i've picked up alot since starting and have restarted making said game MANY MANY times =D...
    But i have now got a copy that is neat and clean and works really well BUT i've come into a bit of a problem.
    i have  _global.goldenticket = 0;   on my first frame along with other variables and i have made a single location where one can aquire a "goldenticket".
    now things are starting to confuse me... ive added a button inside a movie clip which if clicked "should" check if i have a golden ticket and then allow me to jump to the frame specified...
    on(release){
    if(goldenticket=="1"){
    money -= 50;
    energy -=50;
    _root.gotoAndPlay("enter");
    }else{
    this.enabled=false;
    however the button doesnt seem to see my ticket (even tho ive added a dynamic textbox to keep track of how many i have, which is 1)
    ive tried many different ways to go around this but i cannot seem to get it to work...
    please someone help me... in relativly simple answers please =\ im only a few days into flash learning and codeing. but im enjoying what im doing so im learning quickly.
    will have my face to the screen in waiting =D
    Thank you to everyone who took a look at my thread!

    THANK YOU!!!
    REALLY quick response WITH lang i could easily understand...
    mate thank you haha been wrapping my brain for hours on end with other things didnt even occure to me to slap _global infront.

  • Need a bit of help with Jumping in a game

    I making an action game (at least for the sake of this question) and when the user presses the spacebar the character jumps. The problem is, if the character is moving right or left, and jumps while he is moving, he will stop moving in mid-air (if the spacebar is released) and just drop straight down. Example:
    press right arrow key
    player moves right
    press space while pressing arrow key
    player jumps
    let go of spacebar
    player drops straight down (does not continue to move right) //Problem
    It's pretty simple code, actually:
    /* Move player left or right */
    if (pressedRight)
            player.x_pos += player.x_speed;
    else if (pressedLeft)
            player.x_pos -= player.x_speed;
    /* If spacebar is pressed */
    if (pressedSpace && !player.moveUp)
            player.moveUp = true;
            player.y_speed = player.INITIALSPEED;
    /* if you are in "jump mode" */                         
    if (player.moveUp)
            player.y_pos += player.y_speed;
            player.y_speed += .25;
            if (player.y_pos >= TheGround)
                      player.moveUp = false;
                      player.y_speed = 0;
    public boolean keyDown(Event e, int key)
            if(key==Event.LEFT)
                      pressedLeft = true;
            if(key==Event.RIGHT)
                      pressedRight=true;
            if(key==Event.UP)
                      pressedUp=true;
            if(key==Event.DOWN)
                      pressedDown=true;
            if (key ==  ' ')
                      pressedSpace = true;
            repaint();
            return true;
    public boolean keyUp(Event e, int key)
            pressedLeft=false;
            pressedRight = false;
            pressedSpace = false;
            repaint();
            return true;
    }

    Run this code and you'll see what I'm talking about:
    import java.awt.*;
    import java.applet.*;
    public class Testing extends Applet implements Runnable
        Thread runner;
        private Image Buffer;
        private Graphics gBuffer;
        final int theGround = 205;
         boolean pressedLeft, pressedRight, pressedSpace;
         final int width = 10, height = 10;
         final int INITIALSPEED = -5;
         double x_pos = 100;
         double y_pos = 190;
         boolean moveUp = false;
         double y_speed = 3;
         double x_speed = 3;
        //Init is called first, do any initialisation here
        public void init()
            //create graphics buffer, the size of the applet
            Buffer=createImage(size().width,size().height);
            gBuffer=Buffer.getGraphics();
        public void start()
            if (runner == null)
                runner = new Thread (this);
                runner.start();
        public void stop()
            if (runner != null)
                runner.stop();
                runner = null;
        public void run()
            while(true)
                 /* MAIN CODE*/
                //Thread sleeps for 15 milliseconds here
                try {runner.sleep(15);}
                catch (Exception e) { }
                //paint background blue
                gBuffer.setColor(Color.blue);
                gBuffer.fillRect(0,0,size().width,size().height);
                   if (pressedRight)
                        x_pos += 1;
                   else if (pressedLeft)
                        x_pos -= 1;
                   if (pressedSpace && !moveUp)
                        moveUp = true;
                        y_speed = INITIALSPEED;
                   if (moveUp)
                        y_pos += y_speed;
                        y_speed += .15;
                        if (y_pos + height + y_speed >= theGround)
                             moveUp = false;
                             y_speed = 0;
                Draw();
                repaint();
        //is needed to avoid erasing the background by Java
        public void update(Graphics g)
            paint(g);
        public void paint(Graphics g)
            g.drawImage (Buffer,0,0, this);
        public boolean keyDown(Event e, int key)
            if(key==Event.LEFT)
                pressedLeft = true;
            if(key==Event.RIGHT)
            pressedRight=true;
            if (key ==  ' ')
                 pressedSpace = true;
            repaint();
            return true;
        public boolean keyUp(Event e, int key)
            pressedLeft=false;
            pressedRight = false;
            pressedSpace = false;
            repaint();
            return true;
        public void Draw()
              gBuffer.setColor(Color.green);
              gBuffer.fillOval((int)x_pos,(int)y_pos,width,height);
              gBuffer.setColor(Color.yellow);
              gBuffer.drawLine(0, 200, 500, 200);
              gBuffer.drawString(("Move right/left, press space, and it will stop and fall straight down! Why?"), 10, 20);
              gBuffer.drawString(("Hold the spacebar down and it will work like it should."), 10, 30);
              gBuffer.drawString(("ALSO, move left or right then *QUICKLY* release and move in the opposite direction."), 10, 50);
                   gBuffer.drawString(("-- You should see it pause for a second. Why is that?"), 10, 60);
    }Sorry for some reason the tabs get messed up when I cut and pate it from JCreator. :P
    PLEASE HELP!
    Thanks in advance.

  • I need a "bit" of help with an 8 Puzzle

    My current situation is that I need to create a working 8 puzzle with Java using a GUI. What I've currently done is at http://nale.f2g.net/EightPuzzle.java . My main problem is that when running it I get a NullPointerException at the line containing tile[blankPos].setText(tile[ndx].getText()); in the swap method.

    I get a NPE when ever I use the scramble() method.
    The source is the line move(rand.nextInt(4)); .Your Random rand is not instantiated nowhere. Thus it is naturally null.
    Make rand in the constructor.
    Here's a simpler one. You could use random swap() calls for moving/shuffling/scrambling.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.util.Random;
    public class ObjectOrientedEightPuzzle extends JFrame implements MouseListener{
      private Piece[] tile;
      private Border etched = BorderFactory.createEtchedBorder();
      private Color tileColor = Color.GRAY;
      private Color blankColor = Color.GREEN;
      private String[] label = {"1", "2", "3", "4", "", "5", "6", "7", "8"};
      private JPanel pane;
      public ObjectOrientedEightPuzzle(){
        setTitle("ObjectOrientedEightPuzzle");
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        pane = (JPanel)getContentPane();
        pane.setLayout(new GridLayout(3,3));
        setResizable(false);
        setSize(400, 400);
        tile = new Piece[label.length];
        for(int ndx = 0; ndx < label.length; ndx++){
          tile[ndx] = new Piece(label[ndx], new Position(ndx));
          tile[ndx].addMouseListener(this);
          pane.add(tile[ndx]);
      public void mouseClicked(MouseEvent e){
        Piece p = (Piece)e.getSource();
        Piece blank = blankPos();
        swap(p, blank);
      public void mousePressed(MouseEvent e){
      public void mouseReleased(MouseEvent e){
      public void mouseEntered(MouseEvent e){
      public void mouseExited(MouseEvent e){
      private void swap(Piece clickp, Piece blankp){
        int i = -1;
        int[] pa;
        int b = blankp.getPosition().getPos();
        pa = clickp.getPosition().getNeighbor();
        for (int p = 0; p < pa.length; ++p){
          if (pa[p] == b){
            i = p;
            break;
        if (i != -1){
          blankp.setText(clickp.getText());
          clickp.setText("");
      private Piece blankPos(){
        int ndx;
        for(ndx = 0; ndx < label.length; ndx++){
          if(tile[ndx].getText().equals("")){
            break;
        return tile[ndx];
      public static void main(String[] args){
        ObjectOrientedEightPuzzle puzzle = new ObjectOrientedEightPuzzle();
        puzzle.setVisible(true);
      // represent the position in the array/grid
      class Position{ // 0 ... 8
        int pos;
        int[] neighbor;
        public Position(int p){
          setPos(p);
        public int getPos(){
          return pos;
        public void setPos(int p){
          pos = p;
          setNeighbor(pos);
        public int[] getNeighbor(){
          return neighbor;
        private void setNeighbor(int p){
          switch (p){
            case 0:
              neighbor = new int[2];
              neighbor[0] = 1;
              neighbor[1] = 3;
              break;
            case 1:
              neighbor = new int[3];
              neighbor[0] = 0;
              neighbor[1] = 2;
              neighbor[2] = 4;
              break;
            case 2:
              neighbor = new int[2];
              neighbor[0] = 1;
              neighbor[1] = 5;
              break;
            case 3:
              neighbor = new int[3];
              neighbor[0] = 0;
              neighbor[1] = 4;
              neighbor[2] = 6;
              break;
            case 4:
              neighbor = new int[4];
              neighbor[0] = 1;
              neighbor[1] = 3;
              neighbor[2] = 5;
              neighbor[3] = 7;
              break;
            case 5:
              neighbor = new int[3];
              neighbor[0] = 2;
              neighbor[1] = 4;
              neighbor[2] = 8;
              break;
            case 6:
              neighbor = new int[2];
              neighbor[0] = 3;
              neighbor[1] = 7;
              break;
            case 7:
              neighbor = new int[3];
              neighbor[0] = 4;
              neighbor[1] = 6;
              neighbor[2] = 8;
              break;
            case 8:
              neighbor = new int[2];
              neighbor[0] = 5;
              neighbor[1] = 7;
              break;
            default:
              throw new IllegalArgumentException(String.valueOf(p));
      // represent the piece of the game == a JLabel disguised
      class Piece extends JLabel{
        private int value;
        private Position pos;
        private String ptext;
        public Piece(String s, Position p){
          super(s);
          setBorder(etched);
          setVerticalAlignment(CENTER);
          setHorizontalAlignment(CENTER);
          setFont(new Font("Courier", Font.BOLD, 30));
          setOpaque(true);
          ptext = s;
          pos = p;
          if (s.equals("")){
            setBackground(blankColor);
          else{
            setBackground(tileColor);
          try{
            value = Integer.parseInt(s);
          catch (NumberFormatException e){
            value = -1;
        public int getValue(){
          return value;
        public Position getPosition(){
          return pos;
        public String getText(){
          return ptext;
        public void setText(String t){
          ptext = t;
          if (t.equals("")){
            setBackground(blankColor);
          else{
            setBackground(tileColor);
          super.setText(t);
        public void setValue(int val){
          value = val;
          ptext = String.valueOf(val);
          if (val < 0){
            ptext = "";
          setText(ptext);
          if (value > 0){
            setBackground(tileColor);
          else{
            setBackground(blankColor);
    }

  • I need a bit of help with my 7600GT

    Alright.
    My motherboard doesn't have a VGA slot, and neither does this Video Card.  I understand that it is remedied with the adapters that are provided, but one must install the drivers for the DVI slots before one can do anything.  I can't get any output on my monitor with the adapters because I can't see what's going on to install the drivers.  I managed to install Windows by taking out my hard drive and putting it into another computer (SATA drive, btw) and I would have done the same with my video card if it weren't for the fact that no other computers in my house have PCI-E slots. 
    Is there any way to get the drivers onto this hard drive without having to search around town for a computer with both a SATA and a PCI-E slot?
    Thanks!

    iamquitethen00b,
    Moan Guide
    Richard

  • I need a bit of help with my iPhone 4...

    I just backed up my phone and I'm trying to update it to iOS 7.0.4. but when I updated my ipod, everything got deleted off of it. I don't want that to happen to my phone even though I know it probably will. If I restore my iPhone and then restore backup AFTER I update my phone, will I get everything back?
    Also, will everything actually be deleted or could I find them somewhere on my laptop?

    iamquitethen00b,
    Moan Guide
    Richard

  • Help with some beginner code

    Hello, I am new to java and I need a bit of help with some code that I'm writing. here is the code:
    import javax.swing.*;
    public class Test{
         public static void main(String[] args){
         JOptionPane.showMessageDialog(null,"We will now build a block with *'s","Block",1);
         String input=JOptionPane.showInputDialog(null,"Type a number: ","Number",3);
         int number=Integer.parseInt(input);
         int count=0; int count2=0;
         for(count2=0; count2<number; count2++){
              for(count=0; count<number; count++){
              System.out.print("* ");
    System.exit(0);
    }Now, all I need is to build a block of *'s with the number that the user inputs. With the code that I wrote I get the correct number of *'s but not in the form of a block. They just print out in a straight line. I know this is a very simple task but could someone please help me out? What do I need to modify in my code so that the *'s print out arranged as a block like so:
    **********

    Your code only uses the print method which prints without a carriage return/line feed. So you need to add a line of code to print a carriage return/line feed. Where? well that is your task to work out.

  • Need a little bit of help with substring...

    Im very new at java programming, and need a bit of help with a problem:
    Here is what I have:
    System.out.print("Enter a string : ");
    Scanner scan = new Scanner (System.in);
    stringy = scan.nextLine();
    Now I want to split the string "stringy" like this: h:hi:hip:hipp:hippo
    I know this uses substring, but I can't figure out how to do it.
    Any help would be great, thanks!

    I know about the length method, what I dont knowis
    how to use the length and substring methodstogether
    to solve the problem i mentioned initially. There are three ingredients to perform this task:
    - String.length()
    - String.substring(int start, int end)
    - for-statement:
    http://java.sun.com/docs/books/tutorial/java/nutsandbo
    lts/for.html
    Pseudo code:IN <- input String from user
    LOOP FROM 0 -> IN.length()
    print IN.substring(?, ?)
    print ":"
    END LOOP
    Remember, Im very new. ;)Remember that by just handing you the solution, you
    will learn far less than finding things out by
    yourself.
    ; )Thanks a lot, i should be able to figure it out froom the pseudo code. :)

  • Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Want a complete migration guide to upgrade 11.1.0.7 to 11.2.0.3 database using DBUA..We are implementing R12.1.3 version and then have to migrate the default 11gR1 database to 11.2.0.3 version. Please help with some step by step docs

    Upgrade to 11.2.0.3 -- Interoperability Notes Oracle EBS R12 with Oracle Database 11gR2 (11.2.0.3) (Doc ID 1585578.1)
    Upgrade to 11.2.0.4 (latest 11gR2 patchset certified with R12) -- Interoperability Notes EBS 12.0 and 12.1 with Database 11gR2 (Doc ID 1058763.1)
    Thanks,
    Hussein

  • Little bit of help with the duplication process needed

    Hi
    I trying to duplicate a database from one server to a remote server. They are both running windows server 2003 (my first problem) , the primary server is running oracle 11gR1 and the (hopefully) receiving server is running 11gR2(is that going to be a problem?) and I'm a little stuck on some parts of the process.
    The book I'm using says to edit the listener.ora file to include a SID_DESC of the remote database. Here is my listener.ora file with the modifications
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.host.local)(PORT = 1521))
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CGARDMSTR)
    (ORACLE_HOME = G:\app\administrator\product\11.1.0\db_1)
    (PROGRAM = extproc)
    (SID_DESC =
    (GLOBAL_DBNAME = CGARDMSTR)
    (ORACLE_HOME =G:\app\administrator\product\11.1.0\db_1)
    (SID_NAME = CGARDMSTR)
    *(SID_DESC* *=*
    *(GLOBAL_DBNAME* *=* cgard)
    *(ORACLE_HOME* *=F:\oracle\product\11.2.0\dbhome_1)*
    *(SID_NAME* *=* cgard)
    (bold is what i added)
    it then said to chnage my tnsnames.ora
    CGARD =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.host.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = cgard)
    CGARD5DE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.host.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CGARD5DEV)
    CGARDMST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = test.host.local)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = CGARDMSTR)
    cgard =
    *(DESCRIPTION =*
    *(ADDRESS = (PROTOCOL = TCP)(HOST = live.host.local)(PORT = 1521))*
    *(CONNECT_DATA =*
    *(SERVER = DEDICATED)*
    *(SERVICE_NAME = cgard)*
    I changed the local domain to host for business reasons
    The next step was to create a initialization parameter file which I am guessing is a pfile and hopefully not a spfile. It then says to only enter one param db_name and the conversion params if the filesystem is diffrent. Problem is I don't know what to do with this file, if I am suppose to switch the second database to this file then surly I would need some more params? Anyway thats the first of many questions.
    When I try to run through the rman commands it describes it also trips up:
    RMAN> connect auxiliary sys/*********@live.host.local
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-04006: error from auxiliary database: ORA-12170: TNS:Connect timeout occurr
    ed
    The other database is up and connectable via sqldevloper so I'm guessing it was my configuration of listener and tnsnames
    Ok to reiterate my questions are:
    1) what needs to be in the pfile I create for the database thats going to receive the backup and what do I do with that file when I have made it?
    2) I am pretty sure my listener and tsunamis config is completely wrong so can I have some pointers on fixing that?
    3) Was the reason I could not connect to the receiving database my tns and listener config or is it something else?
    Quite a few other questions but untill I know some more about the above I doubt I will be able to ask properly.
    Also if this helps the book I am using is Expert Oracle Database 11g Administration and the page is 835(the method that begins on that page) and I am willing to write out the whole method if you need more details.
    Oh and if you havent figured it out I am very new to this so if some of this sounds very wrong or just stupid just say what I need to change and I will get right on it.
    Thanks
    Alex

    Ok so I have made some progress. Here is where I am currently at:
    RMAN> RUN
    2> {
    3> SET NEWNAME FOR DATAFILE 1 TO 'F:\oracle\oradata\cgard\file1.dbs';
    4> SET NEWNAME FOR DATAFILE 2 TO 'F:\oracle\oradata\cgard\file2.dbs';
    5> SET NEWNAME FOR DATAFILE 3 TO 'F:\oracle\oradata\cgard\file3.dbs';
    6> SET NEWNAME FOR DATAFILE 4 TO 'F:\oracle\oradata\cgard\file4.dbs';
    7> SET NEWNAME FOR DATAFILE 5 TO 'F:\oracle\oradata\cgard\file5.dbs';
    8> SET NEWNAME FOR TEMPFILE 1 TO 'F:\oracle\oradata\cgard\temp1.dbs';
    9> duplicate target database
    10> to cgard
    11> from active database
    12> pfile='F:\oracle\product\11.2.0\dbhome_1\database\initCGARD.ora';
    13> }
    executing command: SET NEWNAME
    starting full resync of recovery catalog
    full resync complete
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting Duplicate Db at 19-NOV-10
    using channel ORA_AUX_DISK_1
    contents of Memory Script:
    set newname for datafile 1 to
    "F:\ORACLE\ORADATA\CGARD\FILE1.DBS";;
    set newname for datafile 2 to
    "F:\ORACLE\ORADATA\CGARD\FILE2.DBS";;
    set newname for datafile 3 to
    "F:\ORACLE\ORADATA\CGARD\FILE3.DBS";;
    set newname for datafile 4 to
    "F:\ORACLE\ORADATA\CGARD\FILE4.DBS";;
    set newname for datafile 5 to
    "F:\ORACLE\ORADATA\CGARD\FILE5.DBS";;
    backup as copy reuse
    datafile 1 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE1.DBS"; datafile
    2 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE2.DBS"; datafile
    3 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE3.DBS"; datafile
    4 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE4.DBS"; datafile
    5 auxiliary format
    "F:\ORACLE\ORADATA\CGARD\FILE5.DBS"; ;
    sql 'alter system archive log current';
    executing Memory Script
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    executing command: SET NEWNAME
    Starting backup at 19-NOV-10
    allocated channel: ORA_DISK_1
    channel ORA_DISK_1: SID=143 device type=DISK
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00001 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\SYS
    TEM01.DBF
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:23:
    52
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00004 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\USE
    RS01.DBF
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:24:
    24
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00002 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\SYS
    AUX01.DBF
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:24:
    43
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00003 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\UND
    OTBS01.DBF
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:25:
    17
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    continuing other job steps, job failed will not be re-run
    channel ORA_DISK_1: starting datafile copy
    input datafile file number=00005 name=G:\APP\ADMINISTRATOR\ORADATA\CGARDMSTR\RMA
    N01.DBF
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of Duplicate Db command at 11/19/2010 16:25:55
    RMAN-03015: error occurred in stored script Memory Script
    RMAN-03009: failure of backup command on ORA_DISK_1 channel at 11/19/2010 16:25:
    55
    ORA-17629: Cannot connect to the remote database server
    ORA-17627: ORA-01017: invalid username/password; logon denied
    ORA-17629: Cannot connect to the remote database server
    RMAN>
    I did issue the commands:
    C:\Documents and Settings\Administrator>rman target /
    Recovery Manager: Release 11.1.0.6.0 - Production on Fri Nov 19 13:55:40 2010
    Copyright (c) 1982, 2007, Oracle. All rights reserved.
    connected to target database: CGARDMST (DBID=3160500813)
    RMAN> connect catalog rman/rman
    connected to recovery catalog database
    RMAN> connect auxiliary sys/**********@cgard
    connected to auxiliary database: CGARD (not mounted)
    So I am not quite sure what it wants. I read somewhere about a password file but I don't understand how it will help, also most things I have looked at wernt clear on how to do it. I took a stab anyway:
    G:\app\administrator\product\11.1.0\db_1\BIN>orapwd file=orapwcgard password=*********** entries=20 ignorecase=n
    Was run on the original database host.
    File was then copied to "F:\oracle\product\11.2.0\dbhome_1\database" on the receiving database's host it was then renamed to PWDcgard.ora as there was file there already with that name.
    It did not help(same error).
    The book I am using mentions the 'PASSWORD FILE' param to be used with the duplicate command but I cant find a example on how to use it so any help with that would be great.
    Thanks for the effort so far guys its really appreciated.

  • [8i] Need help with some workday calculations

    At the beginning of the month, I got help with a workday calculation in: [8i] Help with function with parameters (for workday calculation)
    Now, as it turns out, I was able to locate a function in the database that does what I want, however, it is much slower to use the function than to join two copies of the CALN table (Please see referenced thread for details. I can copy them to this thread if necessary.) I need to verify that the pre-existing function has 'DETERMINISTIC' in it, as I would guess that if it doesn't, it would be much slower than it could be.
    But now, I've come across a situation where I have to do multiple workday calculations in the same query--enough that I have to join 6 copies of my CALN table. I can't imagine that is at all efficient. I believe it was Frank K. who said (in the original thread) that if the function was slow, I should consider alternatives. Can anyone help me identify some of those alternatives? I'm definitely at that point now. (This query is one I'm using as the base for a report in Oracle BI, and let's just say it doesn't like my query, even though my syntax appears to be correct, and I would guess that joining 6 copies of one table is at least partly to blame for this).
    Note: I'm working with Oracle 8i

    OK, I finally have some sample data... I tried to make it thorough. I've included data in the CALN table YTD + tomorrow, so that any workday calculations using SYSDATE will work.
    CREATE TABLE caln
    (     clndr_dt     DATE          NOT NULL
    ,     clndr_yr     NUMBER
    ,     shop_day     NUMBER
    ,     shop_dt          DATE
    ,     shop_wk          NUMBER
    ,     shop_yr          NUMBER
    ,     shop_days     NUMBER
    ,     clndr_days     NUMBER
         CONSTRAINT caln_pk PRIMARY KEY (clndr_dt)
    INSERT INTO     caln
    VALUES (To_Date('12/23/2009','mm/dd/yyyy'),2009,247,To_Date('12/23/2009','mm/dd/yyyy'),51,2009,7631,10950);
    INSERT INTO     caln
    VALUES (To_Date('01/01/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),52,2009,7631,10959);
    INSERT INTO     caln
    VALUES (To_Date('01/02/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),52,2009,7631,10960);
    INSERT INTO     caln
    VALUES (To_Date('01/03/2010','mm/dd/yyyy'),2010,0,To_Date('12/23/2009','mm/dd/yyyy'),1,2010,7631,10961);
    INSERT INTO     caln
    VALUES (To_Date('01/04/2010','mm/dd/yyyy'),2010,1,To_Date('01/04/2010','mm/dd/yyyy'),1,2010,7632,10962);
    INSERT INTO     caln
    VALUES (To_Date('01/05/2010','mm/dd/yyyy'),2010,2,To_Date('01/05/2010','mm/dd/yyyy'),1,2010,7633,10963);
    INSERT INTO     caln
    VALUES (To_Date('01/06/2010','mm/dd/yyyy'),2010,3,To_Date('01/06/2010','mm/dd/yyyy'),1,2010,7634,10964);
    INSERT INTO     caln
    VALUES (To_Date('01/07/2010','mm/dd/yyyy'),2010,4,To_Date('01/07/2010','mm/dd/yyyy'),1,2010,7635,10965);
    INSERT INTO     caln
    VALUES (To_Date('01/08/2010','mm/dd/yyyy'),2010,5,To_Date('01/08/2010','mm/dd/yyyy'),1,2010,7636,10966);
    INSERT INTO     caln
    VALUES (To_Date('01/09/2010','mm/dd/yyyy'),2010,0,To_Date('01/08/2010','mm/dd/yyyy'),1,2010,7636,10967);
    INSERT INTO     caln
    VALUES (To_Date('01/10/2010','mm/dd/yyyy'),2010,0,To_Date('01/08/2010','mm/dd/yyyy'),2,2010,7636,10968);
    INSERT INTO     caln
    VALUES (To_Date('01/11/2010','mm/dd/yyyy'),2010,6,To_Date('01/11/2010','mm/dd/yyyy'),2,2010,7637,10969);
    INSERT INTO     caln
    VALUES (To_Date('01/12/2010','mm/dd/yyyy'),2010,7,To_Date('01/12/2010','mm/dd/yyyy'),2,2010,7638,10970);
    INSERT INTO     caln
    VALUES (To_Date('01/13/2010','mm/dd/yyyy'),2010,8,To_Date('01/13/2010','mm/dd/yyyy'),2,2010,7639,10971);
    INSERT INTO     caln
    VALUES (To_Date('01/14/2010','mm/dd/yyyy'),2010,9,To_Date('01/14/2010','mm/dd/yyyy'),2,2010,7640,10972);
    INSERT INTO     caln
    VALUES (To_Date('01/15/2010','mm/dd/yyyy'),2010,10,To_Date('01/15/2010','mm/dd/yyyy'),2,2010,7641,10973);
    INSERT INTO     caln
    VALUES (To_Date('01/16/2010','mm/dd/yyyy'),2010,0,To_Date('01/15/2010','mm/dd/yyyy'),2,2010,7641,10974);
    INSERT INTO     caln
    VALUES (To_Date('01/17/2010','mm/dd/yyyy'),2010,0,To_Date('01/15/2010','mm/dd/yyyy'),3,2010,7641,10975);
    INSERT INTO     caln
    VALUES (To_Date('01/18/2010','mm/dd/yyyy'),2010,11,To_Date('01/18/2010','mm/dd/yyyy'),3,2010,7642,10976);
    INSERT INTO     caln
    VALUES (To_Date('01/19/2010','mm/dd/yyyy'),2010,12,To_Date('01/19/2010','mm/dd/yyyy'),3,2010,7643,10977);
    INSERT INTO     caln
    VALUES (To_Date('01/20/2010','mm/dd/yyyy'),2010,13,To_Date('01/20/2010','mm/dd/yyyy'),3,2010,7644,10978);
    INSERT INTO     caln
    VALUES (To_Date('01/21/2010','mm/dd/yyyy'),2010,14,To_Date('01/21/2010','mm/dd/yyyy'),3,2010,7645,10979);
    INSERT INTO     caln
    VALUES (To_Date('01/22/2010','mm/dd/yyyy'),2010,15,To_Date('01/22/2010','mm/dd/yyyy'),3,2010,7646,10980);
    INSERT INTO     caln
    VALUES (To_Date('01/23/2010','mm/dd/yyyy'),2010,0,To_Date('01/22/2010','mm/dd/yyyy'),3,2010,7646,10981);
    INSERT INTO     caln
    VALUES (To_Date('01/24/2010','mm/dd/yyyy'),2010,0,To_Date('01/22/2010','mm/dd/yyyy'),4,2010,7646,10982);
    INSERT INTO     caln
    VALUES (To_Date('01/25/2010','mm/dd/yyyy'),2010,16,To_Date('01/25/2010','mm/dd/yyyy'),4,2010,7647,10983);
    INSERT INTO     caln
    VALUES (To_Date('01/26/2010','mm/dd/yyyy'),2010,17,To_Date('01/26/2010','mm/dd/yyyy'),4,2010,7648,10984);
    INSERT INTO     caln
    VALUES (To_Date('01/27/2010','mm/dd/yyyy'),2010,18,To_Date('01/27/2010','mm/dd/yyyy'),4,2010,7649,10985);
    INSERT INTO     caln
    VALUES (To_Date('01/28/2010','mm/dd/yyyy'),2010,19,To_Date('01/28/2010','mm/dd/yyyy'),4,2010,7650,10986);
    INSERT INTO     caln
    VALUES (To_Date('01/29/2010','mm/dd/yyyy'),2010,20,To_Date('01/29/2010','mm/dd/yyyy'),4,2010,7651,10987);
    INSERT INTO     caln
    VALUES (To_Date('01/30/2010','mm/dd/yyyy'),2010,0,To_Date('01/29/2010','mm/dd/yyyy'),4,2010,7651,10988);
    INSERT INTO     caln
    VALUES (To_Date('01/31/2010','mm/dd/yyyy'),2010,0,To_Date('01/29/2010','mm/dd/yyyy'),5,2010,7651,10989);
    INSERT INTO     caln
    VALUES (To_Date('02/01/2010','mm/dd/yyyy'),2010,21,To_Date('02/01/2010','mm/dd/yyyy'),5,2010,7652,10990);
    INSERT INTO     caln
    VALUES (To_Date('02/02/2010','mm/dd/yyyy'),2010,22,To_Date('02/02/2010','mm/dd/yyyy'),5,2010,7653,10991);
    INSERT INTO     caln
    VALUES (To_Date('02/03/2010','mm/dd/yyyy'),2010,23,To_Date('02/03/2010','mm/dd/yyyy'),5,2010,7654,10992);
    INSERT INTO     caln
    VALUES (To_Date('02/04/2010','mm/dd/yyyy'),2010,24,To_Date('02/04/2010','mm/dd/yyyy'),5,2010,7655,10993);
    INSERT INTO     caln
    VALUES (To_Date('02/05/2010','mm/dd/yyyy'),2010,25,To_Date('02/05/2010','mm/dd/yyyy'),5,2010,7656,10994);
    INSERT INTO     caln
    VALUES (To_Date('02/06/2010','mm/dd/yyyy'),2010,0,To_Date('02/05/2010','mm/dd/yyyy'),5,2010,7656,10995);
    INSERT INTO     caln
    VALUES (To_Date('02/07/2010','mm/dd/yyyy'),2010,0,To_Date('02/05/2010','mm/dd/yyyy'),6,2010,7656,10996);
    INSERT INTO     caln
    VALUES (To_Date('02/08/2010','mm/dd/yyyy'),2010,26,To_Date('02/08/2010','mm/dd/yyyy'),6,2010,7657,10997);
    INSERT INTO     caln
    VALUES (To_Date('02/09/2010','mm/dd/yyyy'),2010,27,To_Date('02/09/2010','mm/dd/yyyy'),6,2010,7658,10998);
    INSERT INTO     caln
    VALUES (To_Date('02/10/2010','mm/dd/yyyy'),2010,28,To_Date('02/10/2010','mm/dd/yyyy'),6,2010,7659,10999);
    INSERT INTO     caln
    VALUES (To_Date('02/11/2010','mm/dd/yyyy'),2010,29,To_Date('02/11/2010','mm/dd/yyyy'),6,2010,7660,11000);
    INSERT INTO     caln
    VALUES (To_Date('02/12/2010','mm/dd/yyyy'),2010,30,To_Date('02/12/2010','mm/dd/yyyy'),6,2010,7661,11001);
    INSERT INTO     caln
    VALUES (To_Date('02/13/2010','mm/dd/yyyy'),2010,0,To_Date('02/12/2010','mm/dd/yyyy'),6,2010,7661,11002);
    INSERT INTO     caln
    VALUES (To_Date('02/14/2010','mm/dd/yyyy'),2010,0,To_Date('02/12/2010','mm/dd/yyyy'),7,2010,7661,11003);
    INSERT INTO     caln
    VALUES (To_Date('02/15/2010','mm/dd/yyyy'),2010,31,To_Date('02/15/2010','mm/dd/yyyy'),7,2010,7662,11004);
    INSERT INTO     caln
    VALUES (To_Date('02/16/2010','mm/dd/yyyy'),2010,32,To_Date('02/16/2010','mm/dd/yyyy'),7,2010,7663,11005);
    INSERT INTO     caln
    VALUES (To_Date('02/17/2010','mm/dd/yyyy'),2010,33,To_Date('02/17/2010','mm/dd/yyyy'),7,2010,7664,11006);
    INSERT INTO     caln
    VALUES (To_Date('02/18/2010','mm/dd/yyyy'),2010,34,To_Date('02/18/2010','mm/dd/yyyy'),7,2010,7665,11007);
    INSERT INTO     caln
    VALUES (To_Date('02/19/2010','mm/dd/yyyy'),2010,35,To_Date('02/19/2010','mm/dd/yyyy'),7,2010,7666,11008);
    INSERT INTO     caln
    VALUES (To_Date('02/20/2010','mm/dd/yyyy'),2010,0,To_Date('02/19/2010','mm/dd/yyyy'),7,2010,7666,11009);
    CREATE TABLE ords
    (     ord_nbr          NUMBER          NOT NULL
    ,     sub_nbr          NUMBER          NOT NULL
    ,     ord_stat     VARCHAR2(2)
    ,     ord_qty          NUMBER
    ,     part_nbr     VARCHAR2(5)
         CONSTRAINT ords_pk PRIMARY KEY (ord_nbr, sub_nbr)
    INSERT INTO     ords
    VALUES (1,1,'CL',10,'PART1');
    INSERT INTO     ords
    VALUES (1,2,'CL',5,'PART1');
    INSERT INTO     ords
    VALUES (25,1,'CL',15,'PART2');
    INSERT INTO     ords
    VALUES (14,1,'OP',12,'PART3');
    INSERT INTO     ords
    VALUES (33,1,'CL',25,'PART1');
    INSERT INTO     ords
    VALUES (33,2,'CL',15,'PART1');
    INSERT INTO     ords
    VALUES (33,3,'OP',10,'PART1');
    INSERT INTO     ords
    VALUES (7,1,'PL',18,'PART2');
    INSERT INTO     ords
    VALUES (96,1,'PL',10,'PART3');
    INSERT INTO     ords
    VALUES (31,1,'CL',20,'PART2');
    CREATE TABLE oops
    (     ord_nbr          NUMBER          NOT NULL
    ,     sub_nbr          NUMBER          NOT NULL
    ,     op_nbr          VARCHAR2(4)     NOT NULL
    ,     mach_id          VARCHAR2(4)
    ,     oper_stat     VARCHAR2(2)
    ,     plan_start_dt     DATE
    ,     plsu          NUMBER
    ,     plrn          NUMBER
         CONSTRAINT ords_pk PRIMARY KEY (ord_nbr, sub_nbr, op_nbr)
    -- NOTE:
    -- for the orders with a status of 'CL' or 'PL' in the 'ords' table, I'm not bothering to put
    -- in more than two operations (though in reality more would be there) since they should be
    -- ignored in the final result anyway
    INSERT INTO     oops
    VALUES (1,1,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (1,1,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (1,2,'0010','123A','CP',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (1,2,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (25,1,'0005','123A','CP',TO_DATE('01/18/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (25,1,'0030','110C','CL',TO_DATE('01/19/2010','mm/dd/yyyy'),4,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0010','127A','CP',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (14,1,'0025','110C','CL',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0040','050C','CP',TO_DATE('01/13/2010','mm/dd/yyyy'),1.3,0.15);
    INSERT INTO     oops
    VALUES (14,1,'0050','220B','WK',TO_DATE('01/14/2010','mm/dd/yyyy'),4,0.25);
    INSERT INTO     oops
    VALUES (14,1,'0065','242B','AV',TO_DATE('01/18/2010','mm/dd/yyyy'),1.5,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0067','150G','NA',TO_DATE('01/19/2010','mm/dd/yyyy'),2,0.1);
    INSERT INTO     oops
    VALUES (14,1,'0100','250G','NA',TO_DATE('01/20/2010','mm/dd/yyyy'),2.1,0.2);
    INSERT INTO     oops
    VALUES (33,1,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,1,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,2,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,2,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,3,'0010','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (33,3,'0015','259B','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (33,3,'0020','220B','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1.7,0.15);
    INSERT INTO     oops
    VALUES (33,3,'0030','150G','NA',TO_DATE('01/13/2010','mm/dd/yyyy'),1.3,0.05);
    INSERT INTO     oops
    VALUES (33,3,'0055','150G','NA',TO_DATE('01/15/2010','mm/dd/yyyy'),2.1.,0.1);
    INSERT INTO     oops
    VALUES (7,1,'0005','123A','NA',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.2);
    INSERT INTO     oops
    VALUES (7,1,'0030','110C','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.15);
    INSERT INTO     oops
    VALUES (96,1,'0010','127A','NA',TO_DATE('01/11/2010','mm/dd/yyyy'),2,0.25);
    INSERT INTO     oops
    VALUES (96,1,'0025','110C','NA',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    INSERT INTO     oops
    VALUES (31,1,'0005','123A','CL',TO_DATE('01/11/2010','mm/dd/yyyy'),1.9,0.2);
    INSERT INTO     oops
    VALUES (31,1,'0030','110C','CP',TO_DATE('01/12/2010','mm/dd/yyyy'),1,0.1);
    CREATE TABLE mach
    (     mach_id          VARCHAR2(4)     NOT NULL
    ,     desc_short     VARCHAR2(9)     
    ,     group          VARCHAR2(7)
         CONSTRAINT ords_pk PRIMARY KEY (mach_id)
    INSERT INTO     mach
    VALUES     ('123A','desc here','GROUPH1');
    INSERT INTO     mach
    VALUES     ('259B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('110C','desc here','GROUPJ1');
    INSERT INTO     mach
    VALUES     ('050C','desc here','GROUPK2');
    INSERT INTO     mach
    VALUES     ('220B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('242B','desc here','GROUPH2');
    INSERT INTO     mach
    VALUES     ('150G','desc here','GROUPL1');
    INSERT INTO     mach
    VALUES     ('250G','desc here','GROUPL2');
    INSERT INTO     mach
    VALUES     ('242B','desc here','GROUPH2');

  • Need a little help with some errors.

    Receiving some errors..
    btn2.addActionListener(new ActionListener() {
    and also
    frame.setLocation(400,400);
    frame.setVisible(true);
    }<<~~has 2 errors here...
    Both above have class or interface expected errors..clueless on what i'm missing at the moment.
    Anyone mind pointing out what {'s and }'s i'm missing?
         btn1.addActionListener(new ActionListener() {
                             public void actionPerformed(ActionEvent evt) {
                                  btn1actions();
              private void btn1actions() {
                   if (radio1.isSelected()) System.out.println("Radio Button 1 is selected.");
                   if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.");
         btn2.addActionListener(new ActionListener() {
                                       public void actionPerformed(ActionEvent evt) {
                                            btn2actions();
                        private void btn2actions() {
                             if (radio1.isSelected()) System.out.println("Radio Button 1 is selected.");
                             if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.");
                   btn3.addActionListener(new ActionListener() {
                                       public void actionPerformed(ActionEvent evt) {
                                            btn1actions();
                        private void btn3actions() {
                             txt1.setText("");
                             txt1.requestFocus();
    public static void main(String[] args) {
        Test2 frame = new Test2();
        frame.setTitle("Test Frame");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.setSize(400, 300);
        frame.setLocation(400,400);
        frame.setVisible(true);
    }

    All my code..finally posted...just need help with more errors.
    F:\DocumentsTest2.java:169: ';' expected
              btn1.addActionListener(new ActionListener()) {
    ^
    F:\Documents\Test2.java:176: illegal start of expression
              private void btn1actions() {
    ^
    F:\Documents\Test2.java:191: illegal start of expression
              private void btn2actions() {
    ^
    F:\Documents\.java:202: illegal start of expression
              private void btn3actions() {
    ^
    4 errors
    Tool completed with exit code 1
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    public class Test2 extends JFrame{
         static JButton btn1,btn2,btn3;
         static JTextField txt1;
         static JRadioButton radio1,radio2;
           public Test2() {
             Container container = getContentPane();
             container.setLayout(new BorderLayout());
              //Create Panels
                JPanel Panel1 = new JPanel();
                JPanel Panel2 = new JPanel();
                JPanel Panel3 = new JPanel();
                JPanel Panel4 = new JPanel();
                JPanel Panel5 = new JPanel();
                JPanel Panel6 = new JPanel();
                JPanel Panel7 = new JPanel();
                JPanel Panel8 = new JPanel();
                JPanel Panel9 = new JPanel();
                JPanel Panel10 = new JPanel();
              //Set Layout for Panels
              Panel3.setLayout(new BorderLayout());
              Panel4.setLayout(new BorderLayout());
              Panel5.setLayout(new BorderLayout());
              Panel6.setLayout(new BorderLayout());
              Panel10.setLayout(new BorderLayout());
              //Create the Various Fonts and Colors for this GUI
              Font font1 = new Font("SansSerif", Font.BOLD, 20);
              Font font2 = new Font("Serif", Font.PLAIN, 15);
              Color color1 = new Color(3,15,125);//A Dark Blue Color
              Color color2 = new Color(201,29,10);//A Red Color
              Color color3 = new Color(127,127,127);//A Grey Color
              //Create Buttons and Labels
             btn1 = new JButton("Submit");
             btn2 = new JButton("Display Schedule");
             btn3 = new JButton("Enter New Name");
             JLabel label1 = new JLabel("Student Name");
             JLabel label2 = new JLabel("Course Number");
              JLabel label3 = new JLabel("Welcome to the Java Community College");
              JLabel label4 = new JLabel("Registration System!");
              //Declare Text Field For Entering Student Names
              txt1 = new JTextField(15);
              //"Put Course Number from another Method Here"
              String[] courseStrings = { "CISM2230 A", "CISM2230 B", "CISM1110 A", "CISM1110 B", "CISM1120 A", "CISM1120 B" };
              JComboBox Combo1 = new JComboBox(courseStrings);
              //Declare Radio Buttons for Add and Drop Course
              radio1 = new JRadioButton("Add a Course", false);
              radio2 = new JRadioButton("Drop a Course", false);
              ButtonGroup radioButtons = new ButtonGroup();
              radioButtons.add(radio1);
              radioButtons.add(radio2);
              //Panel 10 is the Main Displaying Panel
              Panel10.add(Panel3, BorderLayout.NORTH);
              Panel10.add(Panel4, BorderLayout.CENTER);
              Panel10.add(Panel8, BorderLayout.SOUTH);
              //Panel 3 Used to Display Label 3 and 4 using Panels 1 and 2
              Panel3.add(Panel1, BorderLayout.NORTH);
              Panel3.add(Panel2, BorderLayout.CENTER);
              Panel1.add(label3);
             Panel2.add(label4);
              //Panel 4 Used to Display Student Name, Txt1, Course Number, Combo Box and Radio Buttons
             Panel5.add(label1, BorderLayout.NORTH);
             Panel5.add(txt1, BorderLayout.CENTER);
             Panel6.add(label2, BorderLayout.NORTH);
              Panel6.add(Combo1, BorderLayout.CENTER);
              Panel7.add(radio1, BorderLayout.NORTH);
              Panel7.add(radio2, BorderLayout.CENTER);
              Panel4.add(Panel5, BorderLayout.NORTH);
              Panel4.add(Panel6, BorderLayout.CENTER);
              Panel4.add(Panel7, BorderLayout.SOUTH);
              //Panel 8 Used to Display the Buttons
              Panel9.add(btn1, BorderLayout.CENTER);
              Panel9.add(btn2, BorderLayout.CENTER);
              Panel9.add(btn3, BorderLayout.SOUTH);
              Panel8.add(Panel9, BorderLayout.CENTER);
              //Setting Background, ForeGround and Font of all Text.
             Panel1.setBackground(color3);
             Panel2.setBackground(color3);
             Panel3.setBackground(color3);
             Panel4.setBackground(color3);
             Panel5.setBackground(color3);
             Panel6.setBackground(color3);
             Panel7.setBackground(color3);
             Panel8.setBackground(color3);
             Panel9.setBackground(color3);
             Panel10.setBackground(color3);
             btn1.setBackground(color3);
             btn2.setBackground(color3);
             btn3.setBackground(color3);
             radio1.setBackground(color3);
             radio2.setBackground(color3);
             btn1.setFont(font2);
             btn2.setFont(font2);
             btn3.setFont(font2);
             Combo1.setFont(font2);
             Combo1.setBackground(color3);
             Combo1.setForeground(color1);
             label1.setFont(font2);
             label2.setFont(font2);
             label3.setFont(font1);
             label4.setFont(font1);
             label1.setForeground(color2);
             label2.setForeground(color2);
             label3.setForeground(color1);
             label4.setForeground(color1);
             container.add(Panel10);
              //Setting Keyboard Shortcuts to Radio Buttons and Regular Buttons
              btn1.setMnemonic('S');
              btn2.setMnemonic('D');
              btn3.setMnemonic('E');
              radio1.setMnemonic('A');
              radio2.setMnemonic('C');
              //ActionListener
              btn1.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                        btn1actions();
              private void btn1actions() {
                   if (radio1.isSelected()){ System.out.println("Radio Button 1 is selected. Button 1")};
                   if (radio2.isSelected()){ System.out.println("Radio Button 2 is selected. Button 1")};
              btn2.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                                            btn2actions();
              private void btn2actions() {
                   if (radio1.isSelected()) System.out.println("Radio Button 1 is selected(Button 2).");
                   if (radio2.isSelected()) System.out.println("Radio Button 2 is selected.Button 2");
              btn3.addActionListener(new ActionListener()) {
                   public void actionPerformed(ActionEvent evt) {
                        btn1actions();
              private void btn3actions() {
                   txt1.setText("");
                   txt1.requestFocus();
         public static void main(String[] args) {
             JavaCollegeTest2 frame = new JavaCollegeTest2();
             frame.setTitle("Project 4");
             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
             frame.setSize(400, 300);
             frame.setLocation(400,400);
             frame.setVisible(true);
    }

  • Need help with some simple N900 confusions/problem...

    Hi All
    Just got a UK N900 rx-51_2009se_2.2009.51-1.203.2_pr_203 and I'm rather struggling with some things:
    MMS; didnt get any operator settings for MMS, and can't find any way of creating an MMS. Can someone enlighten me?
    Can this thing not be used in portrait mode other than for the phone dial pad?
    When connecting to e.g. the wireless network they have in the pub, it wants me to push a button on the router, or type a pin into the router - why can't we just have the old fashioned way of "ask the pub staff what the key is, they tell me, and i type it in" - how do I enter the wpa key as a word without this pin/button pushing nonsense?
    How can I type my SMS etc with a 3x3 key pad (like a phone) - I really don't like qwerty on phones.. I'm after a portrait mode, can-be-operated-with-just-a-thumb, 3x3 button layout with predictive text (i.e. like every phone in the history of the world) - how do I do that?
    I can't find any form of Switch app (to copy contacts and messages off my old device) - how do we do this painlessly?
    How do I make the phone forget all the badly spelled words the previous owner seems to have entered?
    Can the thing that organises the main screen snap the icons to a larger grid or must I mess around nudging with the stylus till they line up? (They tend to jump out of line just as I remove the stylus from the screen)
    I'm sure I'll have more questions later..
    Thanks

    Answers to my own Qs for the benefits of others:
    MMS; didnt get any operator settings for MMS, and can't find any way of creating an MMS. Can someone enlighten me?
    No, use fMMS but be aware it's very beta, only allows picture sending with very rudimentary settings and you must change APN manually
    Can this thing not be used in portrait mode other than for the phone dial pad?
    No, apps have to be portrait specific and only dial pad and the browser (experimental) know of it
    When connecting to e.g. the wireless network they have in the pub, it wants me to push a button on the router, or type a pin into the router - why can't we just have the old fashioned way of "ask the pub staff what the key is, they tell me, and i type it in" - how do I enter the wpa key as a word without this pin/button pushing nonsense?
    No - a WONTFIX bug. Configure the connection manually in settings instead and you can type the key
    How can I type my SMS etc with a 3x3 key pad (like a phone) - I really don't like qwerty on phones.. I'm after a portrait mode, can-be-operated-with-just-a-thumb, 3x3 button layout with predictive text (i.e. like every phone in the history of the world) - how do I do that?
    No can do until someone on the maemo team etc creates an on screen keyboard that functions in this way
    I can't find any form of Switch app (to copy contacts and messages off my old device) - how do we do this painlessly?
    No. Transfer and Sync in Settings can retrieve only what Nokia Content Copier can (contacts, calendar, notes) but it's slightly more painless
    How do I make the phone forget all the badly spelled words the previous owner seems to have entered?
    Delete the .xxx.dictionary files from /home/user/.osso/dictionaries dir. May need to be root for this, see sites for info on adding repositories, installing rootsh etc
    Can the thing that organises the main screen snap the icons to a larger grid or must I mess around nudging with the stylus till they line up? (They tend to jump out of line just as I remove the stylus from the screen)

  • Help with some java work ... :(

    Hi, I was wondering can anyone here give me some help or show me the way with this programming assignment. This is my first week of programming in Java and is really struggling ...
    I already have some very useful help from some people on here but still have no luck.
    Below is what my assignment is about and what I've done so far, sorry if it's very basic but I'm trying my hardest.
    You are required to write a program in Java that can store the details of three books. Their details are
    Author
    Shelf location
    Availability
    The program should give each book a unique shelf location starting from 0001. The details should be entered from the keyboard. The program should, on request, be able to print the details of each book to the screen. The program should terminate on request. The program should first ask for a preset password to be given before continuing executing any operation described above
    public class Library {
    public static void main(String[] args) {
    String[][] books =
         { "Shelf Location", "Author   ", "Book Name     ", "Availability" },
    { "0001          ", "A. Smith ", "Hello World   ", "1           " },
    { "0002          ", "C. Jones ", "Goodbye World ", "0           " },
    { "0003          ", "D. Wan   ", "Whatever      ", "5           " }
    for (int i = 0; i < books.length; i++) {
         System.out.print(books[0] + " ");
    for (int j = 1; j < books[i].length; j++) {
         System.out.print(books[i][j] + " ");
         System.out.println();
    import java.io.*;
    public class Login2
    private static BufferedReader in;
    private static BufferedReader keyboard;
    public static void main(String[] args) throws IOException
    keyboard = new BufferedReader(
    new InputStreamReader(System.in));
    String input;
    boolean done = false;
    while (!done)
    System.out.print("Enter Password in UPPERCASE (QUIT to exit)");
    input = keyboard.readLine();
    if ((input.equals("LOGIN")) || (input.equalsIgnoreCase("QUIT")))
    done =
    true;
    return.Library();
    I was told to use cases, instances, etc ... nothing complicated is needed but it is still to much for me. I saw some examples of people's work and they only have approx 1.5 pages of code.
    Thanx very much for people who reads this thread and offers me help.

    Here's something to play around with (minimal error handling)
    import java.io.*;
    class Library
      private final String password = "java";
      BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
      private String books[][] = new String[3000][];
      int bookTotal = 0;
      public Library() throws IOException
        options();
      private void options() throws IOException
        System.out.print("\nLibrary Options - \n0 - quit\n1 - Enter book details"+
              "\n2 - List book details\n\nPlease enter selection number: ");
        int selection = Integer.parseInt(br.readLine());
        if(selection == 0) goodBye();
        else
          checkPassword();
          if(selection == 1) newBook();
          else listBook();
      private void newBook() throws IOException
        String another="";
        do
          if(bookTotal == books.length)
            System.out.println("Unable to add more books");
            return;
          books[bookTotal] = new String[4];
          System.out.print("\nEnter title details: ");
          books[bookTotal][0] = br.readLine();
          System.out.print("Enter author details: ");
          books[bookTotal][1] = br.readLine();
          System.out.print("Enter shelf location details: ");
          books[bookTotal][2] = br.readLine();
          System.out.print("\n0 - out of stock\n1 - available\n2 - on loan"+
                                           "\nEnter availability details: ");
          books[bookTotal][3] = br.readLine();
          bookTotal++;
          System.out.print("\nEnter another book? (y/n): ");
          another = br.readLine();
        }while(another.toLowerCase().equals("y"));
        options();
      private void listBook() throws IOException
        String another="";
        String titles = "\n";
        String availability[] = {"out of stock","available","on loan"};
        for(int i=0;i<bookTotal;i++) titles += (i+1)+" - "+books[0]+"\n";
    int selection = 0;
    if(bookTotal > 0)
    do
    System.out.print(titles+ "Please enter selection number: ");
    selection = Integer.parseInt(br.readLine()) - 1;
    System.out.println("\nBook title = "+books[selection][0]);
    System.out.println("Book author = "+books[selection][1]);
    System.out.println("Book shelf location = "+books[selection][2]);
    System.out.println("Availability = "+availability[Integer.parseInt(books[selection][3])]);
    System.out.print("\nList another book? (y/n): ");
    another = br.readLine();
    }while(another.toLowerCase().equals("y"));
    else System.out.println("\nno books to list\n");
    options();
    private void goodBye()
    System.out.println("\nThank you for using the Library program.\nGoodbye.\n");
    System.exit(0);
    private void checkPassword() throws IOException
    System.out.print("\nEnter password to continue: ");
    String pwd = br.readLine();
    if(!pwd.equals(password)) goodBye();
    public static void main(String args[]) throws IOException
    new Library();

Maybe you are looking for

  • Payroll Error msg "The gross wages do not cover the negative offset that has been forwarded, therefore, no grossup is permitted".

    Hi Experts, I am getting the below error msg while running payroll for an US employee. "The gross wages do not cover the negative offset that has been forwarded; therefore, no grossup is permitted." I am getting this error msg just after USTAX functi

  • Logged in on more than one terminal-crashes

    Great forum! I have been reading and tried to resolve the issue but to no avail. I am most worried about my system being compromised. Problem: Ichat keeps disconnecting, or conversations freeze with other .mac user. I have read here and opened the 22

  • I am trying to place a file typed in Japanese in to Indesign CS2...

    Hello, I am trying to place a file typed in Japanese in to an Indesign CS2 page.  The original text is a Microsoft Word file. When it is saved as a .pdf, I am not able to do anything with it. I use a MAC running on Tiger 10.4.11. I need it for an ins

  • Want to buy IPOD for G4 using Panther and the older USB port

    I want to buy a used IPOD. I have the 800 megahertz G4 with Panther 10.39 and I guess that older USB port. I hear is isn't USB 2.0. Which Ipod should I buy that will work? I want an ipod but I don't want to buy a brand new computer for a few months!

  • Off set value

    Hi experts,                   we create the query name delivery performance. selection criteria is calyera month and vendor etc. based on the selection we need to get the following result. ex: in the selection screen if u enter the 01.2007 then repor