Cannot swap symbols at all in CS3?

Flash CS3 on Mac OSX 10.4.11
Extremely simple timeline. Simply want to fade one image to another.
Created a keyframe, added a bitmap, converted it to a symbol, set the alpha of 1st frame to 100%, 2nd frame to 0% & tweened.
Image fades to white -perfect.
Create a new keyframe, set the alpha to 100%, try to swap the symbol to another bitmap I'd converted to a symbol.
Doesn't work.
Inspector always says "instance of symbol 1". Cannot use any other symbols except for this one??
Hoping I'm missing something basic, but I've never seen anything like this happen before.

Here's the code that won't appear in a web browser:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>banner test</title>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<p> </p>
<p> </p>
<p align="center">
  <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','wid th','600','height','200','src','bannertest.fla','quality','high','pluginspage','http://www .adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','banner test.fla' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="600" height="200">
    <param name="movie" value="bannertest.fla" />
    <param name="quality" value="high" />
    <embed src="bannertest.fla" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="600" height="200"></embed>
  </object></noscript>
</p>
</body>
</html>

Similar Messages

  • Hi All, I have two questions. First of all my CS3 is saying that it is installed on more than one machine, is there a way of seeing what machines my serial number is registered to? If i want to buy another CS3 serial number how do i go about it? I cannot

    Hi All, I have two questions. First of all my CS3 is saying that it is installed on more than one machine, is there a way of seeing what machines my serial number is registered to? If i want to buy another CS3 serial number how do i go about it? I cannot afford to move to the creative cloud.....

    there's no way for you to identify which machines have or had cs3 activated, and you can no longer purchase a cs3 license from adobe.
    you can request an activation count reset (Contact Customer Care) and deactivate your cs3 on all your computers.  you can then install and activate on up to two computers.

  • Please help with cannot find symbol error. Been struggling all day :(

    Hi all. :)
    Writing a game for my phone with KToolbar and have been getting a cannot find symbol error for every variable and method I try to use across Classes. I've looked all over and though it seems a common problem I always either don't understand or can't get working the various solutions. Example of my errors:
    C:\...\BTK800i.java:197: cannot find symbol
    symbol : variable youSayWhat
    location: class HelloCanvas
              youSayWhat=key;
              ^
    If I try BTK800i.variable or BTK800i.message I get a new error.
    C:\...\src\BTK800i.java:184: non-static method newOrdersSarge() cannot be referenced from a static context
              BTK800i.newOrdersSarge();
              ^
    Both these errors apply to both variables and methods. It only happens when I'm using methods/variables of one class in another, am I using public and private incorrectly? It doesn't seem to make a difference if I make variables public or leave them private, I'm trying to get to them with a public method within a private class. Is it something else? I really have no idea. :(
    Here's my code, it's long enough to be a tiresome read so I've tried to skip what I know isn't relevant.
    public class BTK800i extends MIDlet {
         private Display myDisplay;
         private HelloCanvas myCanvas;
         public int youSayWhat;
            //a whole bunch more skipped here, but I'm fairly certain it's not anything that'll help find a solution
         public BTK800i() {
              paused=false;
    public void startApp() throws MIDletStateChangeException {
              if( paused ) {
                   myCanvas.repaint();
              else {
                   myDisplay=Display.getDisplay(this);
                   myCanvas=new HelloCanvas();
                   myDisplay.setCurrent(myCanvas);
                   myCanvas.setFullScreenMode(true);
                   youSayWhat=0;
                           //again with the skipping, more code not related
    public void newOrdersSarge() {
    //whole bunch of code
    //other methods skipped
    class HelloCanvas extends Canvas {
         public void keyPressed (int key) {
              youSayWhat=key;
              repaint ();
    //skippage
    }The stuff I skipped is mainly either more of the same sorta thing or maths/writing to screen stuff.
    Thanks alot to anyone who helps. I'm really struggling with this. :(
    Dan.

    But I have been reading them :(
    My next-door neighbour unfortunately is an 80-something married man, but I will go have a looksie about static and instances.
    I thought the point of public variables was that other classes could use them, is this wrong?
    Also does this mean that to use the variables from my BTK class in the HelloCanvas class I need to first instantiate BTK? I don't understand how that works as the code starts running from the BTK class in the first place :S I guess more reading will help with this.
    Thanks very much for replying. :)
    Edit:
    OK I have read up on it but I don't think I found anything I hadn't read before. I tried to make a new class which I could instantiate to hold all the variables and methods I wanted everything to be able to access, but that went disastrously. Am I right in understanding that there are no global variables in Java? :s
    Edited by: Dan69 on Apr 17, 2010 1:15 PM

  • Cannot reslove symbol class Date

    I am trying to get a clock to show the time in my program. However, when I try to compile the program a "cannot resolve symbol class Date" error appears. I can't figure out where the problem in my program is. Here is my source code. I would appreciate any help.
    import javax.swing.*;
    import java.io.*;
    import java.lang.*;
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    //import java.util.*;
    import java.math.*;
    public class store
    public static void main(String[] args)
    String dataInput;
         dataInput = JOptionPane.showInputDialog(null, "Input item data: ");
    JOptionPane.showMessageDialog(null, "" + dataInput);
    EasyReader console = new EasyReader();
    int i, j, k, inum, icom, min, nswaps; inum = 0; boolean swap = false;
    double num[] = new double[100]; double dsum, T;
         do
         System.out.println(); System.out.println("Command Menu"); System.out.println();
         System.out.println("1 = Display the data");
    System.out.println("2 = Bubble Sort the numbers");
    System.out.println("3 = Selection Sort the numbers");
    System.out.println("4 = Insertion Sort the numbers");
    System.out.println("5 = Binary Search for a number");
    System.out.println("0 = Exit the program"); System.out.println();
    System.out.print("Enter Command - ");
    icom = console.readInt(); System.out.println();
    switch (icom)
    case 1: // Display the data
                   Display(inum, num);
                   break;
    case 2: // Bubble sort
                   nswaps = 0;
                   for (i = 0; i < (inum-1); i++ )
              for (j = (i+1); j < inum; j++)
                        if (num[i] > num[j])
                                  T = num;
                             num[i] = num[j];
                             num[j] = T;
                             nswaps++;
                   System.out.println("The number of swaps was - " + nswaps);
                   Display(inum, num);
                   break;
    case 3: // Selection sort
                   nswaps = 0;
                   for (i = 0; i < inum - 1; i++) {
              min = i; swap = false;
    for (j = i + 1; j < inum; j++)
         if (num[j] < num[min]) { min = j; swap = true; }
    if (swap) {T = num[min];
              num[min] = num[i];
                        num[i] = T;
                        nswaps++;}
                   System.out.println("The number of swaps was - " + nswaps);
                   Display(inum, num);
                   break;          
    case 4: // Selection sort
                   nswaps = 0;
                   for (i = 1; i < inum; i++)
                   j = i; T = num[i];
                        while ((j > 0) && (T < num[j-1]))
              num[j] = num[j-1]; j--; nswaps++;
                   num[j] = T; nswaps++;
                   System.out.println("The number of swaps was - " + nswaps);
                   Display(inum, num);
                   break;
    case 5: // Binary Search
                   System.out.println("Your numbers will be sorted first");
                   System.out.println();
                   for (i = 1; i < inum; i++)
                   j = i; T = num[i];
                        while ((j > 0) && (T < num[j-1]))
              num[j] = num[j-1]; j--;
                   num[j] = T;
                   System.out.print("Enter the number to locate - ");
                   T = console.readDouble(); nswaps = 0; System.out.println();
                   int left = 0, right = inum, middle; k = -1;
                   while (left <= right)
                        middle = (left + right) / 2;
                        if (T > num[middle]) {left = middle + 1; nswaps++;}
                        else if (T < num[middle]) {right = middle - 1; nswaps++;}
                        else { k = middle; break; }
                   if (k == -1) System.out.println("Your number was not located in the array");
                   else System.out.println("Your number " + T + " is in position " + (k+1));
                   System.out.println();
                   System.out.println(nswaps + " comparisons were needed to search for your number");     
                   Display(inum, num);
                   break;
         } while (icom != 0);
         public static void Display(int inum, double num[])
              {     int k;
                   System.out.println();
                   System.out.println("");
                   System.out.println();
              for (k = 0; k < inum; k++)
              System.out.println((k+1) + " - " + num[k]);
         return;
    class Clock extends Thread
         //A Canvas that will display the current time on the calculator
         Canvas Time;
         //A Date object that will access the current time
         private Date now;
         //A string to hold the current time
         private String currentTime;
         //The constructor for Clock, accepting a Label as an argument
         public Clock(Canvas _Time)
              Time = Time;          //Time is passed by reference, so Time
                                       //now refers to the same Canvas
              start();               //start this thread
         //The overriden run method of this thread
         public void run()
              //while this thread exists
              while (true)
                   try
                        draw_clock();          //calls the draw_clock method
                        sleep(1000);          //puts this thread to sleep for one
                                                 //second
                   //catches an InterruptedException that the sleep() method might throw
                   catch (InterruptedException e) { suspend(); }
                   //catches a NullPointerException and suspends the thread if one occurs
                   catch (NullPointerException e) { suspend(); }
         //A method to draw the current time onto the Time Canvas on the applet
         public void draw_clock()
              try
                   //Obtains the Graphics object from the Canvas Time so that it can
                   //be manipulated directly
                   Graphics g = Time.getGraphics();
                   g.setColor(Color.gray);          //sets the color of the Graphics object
                                                      //to gray for the rectangle background
                   g.fillRect(0,0,165,25);          //fills the Canvas area with a rectangle
                                                      //starting at 0,0 coordinates of the Canvas
                                                      //and extending to the length and width
                   g.setColor(Color.orange);     //sets the color of the Graphics object
                                                      //to orange for the text color
                   get_the_time();                    //calls the get_the_time() method
                   //calls the drawString method of the Graphics object g, which will
                   //draw a string to the screen
                   //Accepts a string and two integers to represent the coordinates
                   g.drawString("Current Time - " + currentTime, 0, 17);          
              //catches a NullPointerException and suspends the thread if one occurs
              catch (NullPointerException e) { suspend(); }
         //A method to obtain the current time, accurate to the second
         public void get_the_time()
              //creates a new Date object for "now" every time this is called
              now = new Date( );
              //integers to hold the hours, minutes and seconds of the current time
              int a = now.getHours();
              int b = now.getMinutes();
              int c = now.getSeconds();
              if (a == 0) a = 12;          //if hours are zero, set them to twelve
              if (a > 12) a = a -12;     //if hours are greater than twelve, make a      
                                            //conversion to civilian time, as opposed to
                                            //24-hour time
              if ( a < 10)               //if hours are less than 10
                   //sets the currentTime string to 0, appends a's value and a
                   //colon
                   currentTime = "0" + a + ":" ;
              else
                   //otherwise set currentTime string to "a", append a colon
                   currentTime = a +":";               
              if (b < 10)                    //if minutes are less than ten
                   //append a zero to string currentTime, then append "b" and a colon
                   currentTime = currentTime + "0" + b + ":" ;
              else
                   //otherwise append "b" and a colon to currentTime string
                   currentTime = currentTime + b + ":" ;
              if (c < 10)                    //if seconds are less than ten
                   //append a zero to string currentTime, then append "c" and a colon
                   currentTime = currentTime + "0" + c ;
              else     
                   //otherwise append "c" to currentTime string
                   currentTime = currentTime + c;
    }          //end of the Clock class

    Wow.
    1) Please in future use the code tags to format code you post so that it doesn't think you have italics in your code and render it largely1 unreadable. Read this
    http://forum.java.sun.com/help.jspa?sec=formatting
    2) You commented out the import of java.util which is the problem you are complaining about.
    3) Are you planning to stick all the code you ever write into the one source file? Why is all this stuff rammed together. Yoinks.

  • Please help. Cannot find symbol Error!

    I have been working on this code for days now. It keeps coming up with errors. The error says cannot find symbol. I will bold the areas that say that. I got it down to 23 from 42 but now I have no idea what the problem is. any help is greatly appreciated!! I only added a couple of them mainly because it is overwhelming. I can add the rest of someone replies. Thank you again. Oh and the Classpath is set right. I am compiling from the desktop where I have the file also. That was the first thing I checked after reading other threads related to this issue. :O)
    import javax.swing.*;
    import java.awt.event.*;
    public class InventoryPart4 extends JFrame
         private JTextArea text;
         private Inventory inv;
         private int view;
         public InventoryPart4() {
              super("Product");
              setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // quit if the window is closed
              view = 0; // current one showing
              Product product;
              inv = new Inventory(4);
              product = new Product(1, "Salad", 3, 4.95); here
              inv.add(product, 0);
    product = new Product(2, "Dressing", 6, 3.00); here          
    inv.add(product, 1);
    product = new Product(3, "Bacon Bits", 2, 1.75);*here*
              inv.add(product, 2);
    product = new Product(4, "Croutons", 1, 1.75); here
              inv.add(product, 3);
              // sort
              inv.sort();
              // output
              for (int i = 0; i < 4; i++) {
                   System.out.println(inv.get(i));
              // total val
              System.out.printf("Total=$%.2f", inv.totalValue());
              //gui
              JPanel panel = new JPanel();
              panel.setLayout(new BoxLayout(panel,BoxLayout.Y_AXIS));
              text = new JTextArea(10,50);
              text.setEditable(false);
              panel.add(text);
              showProduct();
              JButton next = new JButton("Next");
    here          next.addProduct(new Product() {
                   public void actionPerformed(ActionEvent e) {
                        if (view < inv.size()-1) view++;
                        else view = 0;
                        showProduct();
              panel.add(next);
              getContentPane().add(panel);
         // view an item
         public void showProduct() {
              text.setText("Product Details:\n");
              text.append(inv.get(view).toString()+"\n");
              text.append(String.format
                        ("Value of all the Contents: $%.2f", inv.totalValue()));
         public static void main(String args [])
              InventoryPart4 invt = new InventoryPart4();
              invt.pack();
              invt.setVisible(true);
         } //end main
    } // end class InventoryPart1
    class Product {
    private int ProductItem;
    private int ProductStock;
    private double ProductPrice;
    public Product(int item, int stock, double price) {
    ProductItem = item;
    ProductStock = stock;
    ProductPrice = price;
    } //end three-argument constructor
    // set Product Item
    public void setProductItem(int item) {
    ProductItem = item; here
    } //end method set Product Item
    //return Product Item
    public int getsProductItem() {
    return productItem;
    } //end method get product Item
    //set Product Stock
    public void setProductStock(int stock) {
    productStock = stock;
    } //end method set Product Stock
    //return Product Stock
    public int getProductStock() {
    return productStock;
    } //end method get Product Stock
    public void setProductPrice(double price) {
    productPrice = price;
    } //end method setproductPrice
    //return Product Price
    public double getProductPrice() {
    return ProductPrice;
    } //end method get Product Price
    //calculate inventory value
    public double value() {
    return productPrice * productStock;
    }// end method get productPrice and productStock
    @Override
    public String toString() {
    return String.format("item=%3d units=%d price=%.2f value=%.2f",
    productItem, productStock, productPrice, value());
    }//end class Product
    class Inventory {
         private Product[] list;
         // constructor
         public Inventory(int size) {
              list = new Product[size];
         // complete value
         public double totalValue() {
              double val = 0.0;
              for (int i = 0; i < list.length; i++) {
                   val += list.value();
              return val;
         // add an item
         public void add(Product i, int p) {
              list[p] = i;
         // get an item
         public Product get(int i) {
              return list[i];
         // sort by name
         public void sort() {
              // bubble sort
              int n = list.length;
              for (int search = 1; search < n; search++) {
                   for (int i = 0; i < n-search; i++) {
                        if (list[i].getProductItem().compareToIgnoreCase(list[i+1].getProductItem()) > 0) {
                             // swap
                             Product temp = list[i];
                             list[i] = list[i+1];
                             list[i+1] = temp;
         public int size() {
              return list.length;
    //extended class
    class Contents extends Product {
         private String Contents;
         // constructor
         public Contents(int item, String name, int units, double price) {
              super(item,name,units, price);
              this.contents = contents;
         // getter
         public String getContents() {
              return Contents;
         // total value with the 5% fee
         public double value() {
              return super.value()*1.05;
         // just the 5% fee
         public double fee() {
              return super.value()*0.05;
         // setter
         public void setContents(String contents) {
              this.contents = contents;
         public String toString()
              return super.toString() + String.format(" fee=%.2f contents=%-20s",
                        fee(), contents);

    The error says cannot find symbol.It says more than that. It says what symbol it cannot find, and it points to the line of code where the symbol was used.
              product = new Product(1, "Salad", 3, 4.95); *here*So it can't find a class called Product with an accessible constructor Product(int, String, int, double).
    product = new Product(2, "Dressing", 6, 3.00); *here*          
    inv.add(product, 1);
    product = new Product(3, "Bacon Bits", 2, 1.75);*here*
              inv.add(product, 2);
    product = new Product(4, "Croutons", 1, 1.75); *here*
              inv.add(product, 3);Ditto.
              JButton next = new JButton("Next");
    *here*          next.addProduct(new Product() {JButton doesn't have an addProduct() method.
    public Product(int item, int stock, double price) {This constructor doesn't match the constructor you are calling above, and there are no other constructors.
    ProductItem = item; *here*You must have a typo. But don't use inital capitals on field names: use them only on class names.
    return productItem;Here is evidence that you have a typo. Java is case-sensitive. Either the field is caled 'ProductItem' or it is called 'productItem', not both.
              // bubble sortDo you have to do this for the homework? Bubble sort is never used in real code except by people who don't know what they're talking about. Use Collections.sort().
              super(item,name,units, price);You should be getting a compile error here too. Ther is no such constructor for Product.
              return Contents;And here.

  • How to export Fw CS3 Symbol Library to Fl CS3 ?

    Is it possible to export Symbols created in Fireworks CS3 to
    Flash CS3 Professional witout losing their properties?

    Curt
    >Just to be clear CS4 you see some, but not all keywords, or in CS4 you see no keywords?<
    I've made more sense of the problem. It's to do with Olympus Raw files - .orf. I've been shooting in Olympus camera raw since 2004.
    My workflow is: import the raw files into Bridge via a card reader; rename them in Bridge as [filename].ORF, apply keywords, edit them in Adobe Camera Raw, save them as [filename].PSD (or sometimes .TIF or .JPG), move the PSDs to a working folder, edit them in Photoshop, and finally move them to a 'Finals' folder.
    In Bridge CS3, in my old computer, I can see all keywords for ORF files. I can also see all keywords for the working and final PSDs, TIFs and JPGs.
    In Bridge CS4, in my new computer, I cannot see any keywords for ORF files, or for the working and final PSDs, etc.
    I can only see keywords for files which started life as TIFs - photos scanned with my negative scanner or flatbed scanner.
    This is also true in both Bridge CS3 and Bridge CS4 in my new laptop, which is running XP Pro. I could see the keywords in my old laptop, but not in my new one.
    >If you right click on file info in Bridge do you have the keyword listed in keyword box?  Do the same with Windows Explorer and see if keyword is listed in Properties/details.<
    'Keyword' isn't listed in Windows Explorer, though everything else under the sun is.
    The keywords are listed if I right click in Bridge CS3 on a file in my old computer. And if I click on Advanced, and expand the categories, e.g. XMP or Dublin Core Props, I get a heading 'xap:Keywords (bag container)', and a list of all the keywords attached to the file.
    But the same file in CS3 in the laptop, or CS4 in laptop or new computer, has no keywords in Advanced.
    I've had a quick look on the web for topics connected with Olympus camera raw/orf/losing keywords, but so far haven't found anything.
    Mary

  • Getting error message Cannot Resolve Symbol when trying to compile a class

    Hello All -
    I am getting an error message cannot resolve symbol while trying to compile a java class that calls another java class in the same package. The called class compiles fine, but the calling class generates
    the following error message:
    D:\Apache Tomcat 4.0\webapps\examples\WEB-INF\classes\cal>javac
    ConnectionPool.java
    ConnectionPool.java:158: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    private void addConnection(PooledConnection value) {
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    ^
    ConnectionPool.java:144: cannot resolve symbol
    symbol : class PooledConnection
    location: class cal.ConnectionPool
    PooledConnection pcon = new PooledConnection(con);
    The code is listed as follows for PooledConnection.java (it compiles fine)
    package cal;
    import java.sql.*;
    public class PooledConnection {
    // Real JDBC Connection
    private Connection connection = null;
    // boolean flag used to determine if connection is in use
    private boolean inuse = false;
    // Constructor that takes the passed in JDBC Connection
    // and stores it in the connection attribute.
    public PooledConnection(Connection value) {
    if ( value != null ) {
    connection = value;
    // Returns a reference to the JDBC Connection
    public Connection getConnection() {
    // get the JDBC Connection
    return connection;
    // Set the status of the PooledConnection.
    public void setInUse(boolean value) {
    inuse = value;
    // Returns the current status of the PooledConnection.
    public boolean inUse() {
    return inuse;
    // Close the real JDBC Connection
    public void close() {
    try {
    connection.close();
    catch (SQLException sqle) {
    System.err.println(sqle.getMessage());
    Now the code for ConnectionPool.java class that gives the cannot
    resolve symbol error
    package cal;
    import java.sql.*;
    import java.util.*;
    public class ConnectionPool {
    // JDBC Driver Name
    private String driver = null;
    // URL of database
    private String url = null;
    // Initial number of connections.
    private int size = 0;
    // Username
    private String username = new String("");
    // Password
    private String password = new String("");
    // Vector of JDBC Connections
    private Vector pool = null;
    public ConnectionPool() {
    // Set the value of the JDBC Driver
    public void setDriver(String value) {
    if ( value != null ) {
    driver = value;
    // Get the value of the JDBC Driver
    public String getDriver() {
    return driver;
    // Set the URL Pointing to the Datasource
    public void setURL(String value ) {
    if ( value != null ) {
    url = value;
    // Get the URL Pointing to the Datasource
    public String getURL() {
    return url;
    // Set the initial number of connections
    public void setSize(int value) {
    if ( value > 1 ) {
    size = value;
    // Get the initial number of connections
    public int getSize() {
    return size;
    // Set the username
    public void setUsername(String value) {
    if ( value != null ) {
    username = value;
    // Get the username
    public String getUserName() {
    return username;
    // Set the password
    public void setPassword(String value) {
    if ( value != null ) {
    password = value;
    // Get the password
    public String getPassword() {
    return password;
    // Creates and returns a connection
    private Connection createConnection() throws Exception {
    Connection con = null;
    // Create a Connection
    con = DriverManager.getConnection(url,
    username, password);
    return con;
    // Initialize the pool
    public synchronized void initializePool() throws Exception {
    // Check our initial values
    if ( driver == null ) {
    throw new Exception("No Driver Name Specified!");
    if ( url == null ) {
    throw new Exception("No URL Specified!");
    if ( size < 1 ) {
    throw new Exception("Pool size is less than 1!");
    // Create the Connections
    try {
    // Load the Driver class file
    Class.forName(driver);
    // Create Connections based on the size member
    for ( int x = 0; x < size; x++ ) {
    Connection con = createConnection();
    if ( con != null ) {
    // Create a PooledConnection to encapsulate the
    // real JDBC Connection
    PooledConnection pcon = new PooledConnection(con);
    // Add the Connection to the pool.
    addConnection(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // Adds the PooledConnection to the pool
    private void addConnection(PooledConnection value) {
    // If the pool is null, create a new vector
    // with the initial size of "size"
    if ( pool == null ) {
    pool = new Vector(size);
    // Add the PooledConnection Object to the vector
    pool.addElement(value);
    public synchronized void releaseConnection(Connection con) {
    // find the PooledConnection Object
    for ( int x = 0; x < pool.size(); x++ ) {
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // Check for correct Connection
    if ( pcon.getConnection() == con ) {
    System.err.println("Releasing Connection " + x);
    // Set its inuse attribute to false, which
    // releases it for use
    pcon.setInUse(false);
    break;
    // Find an available connection
    public synchronized Connection getConnection()
    throws Exception {
    PooledConnection pcon = null;
    // find a connection not in use
    for ( int x = 0; x < pool.size(); x++ ) {
    pcon = (PooledConnection)pool.elementAt(x);
    // Check to see if the Connection is in use
    if ( pcon.inUse() == false ) {
    // Mark it as in use
    pcon.setInUse(true);
    // return the JDBC Connection stored in the
    // PooledConnection object
    return pcon.getConnection();
    // Could not find a free connection,
    // create and add a new one
    try {
    // Create a new JDBC Connection
    Connection con = createConnection();
    // Create a new PooledConnection, passing it the JDBC
    // Connection
    pcon = new PooledConnection(con);
    // Mark the connection as in use
    pcon.setInUse(true);
    // Add the new PooledConnection object to the pool
    pool.addElement(pcon);
    catch (Exception e) {
    System.err.println(e.getMessage());
    throw new Exception(e.getMessage());
    // return the new Connection
    return pcon.getConnection();
    // When shutting down the pool, you need to first empty it.
    public synchronized void emptyPool() {
    // Iterate over the entire pool closing the
    // JDBC Connections.
    for ( int x = 0; x < pool.size(); x++ ) {
    System.err.println("Closing JDBC Connection " + x);
    PooledConnection pcon =
    (PooledConnection)pool.elementAt(x);
    // If the PooledConnection is not in use, close it
    if ( pcon.inUse() == false ) {
    pcon.close();
    else {
    // If it is still in use, sleep for 30 seconds and
    // force close.
    try {
    java.lang.Thread.sleep(30000);
    pcon.close();
    catch (InterruptedException ie) {
    System.err.println(ie.getMessage());
    I am using Sun JDK Version 1.3.0_02" and Apache/Tomcat 4.0. Both the calling and the called class are in the same directory.
    Any help would be greatly appreciated.
    tnx..
    addi

    Is ConnectionPool in this "cal" package as well as PooledConnection? From the directory you are compiling from it appears that it is. If it is, then you are compiling it incorrectly. To compile ConnectionPool (and PooledConnection similarly), you must change the current directory to the one that contains cal and type
    javac cal/ConnectionPool.

  • How do i transfer a symbol library from .ai cs3 to cs6

    how do i transfer a symbol library from .ai cs3 to cs6

    You could just copy the ai file to the new folder. All custom symbol libraries are just ai files.
    But since CS3 9-slice guides were introduced, so you might want to check your symbols first (if the guides might be applied or if they are correctly not applied - whatever is appropriate)

  • Issue with - "cannot find symbol - variable JOptionPane"

    need some help, got the below loop and want it to be able to loop by the number input by the input dialog. when i compile it i get an error in BlueJ. the error is "cannot find symbol - variable JOptionPane". Any help. have tried a few things however cannot get this to work at all. any suggestions?
    public void numberLoop()
    String qA = JOptionPane.showInputDialog(null,"How many times should this be completed (e.g. 1,2,3,4)?","Question",JOptionPane.QUESTION_MESSAGE);
    int qA2 = Integer.parseInt(qA);
    for (int startNum = 1; startNum <= qA2; startNum++)
    System.out.println(startNum + " squared is " + (startNum * startNum));
    }

    never mind i fixed it. forgot the below.
    import javax.swing.JOptionPane;
    LOL

  • Class error - cannot resolve symbol "MyDocumentListener"

    Hello,
    this is a groaner I'm sure, but I don't see the problem.
    Newbie-itis probably ...
    I'm not concerned with what the class does, but it would be nice for the silly thing to compile!
    What the heck am I missing for "MyDocumentListener" ?
    C:\divelog>javac -classpath C:\ CenterPanel.java
    CenterPanel.java:53: cannot resolve symbol
    symbol : class MyDocumentListener
    location: class divelog.CenterPanel
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    ^
    CenterPanel.java:53: cannot resolve symbol
    symbol : class MyDocumentListener
    location: class divelog.CenterPanel
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    ^
    2 errors
    package divelog;
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.lang.*;
    import javax.swing.*;
    import javax.swing.event.*;
    import javax.swing.filechooser.*;
    import javax.swing.text.*;
    public class CenterPanel extends JPanel implements ActionListener
    { // Opens class
    static private final String newline = "\n";
    private JTextArea comments;
    private JScrollPane scrollpane;
    private JButton saveButton, openButton;
    private JLabel whiteshark;
    private Box box;
    private BufferedReader br ;
    private String str;
    private JTextArea instruct;
    private File defaultDirectory = new File("C://divelog");
    private File fileDirectory = null;
    private File currentFile= null;
    public CenterPanel()
    { // open constructor CenterPanel
    setBackground(Color.white);
    comments = new JTextArea("Enter comments, such as " +
    "location, water conditions, sea life you observed," +
    " and problems you may have encountered.", 15, 10);
    comments.setLineWrap(true);
    comments.setWrapStyleWord(true);
    comments.setEditable(true);
    comments.setFont(new Font("Times-Roman", Font.PLAIN, 14));
    // add a document listener for changes to the text,
    // query before opening a new file to decide if we need to save changes.
    MyDocumentListener myDocumentListener = new MyDocumentListener(); // define the listener class
    comments.getDocument().addDocumentListener(myDocumentListener); // create the reference for the class
    // ------ Document listener class -----------
    class MyDocumentListener implements DocumentListener {
    public void insertUpdate(DocumentEvent e) {
    Calculate(e);
    public void removeUpdate(DocumentEvent e) {
    Calculate(e);
    public void changedUpdate(DocumentEvent e) {
    private void Calculate(DocumentEvent e) {
    // do something here
    scrollpane = new JScrollPane(comments);
    scrollpane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    saveButton = new JButton("Save Comments", new ImageIcon("images/Save16.gif"));
    saveButton.addActionListener( this );
    saveButton.setToolTipText("Click this button to save the current file.");
    openButton = new JButton("Open File...", new ImageIcon("images/Open16.gif"));
    openButton.addActionListener( this );
    openButton.setToolTipText("Click this button to open a file.");
    whiteshark = new JLabel("", new ImageIcon("images/gwhite.gif"), JLabel.CENTER);
    Box boxH;
    boxH = Box.createHorizontalBox();
    boxH.add(openButton);
    boxH.add(Box.createHorizontalStrut(15));
    boxH.add(saveButton);
    box = Box.createVerticalBox();
    box.add(scrollpane);
    box.add(Box.createVerticalStrut(10));
    box.add(boxH);
    box.add(Box.createVerticalStrut(15));
    box.add(whiteshark);
    add(box);
    } // closes constructor CenterPanel
    public void actionPerformed( ActionEvent evt )
    { // open method actionPerformed
    JFileChooser jfc = new JFileChooser();
    // these do not work !!
    // -- set the file types to view --
    // ExtensionFileFilter filter = new ExtensionFileFilter();
    // FileFilter filter = new FileFilter();
    //filter.addExtension("java");
    //filter.addExtension("txt");
    //filter.setDescription("Text & Java Files");
    //jfc.setFileFilter(filter);
         //Add a custom file filter and disable the default "Accept All" file filter.
    jfc.addChoosableFileFilter(new JTFilter());
    jfc.setAcceptAllFileFilterUsed(false);
    // -- open the default directory --
    // public void setCurrentDirectory(File dir)
    // jfc.setCurrentDirectory(new File("C://divelog"));
    jfc.setCurrentDirectory(defaultDirectory);
    jfc.setSize(400, 300);
    jfc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    Container parent = saveButton.getParent();
    //========================= Test Button Actions ================================
    //========================= Open Button ================================
    if (evt.getSource() == openButton)
    int choice = jfc.showOpenDialog(CenterPanel.this);
    File file = jfc.getSelectedFile();
    /* a: */
    if (file != null && choice == JFileChooser.APPROVE_OPTION)
    String filename = jfc.getSelectedFile().getAbsolutePath();
    // -- compare the currentFile to the file chosen, alert of loosing any changes to currentFile --
    // If (currentFile != filename)
    // -- get the current directory name -------
    // public File getCurrentDirectory( );
    File f=new File(System.getProperty("user.dir"));
    fileDirectory = jfc.getCurrentDirectory();
    // -- remember the last directory used --
    if (defaultDirectory != fileDirectory)
    {defaultDirectory = fileDirectory;}
    try
    { //opens try         
    comments.getLineCount( );
    // -- clear the old data before importing the new file --
    comments.selectAll();
    comments.replaceSelection("");
    // -- get the new data ---
    br = new BufferedReader (new FileReader(file));
    while ((str = br.readLine()) != null)
    {//opens while
    comments.append(str);
    } //closes while
    } // close try
    catch (IOException ioe)
    { // open catch
    comments.append(newline +"Open command not successful:" + ioe + newline);
    } // close catch
    // ---- display the values of the directory variables -----------------------
    comments.append(
    newline + "The f directory variable contains: " + f +
    newline + "The fileDirectory variable contains: " + fileDirectory +
    newline + "The defaultDirectory variable contains: " + defaultDirectory );
    else
    comments.append("Open command cancelled by user." + newline);
    } //close if statement /* a: */
    //========================= Save Button ================================
    } else if (evt.getSource() == saveButton)
    int choice = jfc.showSaveDialog(CenterPanel.this);
    if (choice == JFileChooser.APPROVE_OPTION)
    File fileName = jfc.getSelectedFile();
    // -- get the current directory name -------
    // public File getCurrentDirectory( );
    File f=new File(System.getProperty("user.dir"));
    fileDirectory = jfc.getCurrentDirectory();
    // -- remember the last directory used --
    if (defaultDirectory != fileDirectory)
    {defaultDirectory = fileDirectory;}
    //check for existing files. Warn users & ask if they want to overwrite
    for(int i = 0; i < fileName.length(); i ++) {
    File tmp = null;
    tmp = (fileName);
    if (tmp.exists()) // display pop-up alert
    //public static int showConfirmDialog( Component parentComponent,
    // Object message,
    // String title,
    // int optionType,
    // int messageType,
    // Icon icon);
    int confirm = JOptionPane.showConfirmDialog(null,
    fileName + " already exists on " + fileDirectory
    + "\n \nContinue?", // msg
    "Warning! Overwrite File!", // title
    JOptionPane.OK_CANCEL_OPTION, // buttons displayed
                        // JOptionPane.ERROR_MESSAGE
                        // JOptionPane.INFORMATION_MESSAGE
                        // JOptionPane.PLAIN_MESSAGE
                        // JOptionPane.QUESTION_MESSAGE
    JOptionPane.WARNING_MESSAGE,
    null);
    if (confirm != JOptionPane.YES_OPTION)
    { //user cancels the file overwrite.
    try {
    jfc.cancelSelection();
    break;
    catch(Exception e) {}
    // ----- Save the file if everything is OK ----------------------------
    try
    { // opens try
    BufferedWriter bw = new BufferedWriter(new FileWriter(fileName));
    bw.write(comments.getText());
    bw.flush();
    bw.close();
    comments.append( newline + newline + "Saving: " + fileName.getName() + "." + newline);
    break;
    } // closes try
    catch (IOException ioe)
    { // open catch
    comments.append(newline +"Save command unsuccessful:" + ioe + newline);
    } // close catch
    } // if exists
    } //close for loop
    else
    comments.append("Save command cancelled by user." + newline);
    } // end-if save button
    } // close method actionPerformed
    } //close constructor CenterPanel
    } // Closes class CenterPanel

    There is no way to be able to see MyDocumentListener class in the way you wrote. The reason is because MyDocumentListener class inside the constructor itself. MyDocumentListener class is an inner class, not suppose to be inside a constructor or a method. What you need to do is simple thing, just move it from inside the constructor and place it between two methods.
    that's all folks
    Qusay

  • Cannot find symbol class

    I am having a "Cannot find symbol" problem. My Java is a bit rusty so I'm not exactly sure what it could be. I have two classes, City and SisterCities. The SisterCities references the City class. The City class compiles fine. Both classes are part of the same package. However, when I compile SisterCities, I get the error. Could you please tell me how to get the second class to recognize the first (import, extends, not really sure. I've tried alot) Here are those two classes so far...
    ****** City ********
    package hw01;
    public class City
         public final String name;
         public final String country;
         public final City [] sisters;
    public City (String name, String country)
              // throw new RuntimeException ("Not implemented yet.");
              this.name = name;
              this.country = country;
              this.sisters = new City [0];
    public City (String name, String country, City [] sisters)
              // throw new RuntimeException ("Not implemented yet.");
              this.name = name;
              this.country = country;
              this.sisters = new City [sisters.length];
              for (int i = 0; i < sisters.length; i++) {
                   this.sisters[i] = sisters;
    public void setSisters (City [] sisters)
              // throw new RuntimeException ("Not implemented yet.");
              for (int i = 0; i < sisters.length; i++) {
                   this.sisters[i] = sisters[i];
    public String getName ()
              // throw new RuntimeException ("Not implemented yet.");
              return this.name;
    public String getCountry ()
              // throw new RuntimeException ("Not implemented yet.");
              return this.country;
    public City [] getSisters ()
              // throw new RuntimeException ("Not implemented yet.");
              return this.sisters;
    ******** SisterCities *********
    package hw01;
    import java.util.LinkedList;
    public class SisterCities
         public final LinkedList cityList;
    public SisterCities ()
              // throw new RuntimeException ("Not implemented yet.");
    public void addCity (City city)
              // throw new RuntimeException ("Not implemented yet.");
              this.cityList.add(city);
    public int getNumCities ()
              // throw new RuntimeException ("Not implemented yet.");
    public City getCity (int i)
              // throw new RuntimeException ("Not implemented yet.");

    final attribute members like "cityList" must be initialised when they're declared or inside the constructors
    if you want to compile, you'll also have to uncomment the "throws" in your methods (or return a value)
    (pay attention to the error messages the compiler gives you and paste them all when posting questions)

  • Cannot find symbol class Scanner

    hi all
    i'm defining a class within a project so i can use the class inside my program, but the line:
    Scanner keyboard = new Scanner(System.in);generates an error with my compiler:
    cannot find symbol class Scanner
    please help

    you aren't using jdk 5 or higher then. that's when scanner was added to the jdk.
    download a modern jdk and you'll be fine.
    %

  • Java Error : cannot find symbol , symbol : class (jdk 1.6.0)

    Dear All,
    Please help me.
    I am running javac from a .bat file and i set the classpath in the bat file as follows.
    echo on
    :start
    set classpath = "C:\Program Files\Java\jdk1.6.0\bin;"
    set classpath = "C:\Program Files\Java\jdk1.6.0\jre\..\lib\tools.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\rt.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\i18n.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\sunrsasign.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\jsse.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\jce.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.6.0\jre\classes;C:\Program Files\Java\jdk1.6.0\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\ext\ldapsec.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\ext\mysql-connector-java-5.0.0-beta-bin.jar;C:\Program Files\Java\jdk1.6.0\jre\lib\ext\sunjce_provider.jar; C:\Program Files\Java\jdk1.6.0\ideset\system;C:\Program Files\Java\jdk1.6.0\ideset\system;C:\Program Files\Java\jdk1.6.0\studio\system;C:\Program Files\Java\jdk1.6.0\studio\modules\ext\j2ee-1.3.jar;C:\Program Files\Java\jdk1.6.0\studio\modules\ext\jaas-1.0.jar;C:\Program Files\Java\jdk1.6.0\studio\modules\autoload\activation.jar;C:\Program Files\Java\jdk1.6.0\studio\modules\ext\jms-1.0.2b.jar;C:\Program Files\Java\jdk1.6.0\studio\modules\ext\jta-spec1_0_1.jar;C:\Program Files\Java\jdk1.6.0\studio\modules\autoload\mail.jar;C:\Program Files\Java\jdk1.6.0\studio\modules\ext\AbsoluteLayout.jar;C:\Program Files\Java\jdk1.6.0\studio\modules\ext\sql.jar;C:\Program Files\Java\jdk1.6.0\studio\modules\ext\rowset.jar;C:\Program Files\Java\jdk1.6.0\studio\lib\ext\jdbc20x.zip;C:\Program Files\Java\jdk1.6.0\studio\modules\ext\servlet-2.3.jar;C:\Program Files\Java\jdk1.6.0\studio\beans\TimerBean.jar;c:\Program Files\Java\jdk1.6.0\ideset\tomcat401_base;C:\sms\com\;"
    cd C:\sms
    javac mainP.java
    pause
    i have few class files which are inherited to the main program using ' import com.Connection; '
    i am getting errors like
    mainP.java:482: cannot find symbol
    symbol : class Connection
    location: class mainP
    Connection connection = new Connection(ipAddress, port);
    I think it is because of some classpath error.
    please advice me.......
    Viju

    Actually, you have NO CLUE what he's trying to doActually he said what he is trying to do in his posting. It's no mystery. But that's all the information that's available. If you know something that isn't posted here why not say so?
    Your reply was a snide, rude, "You're stupid for doing it that way" answerMy reply was neither snide nor rude and implied none of what you impute to it. It was a proper and constructive suggestion. You are entitled to disagree with it, but that doesn't justify this immoderate outburst.
    Bottom line is, you chose to be nastyBottom line is you're just making this up. You are imputing motives to me without evidence. Don't do that.
    You are the type of person that makes searching forums and posting questions for assistance a near waste of time.I doubt that you'll find many regulars here that would agree with that assertion. When you have made over 16,000 posts here over ten years as I have, come back and we'll discuss it some more.
    Go back to grade school and ...I suggest you try it yourself. You're not adding anything except noise to the discussion. Try curbing your temper, and while you're at it have a good look at the Code of Conduct for these forums. You're verging on personal abuse here.
    And, additionally, I've used ANT in the past. Batch files are FAR AND AWAY easier to set up.In your opinion. I disagree entirely, and I have eleven years' experience with Java to back it up.
    As for CLASSPATH, I haven't done anything about setting it beyond installing the JDK since about 1999, and it has a dot in it as we speak.

  • "cannot find symbol" error - password checker class

    I had to make a program to check a password to make sure it had two letters, at least eight characters, and only numbers and letters. I'm pretty sure I have all of the checking correct but I can't make use of the method I made to do it. here is my code:
              if(password.LegalPassword())     
                   System.out.println("You enterend a valid password!");
              else
                   System.out.println("You have entered an invalid password!");
    class LegitPassword
                   //constructor
         public LegitPassword(String userPassword)
         public boolean LegalPassword (String userPassword)
                   int digitCounter = 0;
                   for(int i = 0; i < userPassword.length(); i++)
                             //is character a letter or number?
                        if(!(Character.isDigit(userPassword.charAt(i))) || !(Character.isLetter(userPassword.charAt(i))))
                             return false;
                             //is the password at least 8 characters?
                        if(userPassword.length() <= 8)
                             return false;
                             //count the digits
                        if(Character.isDigit(userPassword.charAt(i)))
                             digitCounter ++;
                   if(digitCounter <= 2)
                             return false;
         return true;
              }oh, and the exact error is:
    PasswordChecker.java:27: cannot find symbol
    symbol  : method LegalPassword()
    location: class java.lang.String
              if(password.LegalPassword())     
                         ^

    Here is the full code so that you can see how I declared password...
         public class PasswordChecker
              static Scanner console = new Scanner(System.in);
              public static void main(String[] args)
              String password;
              System.out.println("Please enter a new password.");
              System.out.println("Remember: Passwords must be at least eight characters"
                   + " consisting of only numbers and letters with at minimal two numbers.");
              System.out.print("Password: ");
                   password = console.nextLine();
              //LegitPassword thePassword = new LegitPassword(password);
              if(password.LegalPassword())     
                   System.out.println("You enterend a valid password!");
              else
                   System.out.println("You have entered an invalid password!");
    class LegitPassword
         public boolean LegalPassword (String userPassword)
                   int digitCounter = 0;
                   for(int i = 0; i < userPassword.length(); i++)
                             //is character a letter or number?
                        if(!(Character.isDigit(userPassword.charAt(i))) || !(Character.isLetter(userPassword.charAt(i))))
                             return false;
                             //is the password at least 8 characters?
                        if(userPassword.length() <= 8)
                             return false;
                             //count the digits
                        if(Character.isDigit(userPassword.charAt(i)))
                             digitCounter ++;
                   if(digitCounter <= 2)
                             return false;
         return true;
    }The error:
    PasswordChecker.java:27: cannot find symbol
    symbol  : method LegalPassword()
    location: class java.lang.String
              if(password.LegalPassword())Are you suggesting I change the method, LegalPassword, to accept no parameters?

  • Cannot resolve symbol : class odbc ERROR

    Hi Helper
    I am trying to compile a the following and I am getting the error
    C:\jdk\websiter>javac MainServlet.java
    MainServlet.java:86: cannot resolve symbol
    symbol : class odbc
    location: package jdbc
    Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.sql.*;
    import java.io.*;
    import java.util.*;
    * This is the servlet to send the user the names of all the sites present in the database
    public class MainServlet extends HttpServlet implements ServletConstants
    Connection m_con;
    PreparedStatement m_pstmt;
    ResultSet m_res;
    Vector m_vecsiteName;
    public void Init(ServletConfig config) throws ServletException {
         super.init(config);
    }// end of init()
    public void service(HttpServletRequest req, HttpServletResponse resp)
    throws ServletException, IOException {
              m_vecsiteName = new Vector();
         try {
         Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
    m_con = DriverManager.getConnection("jdbc:odbc:sitewd", "", "");
    How can i fix it? thanks
    VT

    Replace the Statement
    Class.forName(sun.jdbc.odbc.JdbcOdbcDriver);
    as
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Maybe you are looking for