Forum Stats

  • 3,824,996 Users
  • 2,260,452 Discussions
  • 7,896,378 Comments

Discussions

How to convert commandline source to a project for Netbeans

OTG-467455
OTG-467455 Member Posts: 506 Bronze Badge
edited Nov 16, 2017 4:15PM in Java Puzzle Ball

I tried my hand at java coding using the command line and word pad.  Then I started Netbeans as I want to convert the java sources to a Netbeans project.  Looked at import and a few other functions.  Did not find any glaringly obvious method to achieve this.

How do I convert the code developed outside of Netbeans using the command line approach to a Netbeans project and vice-versa?

OTG-467455

Best Answer

  • mNem
    mNem Member Posts: 1,380 Gold Trophy
    edited Nov 16, 2017 3:25AM Answer ✓

    You may want to try the following ...

    1. From existing source to netbeans project ...

    Create a new project from

    File > New Project > 1. Java > Java Project with Existing Sources > Fill in Name and Location >Next >Add Source Folder (your existing source location) > ...Finish.

    of course, this just brings in the source files. You still need to do the rest of the project setup such as

    1. where to find the libraries,

    2. build path - location of the compiled .class files and so on.

    OTG-467455OTG-467455

Answers

  • mNem
    mNem Member Posts: 1,380 Gold Trophy
    edited Nov 16, 2017 3:25AM Answer ✓

    You may want to try the following ...

    1. From existing source to netbeans project ...

    Create a new project from

    File > New Project > 1. Java > Java Project with Existing Sources > Fill in Name and Location >Next >Add Source Folder (your existing source location) > ...Finish.

    of course, this just brings in the source files. You still need to do the rest of the project setup such as

    1. where to find the libraries,

    2. build path - location of the compiled .class files and so on.

    OTG-467455OTG-467455
  • mNem
    mNem Member Posts: 1,380 Gold Trophy
    edited Nov 16, 2017 4:33AM

    You are welcome.

    I guess we just need to find ways to get the best out of what is available to us.

  • OTG-467455
    OTG-467455 Member Posts: 506 Bronze Badge
    edited Nov 16, 2017 4:53AM

    Sorry mNem, I did not check before posting the reply.  It was meant for the other question you responded to. I have now deleted it.  I am going to try your suggestion.

  • OTG-467455
    OTG-467455 Member Posts: 506 Bronze Badge
    edited Nov 16, 2017 4:15PM

    mNem, thanks, it works like a dream.   First made a few mistakes then got it right.