I have a Plugin that has p2.inf file in META-INF. This single p2.inf file works when I get a RCP product via eclipse product export wizard. Now I want other p2.inf files in other Plugins.
I put a new p2.inf file in another plugin's META-INF directory. I made it available in exported product by selecting it in build.properties file...
For experimenting I put another p2.inf file near MyRCP.product file and again I selected this new p2.inf file under bin.includes section of build.properties file.
But I cannot make other p2.inf files work? How can I have multiple p2.inf files under different plugins work ?
After an export only one p2.inf file runs which copies a folder. But other p2.inf files that update the myrcp.ini via command .p2.touchpoint.eclipse.addProgramArg and ...removeProgramArg does not work. (Why only one p2.inf file works and why the same p2.inf file is executed always ?)
Related
I have dynamic web project in eclipse. I set my default output folders (my class files) to be in WebContent/WEB-INF/classes. I have another files in this folder like .properties and .xml files. The problem is when eclipse make clean or new compile or I dont know exactly but sometimes it delete all the files from this directory. Do u know how to set eclipse to delete only the class files and never touch the other ones?
put your .properties , .xml files in source folder of your web project and not in classes folder. doing this way, eclipse will directly copy those files from source folder to classes folder after a build.
I'm trying to export a plug-in into a jar. In this jar file I would like to include an extra file placed in the bin\com.example.myapp. This file is generated during compilation, but it's not copied automatically into the jar file when exporting the plug-in.
To include the file I selected the file in the Build Configuration tab for plugin.xml file. Thus, the following build.properties is created:
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
bin/com/example/myapp/myfile.bin
jre.compilation.profile = JavaSE-1.7
This works partially, because even though myfile.bin is included into the exported jar file, it is placed in "bin/com/example/myapp/myfile.bin" whereas I would like to be placed as "com/example/myapp/myfile.bin", without the initial "bin" folder. Is there a way to achieve that result?
You can change the bin output folder but I think it will apply to ALL files, not just one :
Right click on your project and select Properties. And then click on Java Build Path. On the right side you can see the tabs Source, Projects, Libraries,...
Click on Source. Check the Default output folder:. There you can browse and select the different folder you want.
I want to place .html files in the same package with .java files under /src/main/java but when creating new .html file Eclipse offers /webapp as the default folder. Is there any way to change this behavior?
The default is to offer to place it in a folder that will be deployable to the server and readable by clients. You're still able to pick another folder, aren't you?
I like to put my Wicket HTML files in the /src/main/resources folder. Then I mark that folder as 'source folder' in Eclipse (Project Buildpath).
So that, I have the HTML separated from the java files, but they will be packed together (both with Eclipse and Maven).
As this documentation says, "For example if you place this jndi.properties file on your classpath", but how can I place the .properties file on my classpath if I am using Eclipse?
Just to add. If you right-click on an eclipse project and select Properties, select the Java Build Path link on the left. Then select the Source Tab. You'll see a list of all the java source folders. You can even add your own. By default the {project}/src folder is the classpath folder.
One option is to place your properties file in the src/ directory of your project. This will copy it to the "classes" (along with your .class files) at build time. I often do this for web projects.
This might not be the most useful answer, more of an addendum, but the above answer (from greenkode) confused me for all of 10 seconds.
"Add Folder" only lets you see folders that are the sub-folders of the project whose build path you are looking at.
The "Link Source" button in the above image would be called "Add External Folder" in an ideal world.
I had to make a properties file that is to be shared between multiple projects, and by keeping the properties file in an external folder, I am able to have only one, instead of having a copy in each project.
Well one of the option is to goto your workspace, your project folder, then bin copy and paste the log4j properites file.
it would be better to paste the file also in source folder.
Now you may want to know from where to get this file, download smslib, then extract it, then smslib->misc->log4j sample configuration -> log4j here you go.
This what helped,me so just wanted to know.
Copy the file into your src folder. Go to the Project Explorer in Eclipse, Right-click on your project, and click on "Refresh". The file should appear on the Project Explorer pane as well.
Suppose I extracted a Java project from a tar archive. How do I add it to Eclipse (Indigo)?
In the past when I have had to so something like this, I simply created a new Eclipse project with the same name and manually copied all the .java files into the proper folder down at workspace/projectName/src/topDomain/companyDomain/packageName.
Is there a better way?
File - Import... - Existing project into workspace.
This supposes that the tar archive contains the whole project, including the .project and .classpath files.
If it doesn't, then either make a new project where you want, and copy the source files, or create a project and specify that its location must be the directory containing the sources folder that you extracted from the tar.