I have '.class' extension files and jar files for a system that I am going to develop. Where should I locate these files?
Printable View
I have '.class' extension files and jar files for a system that I am going to develop. Where should I locate these files?
They should go on the project classpath. Physically, it's best to put them in a directory somewhere within the project directory. There are no reules about the directory names, but it pays to be consistent. Class files compiled from project source code usually go in a directory called 'classes', library files such as jars and external class files can go in a directory called 'lib' or 'libs' or 'deps' (short for 'dependencies'). If you have standalone .class files, they'll need to sit in a directory hierarchy that corresponds to their package hierarchy, and the directory that contains that hierarchy is what should go in the classpath, e.g:classpath = c:\projects\aProject\lib;c:\projects\aProject\lib\foo.jar;c:\projects\aProject\lib\bar.jarCode:c:\projects - development directory
c:\projects\aProject - project directory
c:\projects\aProject\classes - project classes
c:\projects\aProject\source - project source
c:\projects\aProject\lib - libraries
c:\projects\aProject\lib\foo.jar - jar file
c:\projects\aProject\lib\bar.jar - jar file
c:\projects\aProject\lib\com\zork\frab.class - class file
c:\projects\aProject\lib\com\wep\smot.class - class file