compile error


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: compile error

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Posts
    2

    compile error

    i have a little experience with java however this is my first time trying to compile. heres my problem everytime i try to compile
    using Frontend plus & from dos i get this error:


    Trying to compile FCServer.java
    [parsing started E:\FCServer.java]
    E:\FCServer.java:3: '.' expected
    import ae;
    ^
    E:\FCServer.java:4: '.' expected
    import an;
    ^
    E:\FCServer.java:45: not a statement
    classnotfoundexception;
    ^
    [parsing completed 280ms]
    [total 521ms]
    3 errors

    Finished...










  2. #2
    Join Date
    Jun 2004
    Posts
    199
    need to see your class file.

    But it looks like you've imported classes and meant to import packages.

    i.e import an.*;

    It would better to do
    import an.SomeClassName;

    I use and IDE so I haven't seen messages like that in awhile

    Check out Eclipse or Netbeans or ...

  3. #3
    Join Date
    Aug 2004
    Location
    On the net
    Posts
    38
    Everything is fine. You need to make sure that the class names you use are according to the coding standards and their exact names. This is with regarding to classnotfoundexception.
    It must be used as ClassNotFoundException.

    Second thing is that for new Java developers the frequent problem they face is classpath. If you set the classpath to current directory then it doesnt show the error you got.
    This is FYI.
    -Narayana...

  4. #4
    Join Date
    Sep 2004
    Posts
    2
    so what should i do?
    i'm clueless

  5. #5
    Join Date
    May 2004
    Location
    Durham, UK
    Posts
    174
    Hi,

    Change import ae; to import ae.*;

    Change import an; to import an.*;

    Change classnotfoundexception; to ClassNotFoundException;

    and see if it compiles, if it doesn't please post the source code and we will try and help further.
    Hope this helps
    Graham

    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, and if they get mad, you are a mile away and you have their shoes ;-)

    http://www.grahamrobinsonsoftware.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center