How to automatically create jar in JBuilder - java

Have a project developed in JBuilder 2007.
I can create a jar with the compiled classes and resources by right-clicking on the project in Package Explorer and selecting Export, but is there a way to set-up the project to automatically generate the jar file, whenever the source changes ?

Ant ! Here's a link with a great example involving jbuilder. Once your ant file is completed, you jsut run it. It will do the same thing as an export. Want any more help ?

Related

How can I include other downloaded packages in eclipse

I've found Javaluator, and it looks like something I'd like to use in my java project. When I go to the downloads page, there are 2 options, maven or a zip folder containing lots of .JAR files. I'm very new to eclipse and java programming as a whole, and was wondering how I could sort of "Import" or include them in my project. Any help appriciated, thanks!
Follow the below steps to add externally downloaded java packages(JAR) file to an Eclipse Project.
Right click on your project.
Select Build Path.
Click on Configure Build Path.
Click on Libraries and select Add External JARs.
Select the jar file from the required folder.
Click and Apply and Ok.
All done.

eclipse doesn't see java file generated during installation of maven module

I am working on a specific maven module. I have it imported into eclipse by m2eclipse plugin. The module uses our internal plugin to generate java files from some csv files. During install goal those files are being generated and put to target/generated-sources/folder_name.
Can you tell me how I can import these java files into eclipse so it stops showing me compilation errors saying that 'x' cannot be resolved to a type?
Now every module which uses those files has compilations errors in eclipse, everything works fine when I try to build from command line.
Thanks in advance.
UPDATE: Thanks a lot guys, I was trying similar solution but instead of adding source folder I was trying to add external classes :|
project -> properties -> java build path -> source -> add folder -> (search for target/generated-sources/folder_name, create it if deleted by maven) -> ok
now eclipse will only complain when you'll use mvn clean deleting target folder.
Eclipse refreshes file content on request, so any change made external to eclipse, eclipse doesn't know about that
You can make eclipse to use native hooks to detect external changes
preference > workspace > check refresh using native hooks
and add that directory to source path
You probably need to add the folder of the generated files as a Source folder in the project. Look in the Project Properties > Java Build Path > Source tab and add the folder.

How to include maven built library into your project in eclipse?

I am a novice and don't have much idea. So I have a library that is built with Maven and I want to include this library in my java project in Eclipse, how do I do this? I am using Eclipse juno on MacOSx. I want to run one of the modules in this library, so the source code is provided for this module but how do i run this?
If you are not using maven, you have to download the jar and the sources of that jar (In your case, you can download the zip file provided on the website you mention : http://code.google.com/p/cleartk/downloads/list ) and put it somewhere on your computer.
Then you have to set the build path of your project in Eclipse :
Right-click on your project -> Properties -> Java Build Path
Then you can click on the Libraries tab and Add External Jars so you can point to the jar you downloaded.
In this tab, you can attach the sources of this jar to have access to the source code in Eclipse (and eventually set breakpoint).

Deploy Eclipse 4.1 Project

I have create a simple program using Eclipse 4.1.. I wanted to build or deploy my project into a .jar. I also added external libraries in my project. I wanted the output same as in Netbeans with the .jar file and lib folder in the dist folder, but there should be also a folder named help and lang.. How can I do this with eclipse?!
Follow the steps provided here.
Or if you don't want to complex things up, select Runnable JAR file instead of JAR file set the directory where the .jar is to be written then click Finish.
Eclipse will create the [Project Name]_lib directory for the external libraries included in the project.

NetBeans & Executable JARs

New to NetBeans dev here. When I first created my project and began compiling, I noticed that NetBeans had automatically created a dist/ directory under my project root and was creating an Executable JAR in that directory.
I've now been developing for several weeks, and added many resource files to my project, including a system log file, an embedded SQLite database, and several properties files. These are files that my program (a Swing app) needs to read/write from at runtime in order to function correctly.
I just noticed this morning that the Executable JAR in my dist/ directory is several weeks old, and that compiling my project doesn't update it. I am wondering if that's because there are now all these new resource files and NetBeans doesn't know how/where to package them for the automatically-created Executable JAR.
Does this mean that I'll have to tweak the build.xml myself? Or is there a NetBeans dialog I can get to where I can specify where to pacakge everything? And if NetBeans should be doing this automatically, what could be the reason that it stopped creating the JAR for me, and what can I do to force this functionality again?
I went into Project Properties >> Packaging and made sure that the JAR file directory was still dist/MyProgram.jar and that the checkbox Build JAR after compiling was still checked, so obviously something else is either breaking the build or messing with NB.
Thanks for any tips!
If "Compile on Save" is enabled, then your .jar file will only be generated when you do a "Clean & Build" (Just "Build" is not available when "Compile on Save" is enabled)
You need to Clean and Build within netbeans to update the file within your /dist directory.
I use Netbeans 7.0 and this solution works for me.

Categories

Resources