• 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:
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • Carey Brown
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • fred rosenberger
  • 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: 73244
332
  • 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: 22248
117
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic