I created my JavaAgent class in Eclipse and put it in package com.company.project
When compiled two classes were created: JavaAgent.class and JavaAgent$1.class.
I imported both compiled classes into a Imported Java agent in Domino Designer (tried various orders of those 2 classes) but kept getting error msg: error message: java.lang.NoClassDefFoundError: com/company/project/agents/JavaAgent$1
Then I created new project in eclipse, just copied the JavaAgent.java code there but without the package definition (I used default package) and tried to import newly created classes into my Java agent. Agent now works, no error is produced.
I am wondering is using packages in my imported java code discouraged? Is this “bug” fixed in Domino 7?
Subject: Imported java in non-default package produce NoClassDefFoundError
I’ve experienced the occasional odd behavior when importing from Eclipse to Notes, but not because of using packages. And using packages within an agent is not “discouraged”. If you were getting a NoClassDefFoundError, my guess is that you had a classpath problem.dgg
Subject: RE: Imported java in non-default package produce NoClassDefFoundError
Actually my agent was working fine (with the package definition) until the class got so big that it separated in 2 class files I was debugging Remote from Eclipse and all worked fine, I was reimporting several times before it started returning error messages.
I’m guessing this because this was the only difference that was made (I added a private method that had additional 15 lines) from last Import to the one where things started to return error messages.
I could try again and see if what I’m guessing is true and if the error could be reproduced.