Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Netbeans,Packages and existing code

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a set of existing Java code which I setup as per the demos,faqs as how to create a new project with existing code.

The problem I have is that have to set "Project Properties: Working Directory" to the projects build directory (where the compiled classes are stored).
If I do not set this location, the project launches but it errors when attempting to load one of the other classes which are stored in a different package
from the class that contains the "main". Additionally, it does not find it icons if this same path is not set.

Of course this problem also identically (like the working directory had not been set) when attempting to launch the Jar file.

I rebuilt this all from scratch manually importing the .java code, and operates identically to the wizard based import.

Yes, this is very new to me with NetBeans. It seems something stupid. I have scoured the docs and and googled all to no avail.

Thanks for any help.
-C
 
Marshal
Posts: 74393
335
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

You might find Rob or Steve or Jesper move this thread to our IDEs forum. It is an annoying feature of NetBeans that it doesn't seem to take classes from a directory like that. Other IDEs, eg Eclipse, seem to recognise .java files moved into their directories quite happily, however.
 
Sheriff
Posts: 22512
122
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:You might find Rob or Steve or Jesper move this thread to our IDEs forum.


Done.
 
reply
    Bookmark Topic Watch Topic
  • New Topic