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.
Some applications require extra system variables to be set (such as LD_LIBRARY_PATH). Debugger does not allow to set them. It is not be problem for most system variables because: - on MS Windows, system variables are available to all executed applications - on Unix systems, if a variable is exported in a shell, it is available to all applications started from the shell and its subshells BUT: JVM changes values of some system variables (e.g. LD_LIBRARY_PATH) so original values (values before NetBeans/FFJ was executed) of such variables is not available to the applications started from NB/FFJ.
Required changes: - UI - modify org.netbeans.modules.debugger.jpda.Launcher (find string "debuggerProcess.exec")
Target milestone was changed from '3.4' to TBD.
The debugger is launched from an ANT script now. The possibility to define environment variables needs to be explored and possibly added into UI.
I order for me to define LD_LIBRARY_PATH with netbeans 4.1, I had to edit my project's build.xml and override the following targets (at the bottom of the file, just before </project>) : <target xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" name="run" depends="init,compile" description="Run a main class."> <j2seproject1:java> <customize> <env key="LD_LIBRARY_PATH" path="${application.env}"/> <arg line="${application.args}"/> </customize> </j2seproject1:java> </target> <target xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" name="-debug-start-debuggee" depends="init,compile"> <j2seproject2:debug> <customize> <env key="LD_LIBRARY_PATH" path="${application.env}"/> <arg line="${application.args}"/> </customize> </j2seproject2:debug> </target> <target xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" name="-debug-start-debuggee-single" if="netbeans.home" depends="init,compile-single"> <fail unless="debug.class">Must select one file in the IDE or set debug.class</fail> <j2seproject2:debug classname="${debug.class}"> <customize> <env key="LD_LIBRARY_PATH" path="${application.env}"/> </customize> </j2seproject2:debug> </target> And then, in private.properties, I define application.env to be my LD_LIBRARY_PATH value. It would be nice to have UI support for this, as it is very common on Unix/Linux to need to set this env var. (java.library.path only works for the first level o libraries invoked from java. If a shared object in turn depends on another shared object, the LD_LIBRARY_PATH needs to be defined). /jm
I am raising the priority of this bug, because I'll never be able to convince the other 40 Eclipse developers to switch to Netbeans if something this basic cannot be done through the GUI. (There are just 2 netbeans developers right now...) As a work around, the stock project file "build-impl.xml" could be modified as my attachment demonstrates to make it easy to define a LD_LIBRARY_PATH variable in the private.properties file (just add application.env.ldlibrarypath)
Created attachment 25884 [details] build-impl.xml changes to support definition of LD_LIBRARY_PATH
*** This issue has been marked as a duplicate of 47511 ***
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.