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 270029 - --cp:p and --cp:a are not useful
Summary: --cp:p and --cp:a are not useful
Status: NEW
Alias: None
Product: platform
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: Dev
Hardware: All All
: P3 normal (vote)
Assignee: Antonin Nebuzelsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-03-09 08:45 UTC by adik
Modified: 2017-03-09 08:49 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description adik 2017-03-09 08:45:52 UTC
I am developing an application on top of NetBeans platform. My application consists of few clusters and I would like to be able to access JARs from one of those clusters when booting. I would like to keep those JARs in lib folder of that clusters in the same manner as the (NB) platform. In order to do that I added those JARs to the classpath by using the --cp:p option.

However, it seems to me that the options --cp:p <classpath> and --cp:a <classpath> are not much useful in reality. The reason is that the <classpath> needs to be an absolute path to the JAR(s) otherwise I am not able to use a common .conf file for both Windows and Linux builds. On Windows the nbexec process uses the application install directory as its working dir and as such a relative path is resolved using app install dir. On the other hand, on Linux the working directory from which was the script app.sh started is used and this can be an arbitrary directory since I can run the app using, e.g., ./bin/app.

Therefore, it would be useful to have a relative classpath path resolved by the launcher using a well known dir, e.g., the app install dir. Or maybe better to be able to use some token to denote that a path should be resolved by the launcher, e.g., using app install dir or directly a cluster dir.
Comment 1 adik 2017-03-09 08:49:41 UTC
As a workaround I am currently copying my JARs into the platform/lib dir which I would like to avoid.