Cannot find symbol symbol : class Item location: package platypos.services.

Well, I am having a few problems getting this java file to compile.
/home/brandon/Desktop/platypos/services/order/Seat.java
package platypos.services.order;
import platypos.services.order.Item;
import java.util.Vector;
public class Seat
    private int             _number;
    private Vector<Item>    _items  = new Vector<Item>();
    public static void main(String args[])
        System.out.println("Hello");
}here is my terminal session:
brandon@Aspire5100:~$ javac /home/brandon/Desktop/platypos/services/order/Seat.java
/home/brandon/Desktop/platypos/services/order/Seat.java:17: cannot find symbol
symbol  : class Item
location: package platypos.services.order
import platypos.services.order.Item;
                              ^
/home/brandon/Desktop/platypos/services/order/Seat.java:23: cannot find symbol
symbol  : class Item
location: class platypos.services.order.Seat
    private Vector<Item>    _items  = new Vector<Item>();
                   ^
/home/brandon/Desktop/platypos/services/order/Seat.java:23: cannot find symbol
symbol  : class Item
location: class platypos.services.order.Seat
    private Vector<Item>    _items  = new Vector<Item>();
                                                 ^
3 errors/home/brandon/Desktop/platypos/services/order/Item.java is packaged as follows
package platypos.services.order;and has been successfully compiled to Item.class in the same directory.
I am using the latest JDK on Ubuntu 8.04
I am a bit more skilled in C++ and am trying to learn java, anyone got any clues as to what I am doing wrong?
Thank you

yep, here is an abridged version of the Item.java file. and it has been successfully compiled to Item.class
package platypos.services.order;
import java.util.Vector;
class Item
     // Constructor     
     public Item(String name)
          SetName(name);     
    // Main Function
    public static void main(String args[])
}Edited by: javaperson on Apr 30, 2008 11:01 PM

