This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 108062 - The README.TXT file in the dist directory should be made clearer.
Summary: The README.TXT file in the dist directory should be made clearer.
Status: CLOSED FIXED
Alias: None
Product: usersguide
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Patrick Keegan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-25 19:03 UTC by Karthikeyan Rajeswaran
Modified: 2007-10-25 00:55 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Karthikeyan Rajeswaran 2007-06-25 19:03:30 UTC
Please refer to http://www.netbeans.org/issues/show_bug.cgi?id=92925

In particular:
> If the classpath contains a folder of classes or resources, none of the
> classpath elements are copied to the dist folder.
It is not clear why the above is so.

I would suggest that the README include a pointer to a page on wiki.netbeans.org which can then be edited and improved
independently of the codebase.

I am assigning P2 to do this issue because there have been several forum posts on users running into issues when running
the jar in dist directory via 'java -jar'. (One of the reasons seems to be missing library files like .dll or .so. When
something like that happens, users seem to find it hard to diagnose and figure out the reason with existing information).
Comment 1 Tomas Zezula 2007-06-28 10:07:34 UTC
John, I agree with reporter. Can you create such a wiki page?
Comment 2 Karthikeyan Rajeswaran 2007-07-12 19:34:15 UTC
See also: http://www.netbeans.org/servlets/ReadMsg?list=nbusers&msgNo=95463
Comment 3 John Jullion-ceccarelli 2007-07-16 07:42:32 UTC
Reassigning to Patrick.

As I understand, the IDE still does not copy over directories of classes that are on the classpath, correct? Ruth, is
there a wiki page already set up on wiki.netbeans.org covering this that we could point to?
Comment 4 _ rkusterer 2007-07-16 13:05:10 UTC
> As I understand, the IDE still does not copy over directories of classes that are on the classpath, correct? 

I encounter this bug mainly when the antscript comes across non-Java resources (such as native libraries!) anywhere on
the classpath, no matter whether in directories or individually. When you create the dist/lib/ directory manually and
copy the missing resources in, the app works fine (http://www.netbeans.org/issues/show_bug.cgi?id=92925). I haven't
heard a technical explanation yet why the IDE should not be able to copy those files automatically, NetBeans seems to
break Java's promise of being platform-independent...

The un-userfriendly part is, the current Readme basically says "the distribution works, unless when it doesn't." 

Even saying "If the classpath contains a folder of classes or resources, ..." doesn't help: Even if you add resources
individually to the classpath, the product is still not distributable. (Or is there a comma missing before "or resources"?)

It's very untransparent that the dist ant target just bails out silently(!) for an unknown subset of files, and at the
same time, the readme.txt claims that the JAR is ready and works. 

> Ruth, is there a wiki page already set up on wiki.netbeans.org covering this that we could point to?

http://wiki.netbeans.org/wiki/view/FaqpackageAndDistribute
We could add the info here.
Comment 5 Patrick Keegan 2007-08-09 18:16:49 UTC
fixed

New text:
 * Only JAR files are copied to the lib folder.\n\
If the classpath contains other types of files or folders, none of the\n\
 classpath elements are copied to the lib folder. In such a case,\n\
you need to copy the classpath elements to the lib folder manually after the build.\n\

I did not link to the wiki as I don't see what info we could add there that would make things better.

/cvs/java/j2seproject/copylibstask/src/org/netbeans/modules/java/j2seproject/copylibstask/Bundle.properties,v  <-- 
Bundle.properties
new revision: 1.3; previous revision: 1.2
Comment 6 Karthikeyan Rajeswaran 2007-08-09 21:20:23 UTC
Suggested modification to the text (though my suggested text looks too verbose to myself..):
If the classpath contains only jar files, then those jar files will be copied over to dist/lib directory. If the
classpath contains any other type of files, like a directory of class files or images and other resources, then no files
(including the jar files) will be copied over.


Though i had requested the pointer to twiki, i can see both the pros and cons of having such a twiki page. My original
intention for requesting a twiki page was to explain the 'why'. The readme tells what is done by the ide; but why it
does so is not explained. I thought a reference to a page that explained the why would be useful to the users. (The
twiki page can include a link to http://wiki.netbeans.org/wiki/view/FaqpackageAndDistribute but the contents in
FaqpackageAndDistribute is not what i am requesting).

For instance, why are not images copied over? Is it because, we recommend that users put images and other resources as
part of the application jar and access them via getResource(), as java recommends? Also, why are not directories of
classes copied? Is it because apps should preferably be distributed as jars and we would like to enforce that? And what
about .dll and .so library files? In most cases, placing these in dist/lib works fine but why does NetBeans not copy
them? I think a twiki page that is kind of like a FAQ for why NetBeans does what it does would be useful to users.

Comment 7 Karthikeyan Rajeswaran 2007-10-25 00:55:15 UTC
Verified that the README contains the changes.