cancel
Showing results for 
Search instead for 
Did you mean: 

Addition of jar files to an AWT MI project

Former Member
0 Kudos

Hi,

I need to add two jar files to my project. These jar files contain GUI component classes.

When I import the jar files to <My APP>/classes, they are visible. Once I build the project, they are removed.

How can I add those jar files to my project.

Regards

Raja Sekhar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Jo,

Thanks for your patient answers.

I understand that jar file creation is as below

jar cmf whereismain.txt <classfile1> <classfile2>

where whereismain.txt has the entry for the main class.

Do let me know if the above jar file creation would hold good.

What wud be the main class for jar file in case of SAP MI.

Regards

Raja Sekhar

Former Member
0 Kudos

hello raja,

you will only need to specify the main class if you want

your jar file executable. for MI archive, this is not necessary.

you only have to specify your manifest.mf file which holds

your configuration entries for your MI archive like,

ApplicationClass, Description etc...

regards

jo

Former Member
0 Kudos

Hi Raja

I got a similar problem as you. I tried to add external jar files to my AWT project. I also exported through 'Export Jar / Zip File' option in NWDS. But I could not reimport it or use it in MI Client. I finally created a addon and assigned to the client device. It worked fine. I could access the addon classes in my AWT applications.

Check out this Links

Hope it helps

Regards,

Rakesh ;>)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Jo,

Thanks for your reply.

I dont have the src files for the jar files.

Is there any other way to include the jar files in the exported MI archive file as these would be required by the application when deployed on the mobile device.

If I add the jar files as the external jars, how does the linking happen. Will I need to deploy these jar files separately to each mobile device in a default location. If so what wud that location be?

Regards

Raja Sekhar

Former Member
0 Kudos

hello raja,

in your project you can declare them in your user library

and add that library to your project.

now on your deployment, you can deploy your library as your

application addon.

if you don't want, you can extract the jar files to your

classes directory of your project; then create one whole

jar file for your application.

jo

Former Member
0 Kudos

Hi Jo,

In the java build path section of the project properties,

I have these 2 jar files added in the Libraries tab.

Will this make the classes in the jar files available to the project.

Is this what u had suggested.

Regards

Raja Sekhar

Former Member
0 Kudos

hello raja,

yeah they will be available.

but will not be included when you export your project.

what i suggested was if you have the src and bin (class)

files imported to your project, you just have to set the

output directory of your project to <projectroot>\classes

for your bin files to be re-compiled to the same location.

but if you don't have the src files, you can add a reference

to that project to your current project or set it as a

library just like what you did.

jo

Former Member
0 Kudos

hello raja,

go to your project build properties and specify the directory

for your classes (bin) files.

jo