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 6892971
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:36:02+00:00 2026-05-27T06:36:02+00:00

I have com.company.database.mysql and com.company.database.sqlite. I only want to include com.company.database.mysql. My code was

  • 0

I have com.company.database.mysql and com.company.database.sqlite. I only want to include com.company.database.mysql.

My code was organized in folders (eg com/company/database/mysql) but now I want to have it flattened (eg com.company.database.mysql) so that I can include just the mysql code.

Eclipse doesn’t seem to let me do this. It complains that the package is wrong “The declared package “com.company.database.mysql” does not match the expected package “” It only works if I unflatten it (ie com/company/database/mysql).

How can I get eclipse to work with code in folders named com.company.etc instead of subfolders?

  • 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-27T06:36:03+00:00Added an answer on May 27, 2026 at 6:36 am

    The problem is that the Java compiler interprets periods in package declarations to be separate directories. So, if your file DataAccess.java is like:

    package com.company.database.mysql
    
    public class DataAccess {
    
    }
    

    The compiler will insist that this file be in a directory named mysql which is in a directory name database which is … In other words your original directory structure:

    src/main/java
       com
         company
           database
             mysql
    

    That is the reason for the error. However you don’t have to go to the lengths that you are just to exclude some of the source. You can manage your project’s source path (Project properties > Build path) and exclude one or more directories.

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

Sidebar

Related Questions

I have the following XDocument: <SomeDoc Id=73 Protocol=rahrah xmlns=http://schemas.company.com/rah/rah2/2005/> <Prop1>11111</Prop1> <Prop2>77777</Prop2> <Prop3>88888</Prop3> </SomeDoc> And
I have an web address: http://www.example.com/org/companyA I want to be able to pass CompanyA
I have a COM inproc DLL that we are using in our product. Now
Hi in simple terms have a company listing website. I have a database of
I have this code converting a mysql query to json: $sth = mysql_query('SELECT *
I have the following code: //set $message and run database query $message .= '<body
Goal : I have a business database website full of businesses. Business owners want
On my company's website ( www.dmacorporation.com we have a section on the first page
I want to fetch data from SQLITE database and display it in a LIST.
I have a COM object written using the MS ATL library. I have declared

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.