Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4613654
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T01:35:00+00:00 2026-05-22T01:35:00+00:00

I do not have a %CLASSPATH% set up. As I understand, this should not

  • 0

I do not have a %CLASSPATH% set up. As I understand, this should not be a problem because Javac will assume a classpath of the current directory.

As you can see below, javac is unable to find my Case class even though it’s in the same exact directory. Any thoughts on why this is happening? This code works fine when I use Eclipse.

C:\Documents and Settings\joep\My Documents\GCJ\src\codejam2011\Round0\D>dir /B
Case.class
Case.java
EntryPoint.java

C:\Documents and Settings\joep\My Documents\GCJ\src\codejam2011\Round0\D>javac EntryPoint.java

EntryPoint.java:16: cannot find symbol
symbol  : class Case
location: class codejam2011.Round0.D.EntryPoint
                ArrayList<Case> cases = new ArrayList<Case>();
                          ^
EntryPoint.java:16: cannot find symbol
symbol  : class Case
location: class codejam2011.Round0.D.EntryPoint
                ArrayList<Case> cases = new ArrayList<Case>();
                                                      ^
EntryPoint.java:24: cannot find symbol
symbol  : class Case
location: class codejam2011.Round0.D.EntryPoint
                                cases.add(new Case(new Integer(count), line));
                                              ^
3 errors

C:\Documents and Settings\joep\My Documents\GCJ\src\codejam2011\Round0\D>

Update 1:

After trying to compile from my package root (src), I get a new error (even after deleting the Case.class file)

C:\Documents and Settings\joep\My Documents\GCJ\src>javac -cp . codejam2011/Round0/D/EntryPoint.java

codejam2011\Round0\D\EntryPoint.java:16: cannot access codejam2011.Round0.D.Case

bad class file: .\codejam2011\Round0\D\Case.java
file does not contain class codejam2011.Round0.D.Case
Please remove or make sure it appears in the correct subdirectory of the classpath.
                ArrayList<Case> cases = new ArrayList<Case>();
                          ^
1 error

C:\Documents and Settings\joep\My Documents\GCJ\src>

Update 2:
It appears to be grabbing the Case.java file from a different package.

C:\Documents and Settings\joep\My Documents\GCJ\src>javac -d ../classes codejam2011\Round0\D\*.java

.\codejam2011\Round0\D\Case.java:4: duplicate class: codejam2011.Round0.C.Case
public class Case
       ^
codejam2011\Round0\D\EntryPoint.java:16: cannot access codejam2011.Round0.D.Case

bad class file: .\codejam2011\Round0\D\Case.java
file does not contain class codejam2011.Round0.D.Case
Please remove or make sure it appears in the correct subdirectory of the classpath.
                ArrayList<Case> cases = new ArrayList<Case>();
                          ^
2 errors

C:\Documents and Settings\joep\My Documents\GCJ\src>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T01:35:00+00:00Added an answer on May 22, 2026 at 1:35 am

    You need to compile from the package root, not from inside the package.

    So, cd to the src folder and compile from there.

    javac -cp . codejam2011/Round0/D/EntryPoint.java
    

    Update: as per your new problem, you need to recompile Case.java the same way. It was apparently compiled the same wrong way (from inside the package).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this problem that I cannot fix. From my @Controller , i can
So Google Analytics does not have an API that we can use to get
I do not have problem as such but I am quite new to Ruby.
I usually do not have difficulty to read JavaScript code but for this one
sorry but I do not have the actual code with me, but I will
I have installed Tomcat 5.5 in windows vista home basic. I have set classpath
I'd rather not have to resort to calling the command line. I'm looking for
VB 6.0 does not have any global handler.To catch runtime errors,we need to add
I have a User class which may or may not have an associated Department.
Sybase db tables do not have a concept of self updating row numbers. However

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.