How do I configure the place of the Netbeans .netbeans directory? - netbeans

I want Netbeans 6.1 to store the .netbeans directory in another place than the default. How do I do this?

You can also specify this when you run Netbeans IDE via the command line. This is useful if you want to have different profiles/working environments in the IDE or when you are testing out Netbeans IDE plug-ins. This works from 5.0 to the current version (6.5).
Simply specify "--userdir " on the command line. Example:
netbeans --userdir /local/file/system/netbeans/userdir/6.1

There's config file:
<Netbeans>/etc/netbeans.conf
netbeans_default_userdir=<dir>

Related

Groovydocs on Eclipse

My enviroment:
OSX 10.7.4
Eclipse SDK
Version: 4.2.0
Build id: I20120608-1400
Does anyone know how to generate groovydocs via eclipse? I cant find any plugins to help me generate them. I have Groovy-Eclipse (Required) & Groovy Eclipse SDK (optional) installed.
If you have any solutions, please explain.
You will need to run them from the command line. If you want some amount of Eclipse integration, you can run them as an external tool. You can create an external tool here:
In the dialog that pops up, specify the path to groovydoc. In the argument section, place this (as well as any other options you want):
${folder_prompt:running groovydoc?:/Default/file/path}
This will open a folder prompt with the default file path specified. The choice of folder will be used as the argument to the groovydoc invocation.

GWT_HOME variable setup problems

i installed GWT using Eclipse wizard to be more precise, i followed this tutorial: https://developers.google.com/web-toolkit/usingeclipse?hl=pt-PT
I now have GWT working in my eclipse indigo release. But now i need to define the GWT_HOME variable (ambient variable) so i can run a project using a build file.
Because i installed the gwt plugin with the eclipse wizard, i don't know how to setup the ambient variable, because i can't seem to find the folder where gwt got installed.
I'm using eclipse indigo on windows 7.
Can anybody help me?
Maybe you used the update site for Eclipse 3.6 instead of 3.7
This one should be the correct one for Indigo: http://dl.google.com/eclipse/plugin/3.7
When you have installed GWT like described here you just go into:
Eclipse > Preferences > Window Builder GWT and in GWT_HOME variable you click Browse and select the gwt folder inside your Eclipse plugin directory.
(For example:
.../eclipse-modeling-indigo-sr2-64/plugins/com.google.gwt.eclipse.sdkbundle_2.4.0.v201205091048-rel-r37/gwt-2.4.0/
)
You can also check the correct path under:
Eclipse > Preferences > Google > Web Toolkit
Regards,
Fachexot
I ran into the same problem on Linux running ant from the command line.
I got around the problem by running ant as:
ant -Dgwt.sdk=$GWT_HOME war
FYI the line:
is in build.xml.
I believe name property is not the way to set gwt.sdk variable. I.e., the problem is with:
Behdad
I am using Indigo 3.7, I could not find Eclipse > Preferences > Window Builder GWT (as suggested by fachexot), but I found that if I set the environment variable GWT_HOME in Windows 7 my ant would be able to use the value.
To set the environment variable, in Windows 7, type "environment" in the search box of "Start" and then click "Edit environment variables for your account", and then "New" a "User variable" called "GWT_HOME" (you have first look up the exact path to GWT folder inside your Eclipse plugin directory).
After that, remember to restart eclipse so that the new environment can be picked up by the program.
On Mac OSX, if you want to access the variable from an ANT build as ${env.GWT_HOME} run from within Eclipse or some other IDE then you need to use launchctl as envoronment variables set per normal in NIX envoronments is not passed to OSX windows apps.
The simplest way to do this is add the following 2 lines to your .bashrc (replacing the path shown with the correct one for your install):
export GWT_HOME=${HOME}/.p2/pool/plugins/com.google.gwt.eclipse.sdkbundle_2.7.0/gwt-2.7.0
launchctl setenv GWT_HOME $GWT_HOME

Enterprise Configuration of Workspace mechanic

