X

Geertjan's Blog

  • March 4, 2009

Passing etc/netbeans.conf as VM Options

Geertjan Wielenga
Product Manager
In situations where there is no access to etc/netbeans.conf, you can pass in those settings via VM options:

-Dnetbeans.user="/home/geertjan/foo/bar"

Then the user directory, in this case, will be created in the specified location. Now to figure out what the VM option for the installation directory is (probably -Dnetbeans.home). In case you're wondering, I'm trying to figure out how to start a NetBeans Platform application from a different IDE, which means that somehow settings such as netbeans.user need to be made available even though etc/netbeans.conf isn't.

Join the discussion

Comments ( 4 )
  • Jesse Glick Wednesday, March 4, 2009

    Something wrong with --userdir?


  • Geertjan Wednesday, March 4, 2009

    Where would I set that if I'm deploying from Eclipse or IDEA?


  • Jesse Glick Wednesday, March 4, 2009

    Well best is to launch nbexec, which takes care of all these things. That is what run.xml in the standard build harness does. If you really must invoke the Java launcher directly, then you will need to reverse engineer nbexec to see what arguments it is passing.


  • Tom Wheeler Wednesday, March 4, 2009

    Note that you can see what arguments it is passing by running the application from Ant (inside NetBeans or from a shell) and then looking at the output. The arguments are listed there just after "Input arguments" towards the end of the output.

    Different people on our team prefer different IDEs. We develop and run platform applications under Eclipse and IntelliJ in addition to NetBeans. It's really no big deal, though as you'd guess, Eclipse and IntelliJ have no wizards for creating TopComponents, new file types and so on.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.