Similar Messages

  • "Cannot find the main Class. Program will exit."

    Hi, I created a program, and I am trying to distribute it to other people in my office. I tried using both NetBeans 6.8/6.9 and eclipse. I exported to a single jar file. When I run this single .jar file, it runs perfectly. I sent it to one of my coworkers, and the message "Cannot find the main Class. Program will exit." popped up. I then had IT update his Java to 6.20 and it worked. The problem is that this program must be distributed to over 100 people, and I cannot have them each update their Java individually, nor will IT update everyone's on their own. They all have Java 4.XX I believe. Is there any way around this error that only happens on older versions of java? I have checked my manifest file and what not, as I said it runs on computers with Java 6.

    AndrewThompson64 wrote:
    Do you mean Java 1.4? It is best to be sure, so point some of the target machines at this page(1) to check.Yes, Sorry I meant 1.4.XX, I think they have 1.4.2_19.
    >
    >
    a) Ensure the code does not use functionality introduced in later versions, e.g. assertions, generics, for-each loops.. Using the [cross-compilation options of javac|http://java.sun.com/javase/6/docs/technotes/tools/windows/javac.html#crosscomp-options] will warn of those.
    b) Ensure the code does not use any classes, attributes or methods that were not available in the earlier version, then use the cross-compilation options of javac when compiling. Actually the second will alert of the first, so long as the -bootclasspath parameter is used with an appropriate rt.jar.I believe that everything is ok, unless some of the swing functions cannot be used in 1.4. Besides the swing functions (which I am not sure about) everything should be able to be used in 1.4
    Thank You

  • How do I remove "Scan with ClamXav" in Lion? I cannot find a contextual menu item folder in at home/library.

    How do I remove "Scan with ClamXav" in Lion? I cannot find a contextual menu item folder in at home/library. I installed and removed ClamXav from the Mac app store.
    Thanks.

    ToBeHuman wrote:
    Thanks! AppTrap mentioned in the linked article got rid of it for me.
    Actually, it didn't. With Snow Leopard and Lion, the contextual menu is provided by a built in "service" within the ClamXav application itself.
    If you downloaded ClamXav from the AppStore, all you need to do is trash it and reboot.
    If you downloaded the full version from the web you need to first run the "ClamAV Engine REMOVER" script that comes on the ClamXav_2.x.x.dmg. Then trash the ClamXav application, empty the trash and reboot.
    There are also one or two preferences that can be found in ~/Library/Preferences/ that start with "uk.co.markallen.clamxav..." that take up minimal space and don't do anything without the application. AppTrap probably found those.

  • Cannot find the Symbol

    my problem is:cannot find symbol variable coefsAndDegs ; Line 54
    please help me
    import java.util.*;
    class Term {
         private int coefficient;
         private int degree;
         public Term(int coefficient, int degree) {
              this.coefficient = coefficient;
              this.degree = degree;
         public int getCoefficient() {
              return coefficient;
         public int getDegree() {
              return degree;
    public class Polynomial {
        private char polyVar;
        private ArrayList<Term> terms;
        public void Polynomial(char polyVar, int ... coefsAndDegs) {
             Scanner kb = new Scanner(System.in);
             String polies = kb.nextLine();
              polyVar = polies.charAt(0);
             if (polyVar < 'a' || polyVar > 'z') {
                  throw new IllegalArgumentException("Invalid polynomial variable.");
             } else {
                  this.polyVar = polyVar;
             // check that coefsAndDegs are provided in pairs..
             if (coefsAndDegs.length % 2 != 0) {
                  throw new IllegalArgumentException("Coefficients and Degrees must be provided in pairs.");
             } else {
                  terms = new ArrayList<Term>();
                  for (int i = 0; i < coefsAndDegs.length / 2; i++) {
                       Term term = new Term(coefsAndDegs[i * 2], coefsAndDegs[i * 2 + 1]);
                       terms.add(term);
        public void main(String[] args){
         Polynomial main = new Polynomial();
        Polynomial(polyVar, coefsAndDegs);          
    }

    bluez_exe wrote:
    my problem is:cannot find symbol variable coefsAndDegs ; Line 54And what line is that? These forums don't have line numbers, and most of us are waay too lazy to copy and paste your code into something that does.
    What do you expect this to do:
    public void main(String[] args){
         Polynomial main = new Polynomial();
         Polynomial(polyVar, coefsAndDegs);          
              }Or this:
    if (polyVar < ' || polyVar > 'z')

  • HT4437 cannot find airplay symbol in safari

    I just recently installed Apple Tv to my TV.  I am having trouble finding the airplay on my macbook pro in safari.  I can access my music and photos via my wifi connection but cannot find the airplay symbol on my laptop.

    Yeah it's annoying, any audio or video on iOS is available for AirPlay by default, but not on OS X.
    If you have a new computer, you may be able to mirror your entire Mac's display via AirPlay mirroring. Go to System Preferences, Displays, and see if AirPlay Mirroring is an option at the bottom of the window.
    The best way for the time being is to play this content from an iOS device, or find it through the Apple TV apps (if it's YouTube or Vimeo).
    Edit: You can AirPlay all your system audio by holding down Alt, pressing the volume icon in your menubar, and selecting Apple TV. This is for Mountain Lion only, and just sends all audio that would normally come from your speakers.

  • Help!! cannot find files outside class dir

    Directory Structure:
    App
    |-src
    |-classes
    | |-App
    | |-...Packages
    |-resource
    |- images
    I am having problems finding the files in the resource directory from the classes in the classes directory.
    Currently, I am trying:
    InputStream is = ClassLoader.getSystemResourceAsStream("app.properties");
    and running with: java -cp .;../resource App.MainClass
    whats wrong? and Is it different if I use a JAR file?

    I can only get it working if the "resource" directory is in amongst the packages
    App
    |- classes
    | |- App
    | �  |.. packages
    | �  |- resource
    |- src
    and use :
    InputStream is = ClassLoader.getSystemResourceAsStream("App/resource/app.properties");

  • ITunes cannot find the folder containing the installation package itunes64.msi.

    When I try and update iTunes to the newest version it says that it cannot find the itunes64.msi.  How to i fix this? I have a Dell Inspiron if that makes a difference.

    Unfortunately, this sort of trouble has gotten more complicated to deal with ever since Microsoft pulled the Windows Installer CleanUp utility from their Download Center on June 25. First we have to find a copy of the utility.
    Let's try Googling. (Best not to use Bing, I think.) Look for a working download site for at least version 3.0 of the Windows Installer CleanUp utility. After downloading the utility installer file (msicuu2.exe), scan the file for malware, just in case. (I use the free version of Malwarebytes AntiMalware to do single-file scans for that.)
    If the file is clean, to install the utility, doubleclick the msicuu2.exe file you've downloaded.
    Now run the utility ("Start > All Programs > Windows Install Clean Up"). In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove".
    Quit out of CleanUp, restart the PC and try installing iTunes again. Does the install go through properly now?
    (If you do find a clean download site for the correct version of CleanUp, please don't tell me where it is. Without wishing to sound paranoid (although I grant it does sound paranoid), there is a non-zero chance that posting links to download locations for the utility here at Discussions leads to that download location being shut down.)

  • Jni findclass cannot find my own classes with jre1.4

    I have a C++ program that uses CreateJavaVM() and FindClass() to access my own Java classes. Everything works as expected. Another C++ program uses
    GetCreatedJavaVMs() (returns 1)
    AttachCurrentThread()
    FindClass()
    to try to access other Java classes of my own. The GetCreatedJavaVMs() and AttachCurrentThread() seem to work fine but the FindClass() cannot find my own Java classes anymore.
    Shouldn't the VM and associated JNIEnv from GetCreatedJavaVMs be the same as that created using CreateJavVM() and thus be able to find the same classes? By the way, this worked fine with jre1.2 but stopped working when trying to move to jre1.4. Any ideas would be appreciated.

    hi...was wondering if you got that issue resolved.
    was it actually because of the newer JRE version?
    thanks.Considering that the post is about 2 years old, and that the person hasn't posted much since then here, I'd doubt he/she's going to respond to you. This isn't his/her email address, ya know.

  • [SOLVED] LyX cannot find layout/document classes

    LyX refuses to produce any output for me because it cannot find article.layout, or any other common layout. This file is installed in /usr/share/lyx/layouts/article.layout.
    I have installed texlive-most and texlive-bin. I have installed dvips and the other programs necessary to render files.
    I have tried clearing my LyX config several times (rm -rf ~/.lyx) and it hasn't helped. I have removed and reinstalled texlive with various options, including -Rn and -Rc, multiple times. I have also manually removed leftover files from both LyX and texlive. I have told LyX to reconfigure itself several times.
    No output will be produced. I thought maybe this was caused by some stray old config file floating somewhere out there but heretofore have not been able to find it or remove it via -Rn. Someone told me that a fresh install of LyX works.
    Any help would be deeply appreciated.
    EDIT: I have also tried updating my PATH to include /opt/texlive/bin as suggested somewhere else on these boards and then running and reconfiguring LyX. It doesn't help.
    Last edited by cookiecaper (2010-08-17 17:49:20)

    Ugh, just solved it. Hopefully this helps someone. I hadn't removed ~/.texlive. Removing that and restarting LyX fixed it.

  • Cannot find file symbol not showing up

    Hi -
    I have just done a massive move and backup etc. Things are going fine - just learned that every time you "reorganized" itunes music the entire file structure changes so a real back up with something like SyncBack totally ***** but...
    The question is...
    I know that there are about 50 files that do not have the proper file association. Last night there were the little exclamation points next to the song so I could find and correct them. I closed itunes and turned the computer off for the night. And now this morning when I open up the computer and itunes I cannot tell which songs still need updating because the little exclamation points are gone. How do I get those symbols back??!! (And yes, there still are files to be corrected I test that this morning)
    Thank you anyone who can help me out with this - I hope to some day soon have a clean itunes library AND backup

    I don't think your picture has anything to do with Spotlight. My Applications folder shows up the exact same way. Mac OS X applications aren't usually a single item, they're "packages" with items and folders inside. To get folders and packages to show their size, you'll have to change the "View Options" from the View menu. Check the box on to "Calculate all sizes". I would probably change the dialog box to reflect the changes to "This window only". Otherwise the Finder will be re-calculating the size of everything in every window. That could slow things down a bit.
    -Doug

  • Originally purchased the downloadable version of adobe PS elements 12. My computer crashed and they sent me the cd version for a macbook. I cannot find the serial number in the packaging.

    Hello, I purchased PS elements 12 for a windows pc. This pc died and I had to buy a new computer, I got a Macbook air, and since I had just downloaded PS elements 12 adobe was nice enough to send me the cd version for a mac in the mail. I did not have a cd drive at the time so I've taken a few months to get around to installing it. I am attempting to now but I cannot locate the serial numbers. Also I purchased the original and the second set through the official adobe website, not through a different retailer.
    Thanks for the help!

    use your orignal serial number.

  • Cannot find the main class

    Hello,
    I am running
    Java(TM) 2 Runtime Environment, Standard Edition
    (build 1.5.0_07-b03)
    Java HotSpot(TM) Client VM
    (build 1.5.0_07-b03, mixed mode, sharing)
    on both Windows 2003 Server and Windows XP Professional.
    Whan I try to run any java program that's the message I am getting:
    Exception in thread "main" java.lang.NoClassDefFoundError: TestJava
    On my personal computer it's running fine. I have made sure that the java program works ok. I cannot figure out why this is happening on just a few machines. I even install the SDK on those machines hoping it will allow the program to run. No luck.
    Anybody has experienced something weird like this? Any ideas?
    I need to run my java program on at least 10 machines. I have to persuade a number of folks that java is reliable. I am using java for about 3 years. I have never experienced something like that.
    Glad to provide any additional information.
    Thanks a lot.

    Something is extremely wrong here!
    Let's forget about the classmates for a sec and the jar directories
    Let me go to the basics here:
    I installed Java 1.5.0_07-b03 on my Windows 2003 server.
    In command prompt, when I run java -version I am getting:
    java version "1.5.0_07"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_07-b03)
    Java HotSpot(TM) Client VM (build 1.5.0_07-b03, mixed mode, sharing)
    When I just type java I am getting:
    Usage: java [-options] class [args...]
    (to execute a class)
    or java [-options] -jar jarfile [args...]
    (to execute a jar file)
    where options include:
    -client to select the "client" VM
    -server to select the "server" VM
    -hotspot is a synonym for the "client" VM [deprecated]
    The default VM is client.
    -cp <class search path of directories and zip/jar files>
    etc.
    To me that tells me java (JRE) is up and running. I should be able to run a program as easy as
    public class TestJava {
    public static void main(String Args[]){
    System.out.println("Success");
    after I compile it as such
    javac TestJava.java
    without getting any errors.
    However when I run
    java TestJava
    I am getting
    Exception in thread "main" java.lang.NoClassDefFoundError: TestJava
    I am in the same directory where the TestJava.class exists.
    Something so simple and it does not work. That's what drives me crazy.
    Any other test you might suggest?
    Thanks a lot.

  • Cannot find symbol class ParseException

    I have this in my code how ever
    DateFormat formatter = new SimpleDateFormat("ddMMyyyy");
    dDateStamp = (Date)formatter.parse(dateStamp);
    When I pass in say
    dateStamp=safsadssad sa;
    I get an error which is fine.
    I can not seem to catch this error with try catch
    When I use the one below it says it cannot find the symbol
    When i use the Exception it still throws and error to jsp page
    cannot find symbol
    symbol : class ParseException
    }catch(ParseException e){   
    symbol : class ParseException
    }catch(ParseException e){   
    Any One know I csn trap this?
    Thanks in advance

    Well, it's in the j2se API. Not sure what to tell you...

  • Cannot Find Symbol Error...again

    Believe me, I've searched Google, read the threads in this (and others) forum previously, and have tried all the suggestions to know avail. I was hoping a fresh pair of eyes could see what I'm not.
    I'm getting the following error:
    ExerciseLog.java:43: cannot find symbol
    symbol : class Welcome
    location: package exerciselog
    tabbedPane.addTab("Welcome", null, new exerciselog.Welcome(),"Welcome to the Exercise Log");
    ^
    1 error
    Here is ExerciseLog.java file:
    package exerciselog;
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    //import Welcome.java;
    public class ExerciseLog{
         private JFrame dlframe; //Private makes these variables only accessible from
         private JTabbedPane tabbedPane; //within this class, not any other class or package
         public ExerciseLog(){
              dlframe = new JFrame("A Java Technology Exercise Log");
              dlframe.addWindowListener(
                   new WindowAdapter()
                        public void windowClosing(WindowEvent e)
                             System.exit(0);
              tabbedPane = new JTabbedPane(SwingConstants.LEFT);
              tabbedPane.setBackground(Color.blue);
              tabbedPane.setForeground(Color.white);
              populateTabbedPane();
              buildMenu();
              dlframe.getContentPane().add(tabbedPane);
              dlframe.pack();
              dlframe.setSize(765, 690);
              dlframe.setBackground(Color.white);
              dlframe.setVisible(true);
         }//End constructor
         private void populateTabbedPane(){
              tabbedPane.addTab("Welcome", null, new exerciselog.Welcome(),"Welcome to the Exercise Log");
    //          tabbedPane.addTab("Exerciser Data", null, new Exerciser(), "Click here to enter exerciser data");
    //          tabbedPane.addTab("Log Exercises", null, new Exercises(), "Click here to enter exercise");
    //          tabbedPane.addTab("Statistics", null, new Statistics(), "Click here to calculate" + "exercise statistics");
    //          tabbedPane.addTab("Favorite Web Site", null, new Website(), "Click here to see a website");
    //          tabbedPane.addTab("Resources", null, new Resources(), "Click here to see a list" + "of resources");
         }//End populateTabbedPane method
         private void buildMenu(){
              JMenuBar mb = new JMenuBar();
              JMenu menu = new JMenu("File");
              JMenuItem item = new JMenuItem("Exit");
           item.addActionListener(
                new ActionListener()
                public void actionPerformed(ActionEvent e)
                   System.exit(0);
       menu.add(item);
       mb.add(menu);
       dlframe.setJMenuBar(mb);
         }//end buildMenu
         public void actionPerformed(ActionEvent e){
              System.exit(0);     
         public static void main(String[] args)
          ExerciseLog dl = new ExerciseLog();
    }and the Welcome.java file:
    package exerciselog;
    import javax.swing.*;
    import java.awt.*;
    public class Welcome extends JPanel{
         public Welcome(){//Welcome constructor
         }//end constructor
    I have compiled in the following ways, due to different suggestions from different sources:
    C:\Documents and Settings\Jami\My Documents\exerciselog>javac -classpath . ExerciseLog.java
    C:\Documents and Settings\Jami\My Documents\exerciselog>javac -classpath C:\Documents and Settings\Jami\My Documents\exerciselog ExerciseLog.java C:\Documents and Settings\Jami\My Documents\exerciselog>javac -classpath "C:\Documents and Settings\Jami\My Documents\exerciselog" ExerciseLog.java
    C:\Documents and Settings\Jami\My Documents>javac -classpath "C:\Documents and Settings\Jami\My Documents\exerciselog" ExerciseLog.java (and w/o the quotes)
    Any help you could provide would be appreciated.

    The classpath you specify should include the directory containing the exerciselog directory, not the exerciselog directory itself.
    The classes you are trying to compile and run are exerciselog.Welcome and exerciselog.ExerciseLog. We get used to thinking of them by the last part of the class name only, but their full name is important in determining their identity. In both cases the classes are located in "C:\Documents and Settings\Jami\My Documents" and this is what must be specified as part of the classpath.

  • Java.util.concurrent.LinkedBlockingDeque: cannot find symbol

    Hello,
    I'm trying to use an existing java code into a JavaFX application. To do this, I copied all my sources into the fx project in Netbeans and I linked the needed libraries, but when I tried to compile all this, I got the following message:
    "cannot find symbol
    symbol : class LinkedBlockingDeque
    location: package java.util.concurrent
    import java.util.concurrent.LinkedBlockingDeque;"
    the problem is at that line: import java.util.concurrent.LinkedBlockingDeque;
    This is a native java class. Is it not supported in JavaFx? Is not java fully compatible with Fx? What's happening?
    Thank you in advance

    Please, create an issue on it with the detailed comments: [http://www.netbeans.org/issues/enter_bug.cgi?component=javafx|http://www.netbeans.org/issues/enter_bug.cgi?component=javafx]

Maybe you are looking for