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

冷暖自知 提交于 2021-01-28 19:34:59

问题


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.


回答1:


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

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.



来源:https://stackoverflow.com/questions/61453149/how-to-fix-it-class-not-found-exception-in-domino-designer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!