How to fix it class not found exception in domino designer?

754 Views Asked by At

here is my code when I trigger it it shows an error

Dim jSession As New JavaSession
Dim jClass As JavaClass
Dim jObject As JavaObject
Set jClass = jSession.Getclass("learn/MyClass")
Set jObject = jClass.CreateObject
Call jObject.myMethod() 

The error is : Ls2j error : Threw java.lang class not found exeption I have tried everything which I found on internet but error is still there with package name without package name class path or loaction but somehow its not finding the class kindly help me out of this.

thats the image of error

1

There are 1 best solutions below

5
On BEST ANSWER

Put your Java class(es) into a ScriptLibrary of type Java

strong text

and refer to it with

Use "MyJavaLib" 

in your LotusScript code.

Unfortunately, you can't just put Java classes into nsf's folder "Code/Java". This folder is reserved for XPages application development only.