Error importing classes

I was in the process of altering the environment variables so that i could successfully use some classes under JDOM, but i actually managed to accidently delete a value in the path variable but forgot what it was and because of this my Visual studio and Java development environments were affected.
I was not able to compile any java program, but i have set the path for it and it now compiles.
Here comes the catch:
I have a java class that uses another class in the same directory, and as we know we are not required to import the class. But when i compile it says symbol not found when i create an instance.
It worked before i fiddled with the paths, is there any way i can sort this out?

I was in the process of altering the environment
variables so that i could successfully use some
classes under JDOM, but i actually managed to
accidently delete a value in the path variable but
forgot what it was and because of this my Visual
studio and Java development environments were
affected.Strange. Because IDEs usually don't give a damn about environment variables.
I was not able to compile any java program, but i
have set the path for it and it now compiles.
Here comes the catch:
I have a java class that uses another class in the
same directory, and as we know we are not required to
import the class. But when i compile it says symbol
not found when i create an instance.How do you compile?
It worked before i fiddled with the paths, is there
any way i can sort this out?Not before you tell us what you did.

Similar Messages

  • Javadoc error ( import class )

    I'm getting this error when I try to generate documentation.
    I guess javadoc doesn't like the import statement, has anyone
    seen this before? Any solutions?
    GridWithListeners.java:47:
    '.' expected import Ml30Key;
    ^

    Hi,
    This does not look like a valid import statement. What is Ml30Key? If it is a package, the import statement should be something like:
    import Ml30Key.*;
    If it is a class, you have to import it using the fully qualified name. For example:
    import foo.package.Ml30Key;
    If it is a class in the default package, there is no need to import it.
    -Jamie

  • Java error importing class on forms

    Hi friends:
    I build a java program to save blob files into oracle database table.
    The program compile and execute fine in JDeveloper 10g.
    I get the class file and put in temporal directory and now I am trying to import these class file with Forms Builder 10g.
    How can I do that?
    thank you.
    Abdel Miranda
    Panama

    use the Java Importer of Oracle Forms Builder.
    PROGRAM - IMPORT JAVA CLASSES
    be sure, that the CLASSPATH is correct, so that forms can find your classes

  • Java error importing class on report

    Hi friends:
    I build a java program to save blob files into oracle database table.
    The program compile and execute fine in JDeveloper 10g.
    I get the class file and put in temporal directory and now I am trying to import these class file with Reports Builder 10g.
    How can I do that?
    thank you.
    Abdel Miranda
    Panama

    use the Java Importer of Oracle Forms Builder.
    PROGRAM - IMPORT JAVA CLASSES
    be sure, that the CLASSPATH is correct, so that forms can find your classes

  • Compilation Error for import classes not found in generated Proxy Class

    Hi,
    We are generating java classes for the COM dll using JCOM com2java compiler.
    We are getting a compilation error for import class not found when compiling the
    generated Proxy java source code. It can't find the com.bea.jcom.Dispatch class that
    the generated Proxy java source code extends. It also can't find com.bea.jcom.Variant
    or com.bea.jcom.Param. These are interfaces or data types or classes used by COM
    library.
    I added weblogic.jar to my class path and the only Dispatch class i found inside
    the weblogic.jar is com.linar.jintegra.Dispatch;
    We have com objects for which we want to develop an EJB client to interface with
    the COM object using JCOM with Native Mode disabled.
    Any help on the compilation error..I tried changing the extends for Dispatch to com.linar.jintegra.Dispatch
    but the other errors are still there.
    To begin with, I think the generated code should not refer to any of the COM data
    types.
    Any help please.
    Thank you in advance,
    Regards,
    Rahul Srivastava
    [email protected]

    Hi,
    I resolved the other errors by changing all references from com.bea.jcom.Variant
    etc to com.linar.jintegra.class name..all were present under the com.linar.jintegra
    package.
    Thank you all anyways,
    Regards,
    rahul
    "Rahul Srivastava" <[email protected]> wrote:
    >
    Hi,
    We are generating java classes for the COM dll using JCOM com2java compiler.
    We are getting a compilation error for import class not found when compiling
    the
    generated Proxy java source code. It can't find the com.bea.jcom.Dispatch
    class that
    the generated Proxy java source code extends. It also can't find com.bea.jcom.Variant
    or com.bea.jcom.Param. These are interfaces or data types or classes used
    by COM
    library.
    I added weblogic.jar to my class path and the only Dispatch class i found
    inside
    the weblogic.jar is com.linar.jintegra.Dispatch;
    We have com objects for which we want to develop an EJB client to interface
    with
    the COM object using JCOM with Native Mode disabled.
    Any help on the compilation error..I tried changing the extends for Dispatch
    to com.linar.jintegra.Dispatch
    but the other errors are still there.
    To begin with, I think the generated code should not refer to any of the
    COM data
    types.
    Any help please.
    Thank you in advance,
    Regards,
    Rahul Srivastava
    [email protected]

  • Error when I import classes using directive JSP page

    Hi all!
    I have installed JDeveloper 11g (11.1.1.3.0)
    My applications are located in the C:\dir (JDEV_USER_DIR = C:\dir)
    I Created application "Appliation1". In it i created 2 projects (Project1, in it beans session entity and other java classes; Project2, in it JSP).
    I want import classes from Project1 to Project2 using next directive:
    <%@ page contentType="text/html;charset=windows-1252"
    import="project1.*"%>
    so in Project properties of Project2 set the way to classes in Project1.
    When i run JSP an error occurred:
    Error(4,9): The import project1 cannot be resolved
    Maybe i'm not set correctly the way to the classes
    Thanks in advance.

    angelr, thanks, it helped me)
    In jdeveloper 10g i set address in Project Properties->Libraries and Classpath->Add JAR/Directory;
    and set the way to my classes;
    and it worked.
    in the 11 version seems different

  • Import JavaBean Error : Invalid Class

    previously , i have 3 commandbean class , after that i add another 2 commandbean class,
    i hit the following error,
    Invalid Class -JavaBean not available for import class
    :net/solutions/model/ExternalToGateway
    Jar: c:\documents and settings\yzme\sap\workspace\SmsGatewaywebdynpro\lib\SmsGatewayCommandBean.jar
    Message was edited by:
            yzme yzme
    Message was edited by:
            yzme yzme

    Hi yzme yzme,
    These problems occur when you are not following the specification for the java Beans that the netweaver platform expects:
    Please check the following for eradicating the error:
    1. Is there a setter which doe'snt have a consequent getter for the variable.If so provide it because its considered mandatory from the bean Specs.
    2.If you have used your own methods for fetching and setting the value rather then using the getter setter for the same this will give a generational error on import.
    Above listed mistakes are made by developers ona regular basis. Please go through the java bean specs on sun.java.com for more details
    Regards
    Amit
    Allocate points if found Helpful.

  • Not allowed to import classes without package names?

    Hi,
    I have a few questions on Packages and importing?
    1. Is the following true that it is illegal to import classes in the same package as the current class, will this cause a comilation error? If this is the case where in the Java Language specification is this actually written as I could not find it?
    2. This has probably been answered by question 1 but if I have 2 classes in the same package and if I import 1 of the classes into the other class, is it illegal to import it by just using the class name and not the package name as well, ie
    if the package name is ie.tcd
    and the 2 class names are exp1.class and exp2.class, can I do this in class 2
    package ie.tcd;
    import exp1;
    public class exp2 {
    3. Is it illegal to import classes that are not explicitly part of any package or must a class be part of a package to be imported. I read somewhere that while this was always illegal it is only after jdk 1.4.2 that this is being enforced? If this is the case where in the Java Language specification is this actually written as I could not find it either?
    Thanks very much for any help,
    John

    Was just also wondering, 1 other thing, I am looking
    at someone elses code they have 2 classes (Class A
    and Class B) in the same package (pkg). The person
    imports class A into B:
    package pkg;
    import A;
    public class B {
    Is this legal code (or was it ever)?Not if A is really in pkg.A. If there is an A in the unnamed package it was legal, or at least it was understood by the compiler, and now it isn't (to both).
    Can you import or is there a point in importing a class in the same
    package?Only by naming the package in the import statement. If the current and the import statement are in the same package the import is redundant.
    If there is a point would you import just be
    using the class name (this would be illegal after jdk
    1.4) or should you use the whole package name even
    though it is in the package anyways?As I understand it you must always use the whole package name in imports.

  • Problem importing classes and beans

    Hey there. Im having one major fustrating problem! When I code supporting classes and beans for my JSPs I get a code 500 internal server error when trying to import (via <%@ page import="class" %> and <jsp:useBean/>) Im storing my classes and beans in the WEB-INF folder and the calling JSPs are located in /ROOT/tests/8/jsp.jsp. Im using the following to import a class or bean:
    <%@ import="aClass" %>
    Seen as tho its in the WEB-INF folder I won't have to explicitly refer to where the class is located, just the class name.
    I never had this problem when I was using my hosting service. Its only on my localhost server in which I get the Internal Server error.
    Help appreciated, thx.
    PS: Im quite new to JSP/Java Servlet.

    import (via <%@ page import="class" %> and
    <jsp:useBean/>) Im storing my classes and beans in the
    WEB-INF folder try put your class file in WEB-INF/classes.
    or first put bean in the package, like WEB-INF/classes/packagename/beanclass
    in jsp page:
    <jsp:useBean id="Mybean" class="packagename.beanclass" scope="request" />
    Question: is /ROOT a context entry in your server.xml?
    Which JSP Container (version) you use? Maybe your localhost server's set up is different with your hosting.

  • Cannot import classes

    I have one class calling another, like this:
    import CloseWindowListener;
    import DatabaseSearchControls;
    import java.awt.event.*;
    public class DatabaseSearch {
         public static void main (String[] args) {
              DatabaseSearchControls frame = new DatabaseSearchControls();
              frame.addWindowListener ( new CloseWindowListener() );
              frame.show();
    I get these errors when I compile DatabaseSearch:
    C:\Documents and Settings\Korbel\My Documents\benmay\DatabaseSearch.java:9: '.' expected
    import CloseWindowListener;
    ^
    C:\Documents and Settings\Korbel\My Documents\benmay\DatabaseSearch.java:10: '.' expected
    import DatabaseSearchControls;
    The other 2 files complied correctly and are in the same directory. Anyone ever seen this and know what I am doing wrong?
    Thank you!

    Are you compiling with version 1.4? If so, it is now invalid to import classes that don't belong to a package. It is not necessary to do so anyway, so just remove the import statements. Better yet, follow the Java standard and put each class you write into a named package, using the package statement.

  • Importing classes... HELP!!!

    I'm using JBuilder Enterprise Edition...
    I open a .java file to edit and recompile to test my edit...
    However I keep getting errors that classes imported in the ,java file do not exist...
    I know they do, because I copied them locally to the folder where all the filess I need are located...
    The .java files that compile into .class files are read-only (there are over 100 of them)
    I've pulled them from a server to my local machine...
    Even if I check them out in Visual Source Safe, I still get errors that the imported classes in the source code do not exist...
    how do I fix this issue?

    Looks like I had a copy of JBuilder installed after all. So I selected Project-> Project Properties select the Paths tab then the Required Libraries tab (lower tab), hit the add button, then hit the new button. Fill in the library name and select project to hold the library. Then search your disk for the jar or the directory that contains your classes. Then hit OK a few times.

  • Importing classes in Jsdk 1.4.2

    Hi,
    I have two swing applications that run perfectly well when compiled and run. But then I am trying to include these two programs as two tabbed panes in a third program.
    I try to import classes from the other two programs using a simple import statement. But when I compile it the compiler return an error statement.
    I tried putting a package line in both the programs and tried importing it as a package in the third one and it says invalid package name.
    Can anybody help.
    Thanks in advance.

    OK here is the code. This is a example code from the book Java2 from scratch
    First file
    PortfoilioTotalsPanel.java
    // Import the packages used by this class
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    // PortfolioTotalsPanel Class
    public class PortfolioTotalsPanel extends JPanel
    // Define the dark green color
    public final static Color darkGreen = new Color( 0, 150, 40 );
    // Create our labels
    JLabel lblDollarChange = new JLabel( "Dollar Change:", JLabel.CENTER );
    JLabel lblPercentChange = new JLabel( "Percent Change:", JLabel.CENTER );
    // Constructor
    public PortfolioTotalsPanel()
    // Set the layout manager
    setLayout( new GridLayout( 2, 1 ) );
    // Add the labels to the JPanel
    add( lblDollarChange );
    add( lblPercentChange );
    // setDollarChange( fDollarChange )
    // Set the Dollar Change label to the dollar amount in fDollarChange
    public void setDollarChange( Float fDollarChange )
    // Set color based off of value
    if( fDollarChange.floatValue() > 0 )
    // Green for positive
    lblDollarChange.setForeground( darkGreen );
    else if( fDollarChange.floatValue() < 0 )
    // Red for negative
    lblDollarChange.setForeground( Color.red );
    else
    // Black for no change
    lblDollarChange.setForeground( Color.black );
    // Set the label text
    lblDollarChange.setText( "Dollar Change: $" + fDollarChange.toString() );
    // setPercentChange( fPercentChange )
    // Set the Percent Change label to the percent in fDollarChange
    public void setPercentChange( Float fPercentChange )
    // Set color based off of value
    if( fPercentChange.floatValue() > 0 )
    // Green for positive
    lblPercentChange.setForeground( darkGreen );
    else if( fPercentChange.floatValue() < 0 )
    // Red for negative
    lblPercentChange.setForeground( Color.red );
    else
    // Black for no change
    lblPercentChange.setForeground( Color.black );
    // Set the label text
    lblPercentChange.setText( "Percent Change: " + fPercentChange.toString() + "%" );
    // Main application entry point into this class
    public static void main( String[] args )
    // Create a JFrame object
    JFrame frame = new JFrame( "Portfolio Totals" );
    // Create an PortfolioTotalsPanel Object
    PortfolioTotalsPanel app = new PortfolioTotalsPanel();
    // Set the values of the labels
    app.setDollarChange( new Float( "-150.50" ) );
    app.setPercentChange( new Float( "15" ) );
    // Add our PortfolioTotalsPanel Object to the JFrame
    frame.getContentPane().add( app, BorderLayout.CENTER );
    // Resize our JFrame
    frame.setSize( 600, 100 );
    // Make our JFrame visible
    frame.setVisible( true );
    // Create a window listener to close our application when we
    // close our application
    frame.addWindowListener
         new WindowAdapter()
    public void windowClosing( WindowEvent e )
    System.exit( 0 );
    Second Program
    // ===========================================================================
    // File: StockTablePanel.java
    // Description: Sample file for Java 2 From Scratch
    // ===========================================================================
    // Import the libraries this application will use
    import javax.swing.JTable;
    import javax.swing.table.*;
    import javax.swing.JScrollPane;
    import javax.swing.JFrame;
    import javax.swing.SwingUtilities;
    import javax.swing.JOptionPane;
    import javax.swing.JPanel;
    import java.awt.*;
    import java.awt.event.*;
    // Main application class: StockTablePanel
    public class StockTablePanel extends JPanel
    // Create a new Stock Table Model object
    StockTableModel stockTableModel = new StockTableModel();
    // Create a new JTable and associate it with the StockTableModel
    JTable stockTable = new JTable( stockTableModel );
    // Constructor
    public StockTablePanel()
    // Set the size of the table
    stockTable.setPreferredScrollableViewportSize( new Dimension(620, 350) );
    // Set the column widths for the table
    TableColumn column = null;
    for (int i = 0; i < 5; i++)
    column = stockTable.getColumnModel().getColumn( i );
    column.setPreferredWidth( stockTableModel.getColumnWidth( i ) );
    // Create a scroll pane and add the stock table to it
    JScrollPane scrollPane = new JScrollPane( stockTable );
    // Add the scroll pane to our panel
    add( scrollPane, BorderLayout.CENTER );
    // float getDollarChange()
    // Computes the total dollar change for the current portfolio
    public float getDollarChange()
    // Create a variable to hold the total change for all stocks
    float fTotal = 0;
    // Loop through all rows in the table
    for( int i=0; i<stockTable.getRowCount(); i++ )
    // Retrieve the dollar change for this stock
    Float f = ( Float )stockTable.getValueAt( i, 10 );
    // Add that value to our total
    fTotal = fTotal + f.floatValue();
    // Return the total value
    return fTotal;
    // float getPercentChange()
    // Computes the total percentage change for the current portfolio
    public float getPercentChange()
    // Create a couple variables to hold the total the user spent
    // on the stocks and the current value of those stocks
    float fMoneySpent = 0;
    float fMoneyWorth = 0;
    // Loop through all rows in the table
    for( int i=0; i<stockTable.getRowCount(); i++ )
    // Extract some pertinent information for the computations
    Float fLastSale = ( Float )stockTable.getValueAt( i, 2 );
    Float fNumberOfShares = ( Float )stockTable.getValueAt( i, 6 );
    Float fPricePaidPerShare = ( Float )stockTable.getValueAt( i, 7 );
    // Add the amount of money the user spent on this stock
    // to the total spent
    fMoneySpent += fNumberOfShares.floatValue() * fPricePaidPerShare.floatValue();
    // Add the value of this stock to the total value of the
    // stock
    fMoneyWorth += fNumberOfShares.floatValue() * fLastSale.floatValue();
    // Compute the percentage change:
    // TotalValue/TotalSpent * 100% - 100%
    float fPercentChange = ( (fMoneyWorth / fMoneySpent) * 100 ) - 100;
    // Return the percentage change
    return fPercentChange;
    // Main entry point into the StockTableApplication class
    public static void main( String[] args )
    // Create a frame to hold us and set its title
    JFrame frame = new JFrame( "StockTablePanel Application" );
    // Create an instance of our stock table panel
    StockTablePanel stockTablePanel = new StockTablePanel();
    // Add our tab panel to the frame
    frame.getContentPane().add( stockTablePanel, BorderLayout.CENTER );
    // Resize the frame
    frame.setSize(640, 480);
    // Make the windows visible
    frame.setVisible( true );
    // Set up a window listener to close the application window as soon as
    // the application window closes
    frame.addWindowListener
         new WindowAdapter()
    public void windowClosing( WindowEvent e )
    System.exit( 0 );
    // Table Model Class - holds all of our row and column information
    class StockTableModel extends AbstractTableModel
    // Create the columns for the table
    final String[] strArrayColumnNames =
    "Sym",
    "Company Name",
    "Last",
    "Hi",
    "Lo",
    "Vol",
    "#Shares",
    "$Shares",
    "Total",
    "%Change",
    "$Change"
    // Create the rows for the table - hard coded for now!!
    final Object[][] obArrayData =
    // Row One
    "SAMS", // Symbol
    "Sams Publishing", // Company Name
    new Float( 10 ), // Last Sale
    new Float( 12 ), // High
    new Float( 8 ), // Low
    new Double( 2000000 ), // Volume
    new Float( 100 ), // Number of Shares Owned
    new Float( 7.5 ), // Purchase price per share
    new Float( 1000 ), // Total Holdings
    new Float( 33 ), // Percent change (increase!)
    new Float( 250 ) // Dollar change
    // Row Two
    "Good", // Symbol
    "Good Company", // Company Name
    new Float( 50 ), // Last Sale
    new Float( 52 ), // High
    new Float( 45 ), // Low
    new Double( 4000000 ), // Volume
    new Float( 100 ), // Number of Shares Owned
    new Float( 30 ), // Purchase price per share
    new Float( 5000 ), // Total Holdings
    new Float( 33 ), // Percent change (increase!)
    new Float( 250 ) // Dollar change
    // Row Three
    "BAD", // Symbol
    "Bad Company", // Company Name
    new Float( 20 ), // Last Sale
    new Float( 22 ), // High
    new Float( 18 ), // Low
    new Double( 2000000 ), // Volume
    new Float( 500 ), // Number of Shares Owned
    new Float( 50 ), // Purchase price per share
    new Float( 10000 ), // Total Holdings
    new Float( -60 ), // Percent change (increase!)
    new Float( -25000 ) // Dollar change
    // Return the number of columns in the table
    public int getColumnCount()
    return strArrayColumnNames.length;
    // Return the number of rows in the table
    public int getRowCount()
    return obArrayData.length;
    // Get the column name from the strArrayColumnNames array for the "col"-th
    // item
    public String getColumnName( int col )
    return strArrayColumnNames[col];
    // Return the value, in the form of an Object, from the obArrayData object
    // array at position (row, col)
    public Object getValueAt( int row, int col )
         // We will compute columns 8, 9, and 10, so if the column number is
         // below eight, we can just return it without computing or retrieving
         // anything.
         if( col < 8 )
         return obArrayData[row][col];
         // Retrive the necessary values from the object array to compute all
         // of the remaining columns
         Float fLastSale = ( Float )obArrayData[row][2];
         Float fNumberOfShares = ( Float )obArrayData[row][6];
         Float fPurchasePrice = ( Float )obArrayData[row][7];
         switch( col )
         // Total Holdings = Last Sale(2) * Number of Shares Owned(6)
         case 8:
         // Build a new Float object with the product of the two
         Float fTotal = new Float
         // Note, these have to be converted to type "float" to
         // perform the multiplication
         fLastSale.floatValue() * fNumberOfShares.floatValue()
         // Return the result
         return( fTotal );
         // Percent change =
         // (Last Sale Price (2) / Purchase Price (7)) * 100% - 100 %
         case 9:
         Float fPercentChange = new Float
         ((fLastSale.floatValue() / fPurchasePrice.floatValue ()) * 100) - 100
         return fPercentChange;
         // Dollar Change =
         // LastSale*NumberOfShares - PurchasePrice * NumberOfShares
         case 10:
         Float fDollarChange = new Float
         ( fLastSale.floatValue() * fNumberOfShares.floatValue() )
         ( fPurchasePrice.floatValue() * fNumberOfShares.floatValue() )
         return fDollarChange;
         // We have included every case so far, but in case we add another
         // column and forget about it, let's just return its value
         default:
         return obArrayData[row][col];
    // Return the class type, in the form of a Class, for the c-th column in
    // the first (0-th indexed) element of the obArrayData object array
    public Class getColumnClass( int c )
    return getValueAt(0, c).getClass();
    // Return true if the "col"-th column of the table is editable, false
    // otherwise. The following columns are editable:
    // Cell Description
    // 0 Symbol
         // 6 Number of Shares Owned
         // 7 Purchase Price per Share
    public boolean isCellEditable(int row, int col)
         // Check the column number
         if( col == 0 || col == 6 || col == 7 )
         return true;
         else
         return false;
    // Set the value of the (row, col) element of the obArrayData to value
    public void setValueAt(Object value, int row, int col)
         // Symbol
         if( col == 0 )
         // We need a string value - we can convert any
         // value to a string, so just assign it
         obArrayData[row][col] = value;
         // Number of Shares owned
         else if( col == 6 )
         // We need a number - either float or int
         obArrayData[row][col] = new Float( getNumberString( value.toString() ) );
         // Purchase Price per share
         else if( col == 7 )
         // We need a float
         obArrayData[row][col] = new Float( getNumberString( value.toString() ) );
         // Cell is not editable
         else
         return;
         // Notify our parent of the change
         fireTableCellUpdated(row, col);
    // String getNumberString( String str )
    // Read through str and return a new string with the numbers and decimal
    // points contained in str
    public String getNumberString( String str )
    // Get str as a character array
    char[] strSource = str.toCharArray();
    // Create a buffer to copy the results into
    char[] strNumbers = new char[strSource.length];
    int nNumbersIndex = 0;
    // Boolean to ensure we only have one decimal value
    // in our number
    boolean bFoundDecimal = false;
    // Loop through all values of str
    for( int i=0; i<strSource.length; i++ )
    // Check for a digit or decimal point
    if( Character.isDigit( strSource[i] ) )
    strNumbers[nNumbersIndex++] = strSource;
    else if( strSource[i] == '.' && !bFoundDecimal )
    // Append the character to the String
    strNumbers[nNumbersIndex++] = strSource[i];
    // Note that we found the decimal value
    bFoundDecimal = true;
    // Build a new string to return to our caller
    String strReturn = new String( strNumbers, 0, nNumbersIndex );
    // Return our string
    return strReturn;
    // Return the column width of the column at index nCol
    public int getColumnWidth( int nCol )
    switch( nCol )
    case 0:
    case 2:
    case 3:
    case 4:
    case 6:
    case 7:
    case 9:
    return 50;
    case 1:
    return 125;
    default:
    return 75;
    Third one that imports the previous two programs Classes
    // Import the packages used by this class
    import javax.swing.*;
    import javax.swing.event.*;
    import java.awt.*;
    import java.awt.event.*;
    // Import our other components
    import StockTablePanel;
    import PortfolioTotalsPanel;
    // StockTableTabPanel
    public class StockTableTabPanel extends JPanel implements TableModelListener
    // Create our panels
    StockTablePanel stockTablePanel = new StockTablePanel();
    PortfolioTotalsPanel portfolioTotalsPanel = new PortfolioTotalsPanel();
    // Constructor
    public StockTableTabPanel()
    // Set our layout
    setLayout( new BorderLayout() );
    // Initialize the portfolio panel
    updatePortfolioTotals();
    // Add the child panels to our JPanel
    add( stockTablePanel );
    add( portfolioTotalsPanel, BorderLayout.SOUTH );
    // Add our class as a table model listener for the stock table
    // model so that we can update the portfolio totals panel
    // whenever the table changes.
    stockTablePanel.stockTableModel.addTableModelListener( this );
    // TableModelListener: tableChanged
    public void tableChanged(TableModelEvent e)
    // Make sure it is our table that changed
    if( e.getSource() == stockTablePanel.stockTableModel )
    // Call our method to update the portfolio totals
    updatePortfolioTotals();
    // public updatePortfolioTotals
    // Updates the portfolio totals panel labels based off of the values
    // in the stockTablePanel
    public void updatePortfolioTotals()
    // Get the values from the stockTablePanel and send them
    // to the portfolioTotalsPanel
    portfolioTotalsPanel.setDollarChange( new Float( stockTablePanel.getDollarChange() ) );
    portfolioTotalsPanel.setPercentChange( new Float( stockTablePanel.getPercentChange() ) );
    // Main application entry point into this class
    public static void main( String[] args )
    // Create a JFrame object
    JFrame frame = new JFrame( "Stock Table Tab" );
    // Create an StockTableTabPanel Object
    StockTableTabPanel app = new StockTableTabPanel();
    // Add our StockTableTabPanel Object to the JFrame
    frame.getContentPane().add( app, BorderLayout.CENTER );
    // Resize our JFrame
    frame.setSize( 640, 440 );
    // Make our JFrame visible
    frame.setVisible( true );
    // Create a window listener to close our application when we
    // close our application
    frame.addWindowListener
         new WindowAdapter()
    public void windowClosing( WindowEvent e )
    System.exit( 0 );

  • Importing classes, package, Jamlab, JAMA

    Hello:
    I am using, inside a JSP, a modified version of this code --> http://www.developer.com/java/other/article.php/806711, which uses a package named JAMA and Jamlab(to work with matrix) --> http://www.developer.com/java/other/article.php/762441
    It is already recognizing the JAMA package (basic linear algebra package), after I added the Jama.jar file path to the CLASSPATH.
    I was trying to import the Jamlab classes and I thought that I could do the same: add to the CLASSPATH the Jamlab.jar path.
    The download did not come with a .JAR file, I did it using the JAR command: adding the classes to it. I already checked that the classes are actually inside the .JAR, not in a sub-folder.
    The compiler is not recognizing a method which is found inside the Jamlab package:
    //Create matrix of the coefficients.
        polyCoeffMatrix = new Matrix(JElmat.convertTo2D(polynomialCoefficients));
    "JElmat cannot be resolved" is the error message.
    The import directive of my JSP page:
    <%@page import="java.io.*,java.lang.*, java.util.*, java.awt.*, java.awt.image.*, Jama.*, Jama.util.*, jamlab.*, jamlab.JElmat.*"%>Any help is extremely appreciated!

    Yes they are in the same folder with 'package graphs;' in the 1st line,
    i've tried with and without package.class to no avail
    the exact errors i'm getting are
    without the package in front
    error: File .\CustomLabel.class does not contain type CustomLabel as expected, but type graphs.CustomLabel. Please remove the file or make sure it appears in the correct subdirectory of the class path
    with the graphs.CustomLabel i get the following errors
    error: Invalid class File formate: .\graphs\CustomLabel.class, wrong version: 46, expected 45
    2nd error: Class graphs.CustomLabel not found in import.

  • MDL1261: Error importing OBJECT_CATALOG

    I am getting an error when importing a change to a process flow from our staging environment to production. The change I made was adding assigns to the process flow. The import only fails on this process flow I am able to import other process flows and maps. Now I am getting this error when I import:
    Error occurred importing from file "C:\oracle\OWB103\owb\bin\admin\DAILY_STG_DATA2_PF.mdl".
    Error at line 795: MDL1261: Error importing OBJECT_CATALOG THE_SSI_DW.
    Detailed Error Message:
    2nd class object CMPNameInfo@35f542/id=3536194/type=CMPPhysicalObject/name=null not loaded into cache. Need to load its first class object first. Please contact Oracle Support with the stack trace and details on how to reproduce it.
    Anybody have any ideas on how to fix this?

    Did you do a lot of edits on the flow to get it to the state it is in now? It looks like some information is messed up. If you try making the changes from your base state and then retrying might work around it, but thats a guess.
    Cheers
    David

  • Problem with Player class: Error: (28) class Player not found

    Hi,
    I had this error while attempting to use the Player object of media package. I am using JDeveloper 3.2
    Error: (28) class Player not found in class lyee.Frame5.
    My program code has this shape.
    import java.awt.event.*;
    import java.applet.*;
    import java.net.*;
    import java.io.*;
    import javax.media.*;
    public class Frame5 extends JFrame {
    FlowLayout flowLayout = new FlowLayout();
    JPanel jPanel1 = new JPanel();
    Player lecteur;
    Could someone help me finding where the error is exactly. The Player object is in javax.media pakcage, right ? Is there any librarary missing ??
    Thank you
    Jaouhar

    If you haven't done so already, you have to install JMF -- Java Media Framework, which you can download from the Sun website ( http://java.sun.com ). After that, you have to add that library to your project, in your project settings dialog.

Maybe you are looking for

  • Not able to get Shared Server Mode to work in XE

    The server is an HP Dual CPU Xeon, 4 GB RAM. 120GB HD. Oracle XE reports the following: SGA 768 Target, 768MB Current. PGA 256MB Target, 55MB current (when there are a small number of client connections) The application and database work properly wit

  • Fireworks Slide Show

    I have a link on my employee website that goes to various slide shows that I created of different events. I have links to click on that brings them to a different slide show I made in Fireworks. I tested it last night and I had to end up re-naming th

  • Stop LIS Updating

    Hello friends, I don't know so much about LIS updates but I do know I want to stop them from happening. Can anyone tell me how to do it and whether those updates are nessecery for anythig( for example we have BW datasources, are they might be using t

  • Finding previous files in LR

    Hi. my computer crashed and had to be reset to the factory settings and Ive reinstalled LR... how do I retrieve all my files and presets from the Cloud from my previous version?  I frequently backed up my LR within LR!

  • Error Message 1321 during adobe reader XI installation

    While trying to download free version of adobe reader XI, I get installation error 1321.  How do I fix this?