In a talend job, how can I add a dependent jar file? - jar

I want to make use of the utility methods from a jar file, in my talend job routines. How can add this jar as dependent to my current job?

Try using the tLibraryLoad component - it lets you load a jar file so you can add it in the beginning of your job and the library will be available thereafter.

tLoadLibrary will work, or you can also add dependencies to a job by right-clicking on the job in the repository too.

Related

Qt way to get libraries path

I have several QPlugins (shared objects) that I install {CMAKE_PREFIX}/lib/<appname>, how can I find out this path at runtime to load the plugins? Note that the CMAKE_PREFIX user user settable.
If these plugins are part of your application project and you are looking for a build time answer, you can generate a config.h file containing that path.
You can use CMake's configure_file command for that.

Pentaho Kettle - Conversion of a job to jar file

Is it possible to convert a pentaho job to jar file? if it so please tel me how? i tried to convert a job to jar but failed due to the class problems.
In JAR, we aggregate many Java class files. But in PDI Jobs, the files are in XML files. Pentaho uses its DI Engine to read these XML files. Hence we cannot create JAR files out of an XML file.
You can run an ETL job from java code, using kettle's api. You can't convert a job into a jar.
If you launch a job or a transformation in batch mode, you have to use the scripts kitchen or pan (with sh or bat extension dopending on the OS). Actually those scripts run a java program inside, using the parameters that you pass to it. One of the parameters has to be the path of the file .Kjb (extension of a job), which is a regular xml file. So the xml files are necessary, but you can launch directly the java command (the one inside of the sh/bat script) passing the required paramenters to it. To see which parameters it needs you will have to do a reverse engineering work on the kitchen/pan script, which are really simple and short inside.

Want to Make a Jar file

I've made a java application(it extends JPanel) and want to make it into a jar file.I have BlueJ and I used it to do so but after I make the jar file it doesn't open. Can anyone help?
Jar files are PKZIP packaged files which have specific folder structure and convention in it. It contains the compiled version of your java sources (*.java -> *.class) plus meta data. You can "open" it with any archive which can handle zip files especially if you append the ".zip" extension to the file name.
If you mean executing your jar by "opening" it, that's a different thing. You have to have a standard static main method in one of your classes so the JVM can find the execution entrance point. If you have that you can say "java -jar yourjarfile.jar", which will execute your class starting from your main. Note, that I assume that you have JVM setup well (I guess you have) and your environment variables should be configured too. In most cases, your jar refers to other jar files. You can provide access for those for the JVM through classpath.
Do you use Eclipse to write code? If you do, then it is easy to use Eclipse to create an executable jarfile.
Do you use a JFrame to present your JPanel? If you do not, you may have a JFrame, it is the "application window" where the JPanel will be presented.
JFrame tutorial:
http://docs.oracle.com/javase/tutorial/uiswing/components/frame.html
/Johan

How to add a jar library into another jar library

i am doing a java library that is using jaybird jar.
I want my library to be a jar with the jaybird in it so when I have to use it, I only import my jar.
How can this be done? I'm using Eclipse Version: Indigo Service Release 2.
Thanks in advance!
It can be done, but requires a special launcher using a specific classloader to extract the inner jar from the outer jar.
I would simply use the standard way of doing: deliver both jars, along with a startup .bat/.sh file used to start the application, the whole being packed into a simple zip file.

Is it possible to run ILMerge at compile time within SharpDevelop?

I'd like to offer my .Net library (which I'm developing in the SharpDevelop IDE) as a single dll. I've been manually using ILMerge to merge my compiled library and all its reference libraries together, but would like this done automatically.
I'd ideally like to have this automatic merge happen from within SharpDevelop, without having to set up an external build script. Is this possible?
SharpDevelop uses MSBuild to compile your code so the simplest way would be to create a post build step that runs ILMerge with the correct parameters. You can create a post build step from the Project Options under the Build Events tab. Alternatively you can directly edit your project file in Notepad.

Resources