java.lang.ClassNotFoundException: while accessing files from another package

I am compiling jitsi to add some changes to the project. I’ve implemented a few changes and the project is working fine till now.
I have come to a point where I need files from this package to this one. I am trying to access VideoConfigurationPanel.java to ConfigurationFrame.java.

It imports everything successfully and doesn’t show any error but while compiling and running the application, it throws the following error:

     [java] Hotplug cache populated with: '\\?\intelaudio#func_01&ven_10ec&dev_0236&subsys_102808c9&rev_1000#4&1c3d4150&0&0001#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rtstereomixwave'
 [java] Hotplug cache populated with: '\\?\intelaudio#func_01&ven_10ec&dev_0236&subsys_102808c9&rev_1000#4&1c3d4150&0&0001#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rtmicinsstwave'
 [java] Hotplug cache populated with: '\\?\intelaudio#func_01&ven_10ec&dev_0236&subsys_102808c9&rev_1000#4&1c3d4150&0&0001#{6994ad04-93ef-11d0-a3cc-00a0c9223196}\rearlineoutwavesst'
 [java] before paHostApiInitializers[0].
 [java] after paHostApiInitializers[0].
 [java] 2020-07-12 16:00:15.450 SEVERE: [46] util.UtilActivator.uncaughtException().122 An uncaught exception occurred in thread=Thread[AWT-EventQueue-0,6,main] and message was: net/java/sip/communicator/impl/neomedia/VideoConfigurationPanel
 [java] java.lang.NoClassDefFoundError: net/java/sip/communicator/impl/neomedia/VideoConfigurationPanel
 [java]     at net.java.sip.communicator.impl.gui.newui.GUITest.<init>(GUITest.java:972)
 [java]     at net.java.sip.communicator.impl.gui.UIServiceImpl.loadApplicationGui(UIServiceImpl.java:165)
 [java]     at net.java.sip.communicator.impl.gui.GuiActivator$1.run(GuiActivator.java:186)
 [java] ERROR: Bundle net.java.sip.communicator.plugin.msofficecomm [49] Error starting reference:file:sc-bundles/plugin-msofficecomm.jar (org.osgi.framework.BundleException: Activator start error in bundle net.java.sip.communicator.plugin.msofficecomm [49].)
 [java]     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
 [java]     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
 [java]     at java.awt.EventQueue.access$500(EventQueue.java:97)
 [java]     at java.awt.EventQueue$3.run(EventQueue.java:709)
 [java]     at java.awt.EventQueue$3.run(EventQueue.java:703)
 [java]     at java.security.AccessController.doPrivileged(Native Method)
 [java]     at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
 [java]     at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
 [java]     at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
 [java]     at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
 [java]     at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
 [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
 [java]     at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
 [java]     at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
 [java] Caused by: java.lang.ClassNotFoundException: net.java.sip.communicator.impl.neomedia.VideoConfigurationPanel not found by net.java.sip.communicator.swingui [1]
 [java]     at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
 [java]     at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
 [java]     at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
 [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
 [java]     ... 17 more
 [java] 2020-07-12 16:00:15.481 SEVERE: [20] plugin.msofficecomm.Messenger.<clinit>().176 Couldn't load jmsofficecomm. If you are debugging, make sure that HKLM\SOFTWARE[\Wow6432Node]\Microsoft\Office\Outlook\Call Integration\IMApplication is set to javaw.exe; unsupported JNI version 0xFFFFFFFF required by C:\Users\Jamshaid\Downloads\jitsi-5602\lib\native\windows-64\jmsofficecomm.dll
 [java] java.lang.ExceptionInInitializerError
 [java]     at net.java.sip.communicator.plugin.msofficecomm.MsOfficeCommActivator.start(MsOfficeCommActivator.java:72)
 [java]     at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:697)
 [java]     at org.apache.felix.framework.Felix.activateBundle(Felix.java:2240)
 [java]     at org.apache.felix.framework.Felix.startBundle(Felix.java:2146)
 [java]     at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1373)
 [java]     at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
 [java]     at java.lang.Thread.run(Thread.java:748)
 [java] Caused by: java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: unsupported JNI version 0xFFFFFFFF required by C:\Users\Jamshaid\Downloads\jitsi-5602\lib\native\windows-64\jmsofficecomm.dll
 [java]     at net.java.sip.communicator.plugin.msofficecomm.Messenger.<clinit>(Messenger.java:180)
 [java]     ... 7 more
 [java] Caused by: java.lang.UnsatisfiedLinkError: unsupported JNI version 0xFFFFFFFF required by C:\Users\Jamshaid\Downloads\jitsi-5602\lib\native\windows-64\jmsofficecomm.dll
 [java]     at java.lang.ClassLoader$NativeLibrary.load(Native Method)
 [java]     at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1934)
 [java]     at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1850)
 [java]     at java.lang.Runtime.loadLibrary0(Runtime.java:870)
 [java]     at java.lang.System.loadLibrary(System.java:1122)
 [java]     at net.java.sip.communicator.plugin.msofficecomm.Messenger.<clinit>(Messenger.java:172)
 [java]     ...

It works fine when I don’t import the said file from one package to the other one. The project runs successfully but when I import the VideoConfigurationPanel to ConfigurationFrame, it throws the ClassNotFoundException.
I am unable to get the cause behind it. I am running the project using cmd with ant rebuild run. Any help would be really appreciated. Thanks

Search the forum about that error, this was explained a number of times. This is how OSGi works. You need a class to be exported an then imported in the bundle where you want to use it.

