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

  • Home
  • SEARCH
  • 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 9132991
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:24:29+00:00 2026-06-17T08:24:29+00:00

I am developing an Eclipse wizard that will be used for creating a project.

  • 0

I am developing an Eclipse wizard that will be used for creating a project. I can create the folder hieararchy but I cannot create a package under “src” folder. I found this answer How to create packages (folders) in an Eclipse project via plugin here. However, it does not solve my problem. When I create a folder under “src” folder, eclipse does not recognize it as a package. How can I do this?

  • 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-06-17T08:24:30+00:00Added an answer on June 17, 2026 at 8:24 am

    Try this using JDT API as below.

    private void createPackage(IProject project) throws JavaModelException {
       IJavaProject javaProject = JavaCore.create(project);
       IFolder folder = project.getFolder("src");
       // folder.create(true, true, null);
       IPackageFragmentRoot srcFolder = javaProject
           .getPackageFragmentRoot(folder);
       IPackageFragment fragment = srcFolder.createPackageFragment(project.getName(), true, null);
    }
    

    for more help please access this link

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

Sidebar

Related Questions

I am developing a Eclipse plug-in project which can clone the code of other
I am developing an Eclipse plugin that creates a project in the current workspace.
I am developing an eclipse feature that has a dependency on Acceleo. When I
currently I'm developing in eclipse 3.5 in different project web applications for tomcat 6.0.24.
I'm currently developing an eclipse plugin. This plugin contains a project nature which depends
I've been developing in Eclipse for a long while, but am taking a hard
I'm developing a plugin for Eclipse Juno under Mountain Lion. I can test my
In developing an Eclipse plugin, is there a way to modify the package explorer.
When developing an Eclipse Plugin, when should I save project specific information in the
I am developing with Eclipse as my IDE. I have a project (my model)

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.