I have removed the .eclipse folder, .p2 and the eclipse folder from user->local. But somehow when I am running eclipse its creating a workspace folder at the predefined location which I defined during first use. Do I also have to remove the gradle folder or How can I remove it completely it's so annoying.
Create one fresh work space, then open the workspce in eclipse it will create the new workspace configuration.
Due to the fact that you can start Eclipse even after deleting the .p2 folder, I conclude that you installed Eclipse as a ZIP package and not via the Eclipse Installer.
The predefined location of the workspace is stored inside the configuration area which is by default the subdirectory configuration of the Eclipse installation directory.
The Eclipse Java IDE uses in addition to the directories already mentioned by you, for Maven the .m2 and for Git the git subdirectories of the user directory by default. Additionally installed plug-ins might have used further directories.
Related
I want to make it so, that when I export my project, Eclipse would create .jar file as well as folders and other files I desire on the same path. I am making a game and I rely a lot on external files, be it animation images or scripts, and it is very annoying copy pasting same stuff over and over again, additionally to making the "run" option not viable.
You can use Eclipse File sync Plugin to solve your problem, basically
this plugin synchronizes your eclipse workspace files to any external
folder you configured:
FileSync plugin for Eclipse is a file synchronisation tool. The main
goal is to keep files outside of Eclipse projects in-sync with Eclipse
project files. The plugin works as builder in Eclipse and will
synchronize all changes on Eclipse project files with mapped external
folders. E.g. if a file is created, changed or deleted in Eclipse,
then the mapped (external) file will be created, changed or deleted
too.
http://marketplace.eclipse.org/content/filesync
I have an Eclipse RCP application that I would like to install a plugin into. I know the plugin works with the application, and with older versions of the application I could just drop the plugin JAR into plugins/ folder and it would be available next time I loaded the application.
However, with the current version, the JAR doesn't seem to get picked up when I put it in the plugins/ folder. I've tried running the application with the --clean flag, but that doesn't help.
How do I tell the application that I want to install the plugin?
Update: Got it working by adding the plugin to the config.ini - I've not needed to do that before, previously it would just be picked up when I placed it in the plugins/ folder. Is there a configuration option that disables the detection of new plugins from the plugins/ folder?
#Fredrik basically says it: You need to put the plugin in the "dropins" folder, the sister directory to the plugins directory. Then restart. I usually run eclipse -clean just to be safe. If there's a problem with the plugin, you will need to using the p2 debugger as mentioned in https://stackoverflow.com/a/12480978/2295812
Got it working by adding the plugin to the config.ini - I've not needed to do that before, previously it would just be picked up when I placed it in the plugins/ folder. Is there a configuration option that disables the detection of new plugins from the plugins/ folder?
I have an android project setup using the maven-android plugin. This plugin adheres to maven output folders for the location of the R.java file (i.e. target/generated-sources/r).
However, when using this project in Eclipse, I can't configure aapt to rely on that folder.
Even if I manually go into the project properties and set up the folders manually, the ADT plugin goes in and resets just some of the settings (i.e. adds the /gen folder back as a source folder, and restores the output folder to /bin/classes instead of /target/classes), while leaving the maven /target/generated-sources/r folder and breaking the build of the project.
I would like to use the default Maven folder structure with the Eclipse ADT. Any ideas on how I can do this?
Thanks
Responding to the comments:
Yes, am using the m2e-android plugin.
Because ADT is still generating R.java in /gen, Eclipse is failing to compile if there still exists an R.java under target/generated-sources/r due to duplicated class definitions.
Unfortunately, the Android Connector for M2E does not support moving generated folders like the ADT gen folder to other directories. This is a restriction of the ADT, although there is a ticket to explore a way around this restriction:
https://github.com/rgladwell/m2e-android/issues/68
If you'd like to stay updated, please comment on this ticket.
This seems to be working for me:
Let the ADT keep gen as a source folder, but change the output folder for that source folder to be /target/classes.
I can build in both eclipse and using maven from the command line, and I don't get duplicate R class problems in either case. Essentially, Eclipse generates the R.java file in /gen, while maven generates it in /target/generated-sources/r, but both builds put the R.class file under /target/classes.
Note: at one point I had added /gen as an additional source directory in my pom.xml using build-helper-maven-plugin, and I had to remove that.
I am now doing a project using Eclipse, and I have some resource files (e.g., image, text) saved in the bin folder, and these files are needed by the program.
However, with every build, Eclipse would try to clean up the folder, then rebuild the project. When cleaning, it deletes the resource files in the folder. Is there anyway to stop Eclipse from doing this?
I know I could change the location of the files, but I am also curious why Eclipse would do this, and could this be prevented from happening.
Thanks!
Go to Options -> Java-> Compiler -> Building and uncheck Scrub output folders when cleaning projects.
That did the trick for me. In my project, I have an Ant task that adds a few configuration resources to the bin folder to include them in the classpath, without having them in src
I can't say exactly why it does it, but probably that's just how Eclipse does the build: empty the "output folder" and start compiling.
That said, if you put your files into a source folder, then Eclipse will simply copy the files over to bin on every build and they won't disappear. It will do this to any file it doesn't know how to compile, e.g. .xml, .xsd, .png, etc.
You can consider using a maven style project and add the resources to the resources folder.
Here is a link to maven directory layout.
What kind of project you are using in eclipse. You can turn off build automatically feature in the Project menu. Which would stop eclipse from cleaning up projects automatically.
Copy and paste your resources into the source folder. In eclipse, in package explorer, find your project, then paste into src. It then gives an option to copy the file or link to it. Click copy and it gets stored in /bin but won't get deleted.
In Eclipse how do I copy the Java Build Path to a different workspace?
Somebody somewhere wrote that if you copy the project then you have copied the build path also. This doesn't seem to be the case.
I've tried copying the entire workspace to a new directory. Opening Eclipse and pointing it to the new directory has all the projects and source files but the build path for my project is empty. It doesn't even have the basic Java source files to build against (java.lang.Object).
Eclipse 3.3.0 (Europa)
Any ideas?
The build path is stored in a file named .classpath in the project's root directory. I don't know of any different way, and copying the directory should also copy that file, of course. How do you copy the project? What OS?
Be very careful...
The workspace itself is just metadata in eclipse that points to your project folders. If the projects are not actually in the workspace directory, you aren't actually copying them, just references to them.
This can happen if you use "Import existing projects into workspace" that are folders in the file system without the "copy into workspace" checkbox checked, or if you create a project using an existing directory.
If you copy that workspace to a different machine, the projecs won't be there.
If you want to share projects, your best bet would be to use source/version control (subversion, for example) and have everyone hook up to the same repository.
Another note on the build paths -- if you have a java project reference an external jar, the absolute path of that jar is stored in the build path. This can be bad if other people who are sharing that project have the jar in a different location on their machine. If this happens, you should look into using Classpath variables or user libraries in eclipse.
Can you comment more on what you're attempting to do when you do the copy?