Hi thanks for your reply. I’ve made a few changes to the manifest.mf files but having exception. Maybe i will be doing something wrong. Here are my files and exception.
I have made changes to a manifest file to include files from other packages in my project and it throws the following error.

run:
 [java] org.osgi.framework.BundleException: Unable to resolve net.java.sip.communicator.configuration [145](R 145.0): missing requirement [net.java.sip.communicator.configuration [145](R 145.0)] osgi.wiring.package;
 (osgi.wiring.package=net.java.sip.communicator.impl.neomedia)
 Unresolved requirements: [[net.java.sip.communicator.configuration [145](R 145.0)] osgi.wiring.package; (osgi.wiring.package=net.java.sip.communicator.impl.neomedia)]
 [java] ERROR: Bundle net.java.sip.communicator.configuration [145] Error starting reference:
file:sc-bundles/configuration.jar (org.osgi.framework.BundleException: 
Unable to resolve net.java.sip.communicator.configuration [145](R 145.0): 
missing requirement [net.java.sip.communicator.configuration [145](R 145.0)] osgi.wiring.package; (osgi.wiring.package=net.java.sip.communicator.impl.neomedia) Unresolved requirements: [[net.java.sip.communicator.configuration [145](R 145.0)] osgi.wiring.package; (osgi.wiring.package=net.java.sip.communicator.impl.neomedia)])
 [java] ERROR: Bundle net.java.sip.communicator.resources [135] Error starting reference:file:sc-bundles/resourcemanager.jar (org.osgi.framework.BundleException: Activator start error in bundle net.java.sip.communicator.resources [135].)

Here are my manifest.mf files. I am really new to this kind of development. What I might be possibly doing wrong.

configuration.manifest.mf

Bundle-Activator: net.java.sip.communicator.impl.configuration.ConfigurationActivator
Bundle-Name: Configuration Service Implementation
Bundle-Description: A bundle that offers configuration utilities
Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
Bundle-SymbolicName: net.java.sip.communicator.configuration
Import-Package: org.jitsi.service.configuration,
 net.java.sip.communicator.impl.neomedia,//added this line to import the whole package to use in this package
 org.jitsi.service.fileaccess,
 org.jitsi.service.libjitsi,
 net.java.sip.communicator.util,
 org.jitsi.util,
 com.sun.jna,
 org.osgi.framework,
 org.hsqldb,
 org.hsqldb.jdbc,
 com.google.common.collect

neomedia.manifest.mf

Bundle-Activator: net.java.sip.communicator.impl.neomedia.NeomediaActivator
Bundle-Name: Neomedia Service Implementation
Bundle-Description: A bundle that offers Media capture and presentation capabilities.
Bundle-Vendor: jitsi.org
Bundle-Version: 0.0.1
Bundle-SymbolicName: net.java.sip.communicator.neomedia
Import-Package: apple.awt,
 ch.imvs.sdes4j,
 ch.imvs.sdes4j.srtp,
 gnu.java.zrtp,
 gnu.java.zrtp.packets,
 gnu.java.zrtp.utils,
 gnu.java.zrtp.zidfile,
 javax.imageio,
 javax.media,
 javax.media.protocol,
 javax.sound.sampled,
 javax.swing,
 javax.swing.border,
 javax.swing.event,
 javax.swing.table,
 javax.swing.text,
 javax.xml.parsers,
 javax.xml.transform,
 javax.xml.transform.dom,
 javax.xml.transform.stream,
 net.java.sip.communicator.service.gui,
 net.java.sip.communicator.service.notification,
 net.java.sip.communicator.service.protocol,
 net.java.sip.communicator.service.protocol.event,
 net.java.sip.communicator.service.resources,
 net.java.sip.communicator.service.systray,
 net.java.sip.communicator.service.systray.event,
 net.java.sip.communicator.util,
 net.java.sip.communicator.plugin.desktoputil,
 org.bouncycastle.crypto,
 org.bouncycastle.crypto.digests,
 org.bouncycastle.crypto.engines,
 org.bouncycastle.crypto.macs,
 org.bouncycastle.crypto.params,
 org.bouncycastle.crypto.prng,
 org.ice4j.socket,
 org.jitsi.impl.neomedia,
 org.jitsi.impl.neomedia.codec,
 org.jitsi.impl.neomedia.codec.video.h264,
 org.jitsi.impl.neomedia.device,
 org.jitsi.impl.neomedia.format,
 org.jitsi.impl.neomedia.recording,
 org.jitsi.service.audionotifier,
 org.jitsi.service.configuration,
 org.jitsi.service.fileaccess,
 org.jitsi.service.libjitsi,
 org.jitsi.service.neomedia,
 org.jitsi.service.neomedia.codec,
 org.jitsi.service.neomedia.control,
 org.jitsi.service.neomedia.device,
 org.jitsi.service.neomedia.event,
 org.jitsi.service.neomedia.format,
 org.jitsi.service.neomedia.recording,
 org.jitsi.service.packetlogging,
 org.jitsi.service.resources,
 org.jitsi.service.version,
 org.jitsi.util,
 org.jitsi.util.event,
 org.jitsi.util.swing,
 org.json.simple,
 org.osgi.framework,
 org.w3c.dom,
 org.xml.sax,
 quicktime,
 quicktime.qd,
 quicktime.std.image,
 quicktime.std.sg,
 quicktime.util
Export-Package: net.java.sip.communicator.neomedia //added this line to export this whole package.

What could have possibly go wrong? I am totally new to manifest files. Please guide me a bit about it. Thanks

You export this, but import this:

Packages do not match