NetBeans 8.2 "portable" not working ( due to absolute paths)

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

NetBeans 8.2 "portable" not working ( due to absolute paths)

Hello folks,

I have reached end of the road; not finding any solution so I am posting here. I am mad 11/10 [Evil or Very Mad]  [Embarassed]

What I try to do:
Run NetBeans 8.2 fully portable. (windows os)

What I did:
I downloaded
NetBeans 8.2 PHP OS Independent Zip/English (en) (122.8 MB)

I unzipped it on my usb drive (with portable jre-8u152-windows-x64 ofc) in folder netbeans-8.2

I read both

and I made a launch batch script:

@start .\netbeans-8.2\bin\netbeans64.exe --userdir .\nbuser --jdkhome .\jre-8u152-windows-x64

Thus the directory structure is:

/ (some root directory on usb drive named like F:/firstroot)
+ netbeans-8.2
+ nbuser
+ jre-8u152-windows-x64
+ *batch script*

So far, so good.
I run the batch script netbeans starts nice and dandy as expected. :D

And here is where trouble starts:
I take usb drive to an other pc / move the directory / etc.
Assume root directory is now S:/somewhere.

I run the batch script and netbeans starts, however it is utterly broken
because it is somehow searching for modules and things on an absolute path seemingly save at the first run
and thus throwing dozens of FileNotFoundException like:

Code: F:\firstroot\netbeans-8.2\ide\modules\org-netbeans-modules-extbrowser.jar (The system cannot find the path specified)

netbeans obviously cannot find anything there at F:\firstroot!
since it is now at S:\somewhere\netbeans-8.2\ide\modules\org-netbeans-modules-extbrowser.jar

So what am I doing wrong here?

Why is netbeans relying on an absolute path waaaaay outside the root directory?
I am passing a specific (the current new) path via --userdir parameter!

Why is netbeans using some old absolute paths from the first run? [Evil or Very Mad]

(There is no path problem with the new path to portable jre-8u152-windows-x64 ... ofc [Rolling Eyes] )

Is it impossible to run netbeans portable the batch script way?

I am unable to find where netbeans stores these (first time) absolute paths,
so I cannot change them (even manually or via script)

Soooo how to make this work? [Question]

What I already tried
Supplying separate --cachedir parameter explicitly => no luck
Supplying new absolute paths in batch script instead of ./ => no luck
Search Google => no luck
Search forums => no luck

Any help / inside greatly appreciated :D