In my Java application I am developing a secure client server using jsse. I have 3 Java files that correspond to the Server and 3 that correspond to the Client. (Server,ServerController,ServerView) and the same for client.
Each one of these files is in there own package e.g. ServerView is in the View package.
The main Server and Client java files use classes from the other files so I am importing them using
import server.serverSender;
etc, this means I need to declare the package names at the top of my files.
However when I export the class files and attempt to run the application and view the JSSE debug output using java -Djavax.net.debug=all
in terminal i get an exception in thread 'main' java.lang.NoClassDefFoundError:
now I have found the source of the error, it is because I am declaring package
etc at the top of my files because as I explained above I am importing classes into the main java files. I found the solution here exception in thread 'main' java.lang.NoClassDefFoundError:
How would I solve this problem? I tried adding all the files to the default package but I can't import classes from the default package they need there own package.
So basically my problem is, I need to use package names at top of my files to import classes but I also need to run application in debug mode that doesn't work when using package names at top of files.