Can't access my Java Class

Hi,have just tried to copy a little java class I have written in Eclipse a while ago into the Lotus Notes. I used the cut & paste way and saved it into the (default package) . I first tried my own package , but this did not work.

The class name is ‘ATest’ and I tried to use it in a form’s postopen event

Forms options:

Option Public

Option Declare

Uselsx"*javacon"

Forms Global/Declarations:

Dim ATestClass As JavaClass

Dim JavaSession As JavaSession

Dim T1 as JavaObject

Dim T2 as JavaObject

Postopen:

Set JavaSession=New JavaSession

Set ATestClass=JavaSession.GetClass(“ATest”) ← BANG

Set T1=ATestClass.CreateObject…

The .GetClass command raises an ‘LS2J Error: Threw java.lang.ClassNotFoundException: ATest’

In the help is written that Notes will find classes inside the Notes DB by itself … !? I also tried it with my own package inside the Notes Database and got the same error.

I assume that I have to add something Notes specific or I must have overseen a simple stupid little thing !?

Joe

Subject: I think you have to add it to the project…

Subject: And how do I add a Java class to a project in DDE ?

Hi David,

thanks for your answer.

But how do I add this class to a project ?

And which project btw. ? Can’t find anything about in the help of the DDE.

And why do the Lotus script libraries work with out being forced to add them into a project ?

I fear your answer has created more question then it has solved.

I used the DDE, not Eclipse !

Thanks in advance

Joe

Subject: To use a Java library from LS2J…

…as you seem to be doing, just import it normally into your LS with a use “YourJavaLibrary”