I have an eclipse project. By default, my .class files are being put here:
/projectname/build/classes
is there a way I can have eclipse also copy those files to an additional folder destination, every time the project is built?
I could write a script to do this myself, but was hoping there was some kind of hook in eclipse to do this.
Thanks
You could write an Ant script for this and add it as a builder to your project. See the Eclipse documentation for an example.
Eclipse doesn't have the native ability to output to multiple locations, but you can probably accomplish it yourself by adding a custom builder to your project(s).
Related
I have two projects in eclipse. I know how to create a jar file for each project individually, however I want to combine the two jar files again and create another jar from them? Ideally I would like to script it and automate it. Any help will be highly appreciated. If there is any example online, I will appreciate if you could share it.
You could have one project depend on the other, and use the maven-shade-plugin to build an uber-jar of the second project (thus containing the classes of the first project). You need to use Maven or other build tools for this to work though.
I have managed to solve this problem. I used the Maven one jar plugin.
I am new to the scala eclipse environment and also new to typesafe/activator.
I need to modify some of the activator initialization code because of some very specific host-side dependencies.
I cannot see how to "import" the actual jar files into eclipse. I know exactly what I need to change and how (via manually opening the jar and looking at the code). But I want to maintain complete integrity with the change management (ivy and sbt) but I do understand how to do this.
Is there some basic way to pull in/open a source jar, modify it, and build/deploy it? I see lots of help on the export/build, but I need help with the open/import/modify portion of this task.
Thanks for your kind help.
Typically if you wanted to change how a project works you'd go back to the source repository (in Activator's case https://github.com/typesafehub/activator ) and modify from there and then rebuild. Source jars don't have the build configuration so they are not useful for creating new binaries. Usually source jars are used to show source in a debugger or to click on a type in the IDE and see the source code for that type.
My dream when using the Eclipse IDE is to have my .java files obfuscated and exported to a .jar file automatically.
At the moment, I use two applications to repetitively perform my obfuscation and jar exportation, and it really is a pain!!!
If I'm correct, the only way to do this is to create my own Ant Task - if this is the case, may you guide me step by step on how to create this Ant Task?
Thank you gurus, I will soon be able to rest my hands for just that little bit longer!
Excelsior Jet has a Eclipse plugin.
Proguard has ant tasks.
I'm using NetBeans to develop J2EE web service.
NetBeans create a directory called nbproject inside my project directory.
I'm wondering if I should put this directory under source control. I think it is required to build the project without NetBeans.
This is usually not required. Think of it this way: If I was to check out your project but happened to be using a different IDE, I would not require your nbproject directory. In other words: This directory is machine specific, not project specific. Hope this helps.
The nbProject folder contains all the netbeans metadata about your project. When you go Project -> properties all the settings (and others) that you find there are stored in the nbProjects folder.
EDIT:
This has been answered in another question, and the answer there is more complete and accurate
In short you should include nbproject, but not nbproject/private
If you are building your project with Maven or Gradle you should definitely exclude the folder from the VCS.
i have successfully configured sphinx4 with eclipse.
for that these steps i have used.
copy my java and config files to SRC folder
all the necessary jar files (in the lib). the lib folder added to the root of the project
build those jar files (jsapi files too)
change the configuration file and give the proper path
test the java file
but in Netbeans i really dont understand how to do the proper steps. can someone help me. the jar files should be added to "Libraries" rite.
then after adding them how to build them.
in the netbeans it dont show a SRC folder. so all the java files and configuration files should go to Source Packages folder rite.
can someone help me with this. please
If you have sphinx4-1.0beta6 then you can just open the folder up as a netbeans project. Open netbeans, click open project, then navigate to the sphinx folder and open it. It is already a netbeans project file type as of this version. I assume this will work in later versions also. I have no clue why sphinx doesn't say this on their website.
Sphinx4 is a Java library available in OSS repository, so you can use it as any library.
If your project uses maven/gradle, add repository in your project configuration, then add dependency on two packages - sphinx4 core and sphinx4-data. The former is the main library, the latter is required if you want to recognize US English. Then just start writing the code.
If you want to rely on jar files, just download sphinx4-core and sphinx4-data files from the repository and add them as dependency to the project, then start writing code.
If you want to modify or develop sphinx4 itself, install Gradle support in your IDE, then import latest sphinx4 sources as a Gradle project.
For more details and links see the tutorial
http://cmusphinx.sourceforge.net/wiki/tutorialsphinx4
click on Add JAR/Folder
select jar file you want to add