I am using Google's Workspace Mechanic to configure my eclipse environment. All seems to work fine, except that for any fresh installation, the workspace mechanic opens up with a default location of its own (~/.eclipse/mechanic) to look for preference files.
As given in their documentation i tried including their code
(/instance/com.google.eclipse.mechanic/mechanicSourceDirectories=/shared/eclipse/tasks\:${user_homedir}/.eclipse/mechanic)
in my plugin_customization.ini , but it does not work for me.
Does anyone have any other idea as to how to achieve this?
Quite late, but I just needed the same configuration.
First locate your plugin_customization.ini (eg. 'find -name plugin_customization.ini' in your eclipse folder).
I had two files with same name, located in org.eclipse.platform and org.eclipse.epp.package.jee.
For me, the jee one was relevant and you can configure it as JSON Array.
com.google.eclipse.mechanic/mechanicSourceDirectories=["http\://server/mechanics/tasks.json","/tmp"]
This example shows how to configure a folder (/tmp) and via http location.
Under Windows, I found that when using the recent Eclipse Juno and the latest Workspace Mechanic I had to do the following:
Edit the (Java EE):
...\Eclipse_Juno_SR1\plugins\org.eclipse.epp.package.jee_1.5.1.20120828-0743\plugin_customization.ini
and add the following line at the end:
com.google.eclipse.mechanic/mechanicSourceDirectories=c:\\...\\eclipse_extensions\\WorkspaceMechanics
in order for the plugin to recognize the above directory as the shared folder...
The plugin preferences now correctly references the folder !
The documentation is for Eclipse on Linux/Unix. If you are running Eclipse on Windows you will need a different path.
Another aproch is to put the preferencces in another file and point to that file from your eclipse.ini with a line such as
-Declipse.pluginCustomization=/var/wsm/current/my.properties
or eclipse startup with
eclipse -pluginCustomization /var/wsm/current/my.properties
The following worked for me (for Eclipse Luna in Windows).
Open the Luna/plugins folder
Search for a folder that begins with org.eclipse.epp.package.
(and I ended up with org.eclipse.epp.package.java_4.4.1.20140925-1820)
Go inside that folder and edit plugin_customization.ini
Append the following at the end (to point to \\sharedserver\share\DEV\Workspace-Prefs-Luna):
#Workspace Mechanic Settings
com.google.eclipse.mechanic/mechanicSourceDirectories=\\\\\sharedserver\\share\\DEV\\Workspace-Prefs-Luna
Save and Close the file
Restart Eclipse

Is it possible to add external command line tools to Netbeans?

Is it possible to use external command line tools in Netbeans?
Thank you.
After searching and searching and searching, this feature is just missing in netbeans although it would absolutely straightforward to implement and has been ask by user for 2 more than years...
Regards,
Stéphane
There is a Terminal window in NetBeans 7:
Open the menu, Window -> Output -> Terminal
What about using an Ant target? Ant files are quite comfortable to run from Netbeans.
<exec executable="${executable-full-path}" ...
The best option I've found is to use jmarsault's plugin that he calls NetBeans Command Shortcuts. This give you an icon in the command line where you can add command and terminal scripts to run. The display shows in the output window.
Installation files are available here and he has kept it up to date with the newest versions of NetBeans.
NetBeans Command Shortcut plugin
Installation:
Download the .nbm file for your version of NetBeans
Open Tools / Plugins / Downloaded / Add Plugins...
Select the .nbm file and allow the installation of the plugin.
In since at least version 9.0, there are two decent options:
Just create a script file. (I think you need the C++ plugin for this. Otherwise you have to create it outside NetBeans or as a text file.) In my case I created a JLinkGDBServer.sh that just executes JLinkGDBServer as a prerequisite to start an embedded debug session. This automatically sends the executable's output to a NetBeans terminal.
Add a tool to Tools/Options/Miscellaneous/SendTo. SendTo is a pop-up menu item for certain project entities, for example files but not the project. In my case, I could add a SendTo running the executable and use it by right-clicking on for example the .elf file (although for the GDB server I don't need any file name as an argument).

Installing a plain plugin jar in Eclipse 3.5

Since Eclipse 3.5 there seems to be no option to have drop a plugin jar ( not a feature ) in the Eclipse base directory and have it picked up at next startup.
Is there any possiblity to have plain plugins jars installed in Eclipse 3.5?
Since the advent of p2, you should be using the dropins directory instead.
To be completely clear create "plugins" under "/dropins"
and make sure to restart eclipse with the "-clean" option.
Simplest way - just put in the Eclipse plugins folder. You can start Eclipse with the -clean option to make sure Eclipse cleans its' plugins cache and sees the new plugin.
In general, it is far more recommended to install plugins using proper update sites.
For Eclipse Mars (I've just verified that) you to do this (assuming that C:\eclipseMarsEE is root folder of your Eclipse):
Add plugins folder to C:\eclipseMarsEE\dropins so that it looks like:
C:\eclipseMarsEE\dropins\plugins
Then add plugin you want to install into that folder:
C:\eclipseMarsEE\dropins\plugins\someplugin.jar
Start Eclipse with clean option.
If you are using shortcut on desktop then just right click on Eclipse
icon > Properties and in Target
field add: -clean like this: C:\eclipseMarsEE\eclipse.exe -clean
Start Eclipse and verify that your plugin works.
Remove -clean option from Target field.
go to Help -> Install New Software... -> Add -> Archive.... Done.
in Eclipse 4.4.1
copy jar in "C:\eclipse\plugins"
edit file "C:\eclipse\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info"
add jar info.
example:
com.soft4soft.resort.jdt,2.4.4,file:plugins\com.soft4soft.resort.jdt_2.4.4.jar,4,false
restart Eclipse.
This is how you can go about it:
Close Eclipse
Download a jar plugin (let's assume its testNG.jar)
Copy testNG.jar to a certain folder (say C:\Project\resources\plugins)
In your Eclipse installation folder, there is a folder named dropins (could be C:\eclipse\dropins), create a .link file in that folder, (like plugins.link)
Open this file with any text editor and enter this one line:
path=C:/Project/resources/plugins
Save the file and start Eclipse.
And you are good to go!
Please do not forget to change your backward slashes in your plugins folder path to forward slashes on step 5. I used to forget and it would take my time unnecessarily.