zzzyxwvut commented on issue #4393:
URL: https://github.com/apache/netbeans/issues/4393#issuecomment-1190824728

   The property `cnd.tmpbase` comes from pre-`Apache` releases
   (see [this](https://bz.apache.org/netbeans/show_bug.cgi?id=216366) and [its 
introduction](http://source.apidesign.org/hg/netbeans/releases/rev/469aedac842d)
 and [that](https://bz.apache.org/netbeans/show_bug.cgi?id=225920)); so 
reliance on it
   is admissible on `*nix` hosts.
   
   In fact, its value is still tested, if defined, _otherwise_
   `java.io.tmpdir` is tried, while host-related information is
   being collected in order to create a 
[`HostInfo`](https://github.com/apache/netbeans/blob/master/ide/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/api/HostInfo.java)
 instance.
   See 
[`UnixHostInfoProvider`](https://github.com/apache/netbeans/blob/master/ide/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/support/hostinfo/impl/UnixHostInfoProvider.java),
 a member of an `Apache NetBeans` 14
   module `org.netbeans.modules.dlight.nativeexecution`.
   
   It could be corroborated as follows. Launch `Apache NetBeans`
   14 with these defined properties:
   `-J-Dnativeexecution.support.logger.level=0`
   `-J-Dcnd.tmpbase=/dev/null`
   `-J-Djava.io.tmpdir=/path/to/new/dir`
   (Substitute the actual path to the newly-created directory
   for `/path/to/new/dir`.)
   
   Go Window -> IDE Tools -> Terminal
   
   Expect the following Error 
[notification](https://github.com/apache/netbeans/blob/master/ide/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/support/hostinfo/impl/Bundle.properties):
   > Failed to use /dev/null as a temporary directory on localhost.
   >  Please, run IDE with -J-Dcnd.tmpbase="other base location" flag to 
specify 
   >  a directory on a remote host where you have enough space and write 
and execute permissions.
   
   (However, `netbeans/ide/bin/nativeexecution/hostinfo.sh`
   would still fall back to probe `/tmp` and try to make a few
   ``/tmp/dlight_`logname`*`` directories.)
   
   ------------------------------------------------------------
   
   Looking at diffs for `NativeLibraryLoader` of 
[`junixsocket`](https://github.com/kohlschutter/junixsocket),
   version `2.2.1` and version `2.4.0`, there are [_no_ 
changes](https://github.com/kohlschutter/junixsocket/compare/junixsocket-parent-2.2.1...junixsocket-parent-2.4.0#diff-72a326e132770acdb4cc0a74ed76a24961962a984e03eb3e31b67b4ea4e6ce0a)
   touching `org.newsclub.net.unix.library.tmpdir`.
   
   ------------------------------------------------------------
   
   Looking at the history of [`jsch`](https://github.com/mwiede/jsch) in 
general, curiously,
   the project acquired an _optional_ dependency on `junixsocket`
   near the 
[`jsch-0.1.66`](https://github.com/mwiede/jsch/commit/90a711bfe533e8b483a6617b37f5a9fbd1204820#diff-cbb4d01f335561954103058449dab5622c438352af2477cf0d797cf1a7ff4a82)
 tagged release, which falls within for
   
[transition](https://github.com/apache/netbeans/commit/13458c81591a3e0551af8eb28f271de9fbba9777)
 of this project from `jsch-0.1.55` to `jsch-0.1.72`.
   
   Methods of 
[`JUnixSocketFactory`](https://github.com/mwiede/jsch/blob/8251681e6b87a102f512e00ae5b698e54d6f80d7/src/main/java/com/jcraft/jsch/JUnixSocketFactory.java)
 fire up a chain of
   constructors and class initialisation for `junixsocket`
   classes:
   `AFUNIXSocketAddress` -> `AFSocketAddress` ->
   `NativeUnixSocket` -> `NativeLibraryLoader`.
   
   Now look closely at the top frames in stack traces above.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@netbeans.apache.org
For additional commands, e-mail: notifications-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to