Illogical problem

i have a small problem with netbeans, when i include my running lib in the project like this :



everything works fine, note the files that i have included



but when i included the same files ( bundled into a library ) like this :



i get this error :





now this isn’t a big problem for me, but it’s been hitting my head for quite some time now.

and i know that in the end, when everything is resolved it will be something utterly stupid. ( it always is when it comes to IDEs )



PS : sorry for posting so many images, i couldn’t resist …

there should be 3 images above in case you don’t see them here are the urls :

http://img526.imageshack.us/img526/7550/clipboard01lg6.jpg

http://img74.imageshack.us/img74/8758/clipboard02tb0.jpg

http://img405.imageshack.us/img405/5269/clipboard03bz4.jpg

additionally see http://imagevenue.com/faq.php point 4 - that's why one can't see the images

1st image works 2 and 3 give "not found" error

mud2005 said:

1st image works 2 and 3 give "not found" error

it was working when i posted it, there was some problem with the server, obviously...
i uploaded them to another server and modified mt message.

The reason is very simple… Netbeans assumes that when you add a folder as a library (not a JAR), then it contains a directory structure containing classes in their respective package.



When you add JARs, it defines a root package (default) to the JAR itself, and not to the directory (folder). Perhaps this is weird, but it works.

duenez said:

When you add JARs, it defines a root package (default) to the JAR itself, and not to the directory (folder). Perhaps this is weird, but it works.

cool.  :mrgreen:

is there any way to group similar files together(somehow), and for them to still be in the default package. Since if i have too many files in my default package it will become cubersome to navigate and badly designed.

Not sure what you want to achieve with it, but sure enough you could create a single JAR with the contents of all the JARs you need. I would never recommend it, though.

duenez said:

The reason is very simple... Netbeans assumes that when you add a folder as a library (not a JAR), then it contains a directory structure containing classes in their respective package.

but if i want to acsses "com.jme.something" i wouldn't do "JME-build.com.jme.something"

Right, right… what I meant is to decompress all the classes in all the JARs, in the same folder (this would create perhaps various sub-folders, like com, jmetest, etc) and then compress this folder as your new and only JAR.



This would not change the package of the classes inside, but would allow you to have a unified place for all your requirements.

thanks