Java Service Problems

Hi,

I have a problem when i try to create an instance for a class.
In the “Shared” tab i have:

public class ClassName
{
private …
public …
}

In the “Source” tab i have:
ClassName var ;
var = new ClassName() ;

When i compile the service, a message error appear
"C:\sapbc46\Server\packages\Eficentrum_PCP\code\source\Des\JService.java:85: non-static variable this cannot be referenced from a static context
a = new Encripta() ; "

Why this doesn’t work ???
As always, any information is good.
Omar

Hi,

I found the problem.
The class need to be STATIC.

“Shared” tag
public static class ClassName
{

}

Omar