iccaros Posted October 18, 2006 Report Share Posted October 18, 2006 ok we are creating a server from exsistiong code. I have the source or .java files and I also have .class files.. I need to use these methods in my program but I don't know how to add the methods.. they are part of package, but I also have the source file (.java) for each of these.. do I just put the source files in my same directory and what use import? or do I just call the classexample Server SImServer = null; Quote Link to post Share on other sites
jcl Posted October 19, 2006 Report Share Posted October 19, 2006 (edited) The .classes should be in a directory hierarchy the follows the package hierarchy (e.g. package foo.bar in foo/bar/). Add the root of the directory hierarchy to your classpath and import the classes as you normally would (e.g. import foo.bar.*). You don't need the source files unless you're modifying the code. Edited October 19, 2006 by jcl Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.