on 07-04-2007 8:59 PM
Hi !
I'm a Java newbie. I've been reading about ejbs, NWDS, etc., but don't know how to set up a project in NWDS for the purpose of creating a jar file with a java class inside with methods to be called insde a UDF in graphical mapping. I understand that the imports inside the java class depend on each case. What type of project do I need to create in NWDS? Where do I put the class methods?
Thanks,
Matias.
> What type of project do I need to create in NWDS?
JavaProject.
> Where do I put the class methods?
Define a Class , by creating a Class in your Project and then in this create the correspodning methods.
Regards
Bhavesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bhavesh !
Thats exactly what I meant. Ok, and after writing all my methods, I've noticed I can go to Project | Rebuild All, to get my ".class" files generated..
After that step, I can use the command line or a zip utility to make the .zip or .jar with all my .class files. Am I right ??
There is no "Build JAR Archive" option for this kind of project..Am I doing something wrong?
Thanks,
Regards,
Matias.
Hi Matias,
to create a jar you have to select the project and click Export from the context menu.
Select jar file from the dialog box, then follow the wizard.
Then you have to import the jar inside the integration repository as an imported archive and from your udf call the methods.
Do not forget to declare the package to be imported (the same defined in you class files: like com.sap.xi.Mappings) in the import box of the UDF editor.
Regards,
Sergio
JAR stands for Java Archive, which is technically a zip archive. Hence there is no difference between a JAR file and ZIP file technically. As long as the packages as mentioned in the java source code are maintained the zip or jar, there should not be any problem importing them into XI.
VJ
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Matias ,
If you have the class file with you,then go to command prompt and give the following command
jar -cf Test.jar Test.class
The above command will create u jar file.
Its not necessary that only jar files can be imported for mapping in UDF.Just zip the class file and import in imported archive. It will work.
Hope it helps.
Best regards,
raj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.