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.
In order to allow an installer to create the module system caches for shared installation, it is useful to eliminate the absolute paths that are stored in there. Right now the absolute paths seem to be used in all-locales.dat, all-layers.dat and all-resources.dat
Created attachment 116024 [details] Test and elimination of the absolute paths from localeVariants
Created attachment 116063 [details] A NetBeans IDE installation can be moved to different folder and still previous caches work
ergonomics#d102329cd227
Integrated into 'main-golden', will be available in build *201203010400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/d102329cd227 User: Jaroslav Tulach <jtulach@netbeans.org> Log: #208749: Absolute paths are eliminated from NetBeans caches
*** Bug 209937 has been marked as a duplicate of this bug. ***
(In reply to comment #2) > Created attachment 116063 [details] > A NetBeans IDE installation can be moved to different folder and still previous > caches work Should this be fixed for other NetBeans Platform-based applications (other than the NetBeans IDE) as of NBP RELEASE73-BETA2 (maven) ? I can indeed move the IDE, but we see our own application falling appart (our functionality missing, numerous ClassNotFoundException's in log, e.g. for all our actions) when we move the unpacked application to another folder after the profile has been created. Grep shows absolute path to installation appears in binary cache files all-files.dat, all-layers.dat, all-manifests.dat, all-resources.dat and localeVariants (though the context in which they appear is unknown to me). Removing var/cache solves the problem. Moving back to previous location also solves the problem. We tried platform RELEASE72, RELEASE721 and RELEASE73-BETA2, but no luck with either.
This does not seem to be completely fixed for NB Platform 7.3 applications other than perhaps NB IDE. The Product field says "platform", so I assume it should work for all platform applications - hence the reopen. I'm attaching a simple application written for another bug report - its function is completely irrelevant here. Steps to reproduce problem: 1) Ensure ~/.iconchange folder does not exist 2) Unpack, build with maven, unzip application/target/iconchange-app-1.0-SNAPSHOT.zip to somewhere, cd to there 3) cd iconchange/bin 4) ./iconchage 5) application will open, there will be 2 top comps on left and a greenish action button in the toolbar, what it does is irrelevant 6) close the application, you should now have its profile at ~/.iconchange 7) cd ../.. 8) mv iconchange ic 9) cd ic/bin 10) ./iconchage Application will open but top components will no longer be open and the action will have disappeared. Renaming the folder back to "iconchange" solves the problem. Attachment will follow.
Created attachment 132000 [details] sample code for comment 7
To debug and see what goes wrong, please breakpoint to method's org.netbeans.Stamps.produceRelativePath last line: doWritePath("abs", path, out); // NOI18N When the breakpoint is hit, the caches are going to contain absolute path.
At the moment of hitting the brkpoint the System.getProperty("netbeans.home") is: "/home/jarda/tmp/208749/relocateApp/ic/ic/platform" while the netbeans.dirs contain: "./ic/bin/../platform" "./ic/bin/../iconchange" means the platform cluster is there twice. It should not - at least in case of NetBeans IDE, platform cluster is not listed in netbeans.dirs.
I believe this is flaw of launcher. When I check (for example in org.netbeans.MainImpl's append_jars_to_cp), all the paths are absolute. However in case of here in provided application they are relative. Can the application launcher be updated to use absolute, normalized paths as well?
http://hg.netbeans.org/core-main/rev/0a3aa741beb4
Integrated into 'main-golden', will be available in build *201304172301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0a3aa741beb4 User: Jiri Rechtacek <jrechtacek@netbeans.org> Log: #208749 - Module system caches use absolute paths
*** Bug 227219 has been marked as a duplicate of this bug. ***
Moving the installation worked for me using the latest dev build of NBP, thanks! Is any reasonable workaround possible when still using NBP 7.3.1 ?