I am using a software client based on Eclipse (Ganymede) and its all working fine.
However, one small thing would make my world perfect...
In the Eclipse home folder, there is an ini-file. Is there a way to have various ini-files and choose (for example by arguments or environment variables) a specific ini file and create a shortcut for it?
Many thanks,
You can make as many shortcut you want with the:
the eclipse.exe executable
the option --launcher.ini /your/eclipse.ini
See Eclipse Help page on Runtime Options:
--launcher.ini <location> (Executable)
The location of the product .ini file to use.
If not specified the executable will look for a file beside the launcher with the same name and the extension .ini.
(ie eclipse.exe looks for eclipse.ini, product.exe looks for product.ini)
So you can have more than one "eclipse.ini" file: each one will be referenced as an argument within the --launcher.ini option.
The easy way would be to have a shell script (for *nix) or batch file for windows that would simulate the behaviour you want
#!/bin/ksh
echo "first arg is the name of the ini file to use otherwise using default one"
ln -s $1 eclipse.ini
#launch eclipse
Related
I am wondering if there is a command similar to code ., but for eclipse.
I'm using a Windows 10 computer.
Yes, the command line lets you open files using the --launcher.openFile parameter, and I think it prompts you with the "open projects from file system" wizard when you give it a directory. I'm not sure it works as smoothly since Eclipse lets you use the same binary for more than one workspace.
https://wiki.eclipse.org/Eclipse/OpenFileFeature
I'm doing Eclipse plugin development, and i need to find the version of the Eclipse IDE I have currently installed. In stead of opening the IDE, is there any cmd commands that I can execute to find the same?
Something like-
eclipse.exe --version
if that is possible?
Well in Windows I can do:
C:\dev\eclipse>type .eclipseproduct
name=Eclipse Platform
id=org.eclipse.platform
version=4.4.2
Or find the BuildID in config.ini under configuration folder:
C:\dev\eclipse\configuration>type config.ini | findstr /i BuildID
eclipse.buildId=4.4.2.M20150204-1700
(similar can be done in linux/unix with cat and grep of course.)
Blank Build ID/Version
Why your build id is blank is strange, could you upload a screenshot from your help -> about window.
Could you share your eclipse.ini and please refer to the installation bundle that has been used.
Eclipse version/build is based on the product (see your eclipse.ini, org.eclipse.epp.*)
In later versions (for example if using) JEE EPP there should be a file called about.mappings file, e.g.
C:\dev\eclipse\plugins\org.eclipse.epp.package.jee_4.6.2.20161208-0625\about.mappings
# about.mappings
# contains fill-ins for about.properties
# java.io.Properties file (ISO 8859-1 with "\" escapes)
# This file does not need to be translated.
0=MrSimpleMind-Null
1=Neon.2 Release (4.6.2)
I edited the file like shown above and the result below in screenshot:
But this is not the solution of the problem, I would like to know why your values are blank. Do you have conflict in your EPP, try to update your eclipse environment (?)
I recently installed eclipse Luna for Windows 64-bit. I have the ini file customized. Specifically, I have to set the VM path because the reference to Java on the path is for a different JVM that does not work for eclipse.
Every time I close and reopen eclipse, the vm entry in the ini file is removed, so I have to set it all over again and open eclipse. Is there a setting in Luna to change this?
Eclipse itself doesn't do this; there are plugins which sometimes rewrite the ini file to "fix problems" (usually giving Eclipse more memory) and I've seen cases where Eclipse was started with a script that replaced the ini file with a "known good" copy.
In either case, you will have to examine your installation. Use the "About" dialog to find out which plugins are installed and then find out what they are and what they do. One of them is the culprit.
One way to work around the problem is to create a copy of the file as eclipse.config and use a CMD script to start Eclipse. The CMD script should copy eclipse.config to eclipse.ini and then start Eclipse. That way, anyone can change the INI file but it won't matter.
When Eclipse first start, it creates some config files and folders on my hard drive (contains information about work-space ...etc...). I don't like the position it creates config files because config files are all put in my C:\Users\Long folder and that's ugly. I want to put all those config files somewhere else (C:\Eclipse\ for example). This happens in Linux too.
Do you know how to put those files in somewhere else?
Just add the following to your eclipse.ini file (found at the root eclipse installation folder):
-Dosgi.configuration.area=file:/C:/Workspace/.eclipse
To change the default .eclipse folder location, go to ${eclipse.home}, open your eclipse.ini with a text editor and insert there one line more:
-Dosgi.configuration.area=/path_to_new_folder_location/.eclipse/
As someone already said, adding the property -Dosgi.configuration.area in the eclipse.ini file does the trick.
But in my opinion it would be better to rely on the user.home variable and set the destination like for the other variables.
Example with -Dosgi.instance.area.default:
-Dosgi.instance.area.default=#user.home/eclipse-workspace
In my case I just wanted another destination than the default #user.home/.eclipse which was still used by the Eclipse Mars that I keep for old projects and I just defined:
-Dosgi.configuration.area=#user.home/.eclipse-oygen-3
to have a specific destination for the Eclipse Oxygen 3 installation.
Note that syntax works for both Windows and Linux (I did not tested on OSX, but I guess it should).
Eclipse has some command line arguments you can use. One of those arguments is the flag -data which tells Eclipse where the workspace of Eclipse should be located.
So when I create a new workspace, I normally create a shortcut under Windows (or script file under Linux) with the following contents:
eclipse.exe -vm <JDK>\bin\javaw.exe" -data ws -nl en
This defines which JDK should be used, that the workspace is located under ws and that the english locale should be used.
IMHO parameter -configuration does the trick. It must point to a subdirectory named "config". Eclipse will fill this and the upper directory itself with files, e.g. for a JBoss server installation.
If you have more than one eclipse installation, then you should use a different directory for each eclipse installation.
Example how to keep everything in defined places:
"C:\Program Files (x86)\eclipse\eclipse48jee\eclipse.exe" -nl en_US -vm "C:\Program Files (x86)\Java\jdk1.8.0_212\bin" -configuration C:\EclipseData\eclipse48jee\config -data C:\Workspaces\SomeProject
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).