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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T13:45:38+00:00 2026-05-13T13:45:38+00:00

I am developing a plugin.In this i take project as input from textbox which

  • 0

I am developing a plugin.In this i take project as input from textbox which is a string , but it has to be converted to IJavaProject type before proceeding. How can i do that ?

Thanks

  • 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-13T13:45:38+00:00Added an answer on May 13, 2026 at 1:45 pm

    If projectName does not exist, IProject, which is just a handle, will be null.
    IJavaProject will also be null… so I would not recommend beny23‘s solution.

    The javadoc for JavaCore.create(IProject) states, “no check is done at this time on the existence or the java nature of this project”.

    See this thread for creating a Java Project programmatically from scratch. Extract

    final IJavaProject javaProject = JavaCore.create(project);
    final IProjectDescription projectDescription =
      workspace.newProjectDescription(projectName);
    projectDescription.setLocation(null);
    project.create(projectDescription, new SubProgressMonitor(progressMonitor, 1));
    

    You can check if is has actually been created with:

    IJavaProject.getUnderlyingResource().exists();
    

    See also this thread as another code example of Java Project creation.

    That thread also creates project, even though their nature is more complete than just Java.

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

Sidebar

Related Questions

I'm developing a plugin which is used in several applications. This plugin is a
I'm currently developing a firefox plugin. This plugin has to handle very crappy website
I'm developing a plugin that has node(computer) objects with attributes like: String name String
I'm developing a Eclipse plugin. From this plugin I want to instantiate classes from
I am developing a plugin for eclipse. In this plugin I need to be
i am developing a eclipse plugin . In this plugin i am using reflection
I am developing a Phonegap plugin. My HTML file looks like this: <!DOCTYPE HTML>
I'm developing a page using the jQuery sparklines plugin. This plugin replaces some CSV
I am developing a plugin in eclipse which can generate a text file (based
I'm developing a greasemonkey plugin, which is supposed to send a form in background

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.