Java service Error package name clashes

I have written four java services under one folder “ListOfFiles” and i have written the following code in “Shared” tab:

static String[] aListOfFiles; 
static int aCurrent = 0; 

I want to user this variables in my all four services, is it mandatory to declase these variable as “static”. or i can do otherwise. I mean to say i can declare them as non static i.e.

String[] aListOfFiles; 
int aCurrent = 0; 

then how can i use these java variables in my all four services.

When I save my services, I get the following error:

C:\wM6\IntegrationServer\packages\Default\code\source\EDI852\services\ListOfFiles.java:1:
package EDI852.services clashes with class of same name
package EDI852.services;
^

Can someone help me ???

Regards,
Nilesh
webMethods Consultant

Hi Nilesh,

I am using SAP BC 4.6 and came across this issue when I installed a Service Pack.

I had the following Folder/java structure setup:

FolderJava
|-FolderJava2
| |-JavaService2
|-JavaService1

This worked fine before the Service pack was applied.

After the service Pack I got the same Error you describe, I had to change my Folder/JavaService structure to be:

FolderJava
|-FolderJava2
__|-JavaService1
__|-JavaService2

OR

FolderJava
|-JavaService1
|-JavaService2

Hope this helps, it was a big pain to change all these services, I had to rea-slign the folders, then verify/modify all the flow Services that used these Java Services.

Good Luck.
Cheers.

Thanks MJUG.
I will try your trick and see whether it works fine.

Regards,
Nilesh