aspose file tools
The moose likes IDEs, Version Control and other tools and the fly likes JBuilder 2005 - simple PACKAGE problem - please help me - anybody!! Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Reply Bookmark "JBuilder 2005 - simple PACKAGE problem - please help me - anybody!!" Watch "JBuilder 2005 - simple PACKAGE problem - please help me - anybody!!" New topic
Author

JBuilder 2005 - simple PACKAGE problem - please help me - anybody!!

Steve Jensen
Ranch Hand

Joined: Sep 23, 2002
Posts: 126
Folks, i've tried SEVERAL versions of JBuilder, and whatever one i've used, i've had the same problem. It's to do with Packages, ie, declaring and using them.

Ive posted some pictures below, of the folders i have created, what ive done in my JBuilder project setup, and the resuls of trying to compile the code.

Hope it's self-explanatory!

Below is the code for a 'simple' example on Packages, i've copied form a book.



Quite basically, ive created a folder called 'MyPack' on my c:, which has been placed inside a directory on my C: drive called 'Java'. ie. c:\Java\MyPack

Now, when i set up the program from the project properties in JBuilder (see screens (images 3-6), and try compile the program, i get the error stated in image 7.

PLEASE could somebody tell me what i am doing wrong

Cheers in advance!

Image 1



Image 2



Image 3



Image 4



Image 5



Image 6



Image 7



John Bonham was stronger, but Keith Moon was faster.
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
you're referencing c:\java as the root of your classpath for the compiler but using c:\java\MyPack as the root for storing the files of your project.

Remove that mismatch and it should compile.


42
Steve Jensen
Ranch Hand

Joined: Sep 23, 2002
Posts: 126
Well, i set the properties to the screenshot below (Image 8), and it seems to have solved that problem.

Image 8



But now, when i specify the main class, ie, the class containing the main method (Image 9), i get another error (Image 10) when i try & run it.

PLEASE, i've been struggling to with JBuilder all day, and if i could get this to work, i'd be ever go grateful.

Image 9




Image 10

Steve Jensen
Ranch Hand

Joined: Sep 23, 2002
Posts: 126
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
you have changed the root of your class tree. That means you have to change the location of your files as well, they're now one level too deep.
Steve Jensen
Ranch Hand

Joined: Sep 23, 2002
Posts: 126


Do i do this in project properties?
 
I agree. Here's the link: http://jrebel.com/download
 
subject: JBuilder 2005 - simple PACKAGE problem - please help me - anybody!!
 
Similar Threads
package importing problem
how to compile packages
Why am I not able to this code in eclipse?
Simple Package Problem.....
package problem