> Please bear with me, I'm new to java etc.
>When I try to add SPMF as an external folder, Eclipse treats it as “package only containing non Java resources” as shown in this SO question.
>I've worked around it by using the jar which seems to work. But I'd love to known if I'm doing something wrong or if it's an issue with SPMF. Please see the SO post and let me know through either channel if more info is needed to assess this.
Thanks for using SPMF
It is more of a problem of how you are adding the code in your project because the code of SPMF don't have any special features that should prevent it for being recognized as a java program. It is just some Java code organized into packages (folders). There is no dependencies to other projects.
So what is the problem. I think it is just how you have added the code to your project.
If you want to include all the code of SPMF in your project, there are some simple instructions that you can follow step by step here: http://www.philippe-fournier-viger.com/spmf/how_to_install.txt
If you want to only include an algorithm (the hierarchical clustering algorithm), then I wrote some text explaining how to do that in the FAQ on the website:
Copying the source code of an algorithm in another Java project
Reusing the source code of a single algorithm from SPMF in another Java project is easy, since in general algorithms in SPMF are separated by packages, except for a few datastructures and classes that are shared by multiples algorithms.
If you want to reuse a single algorithm from SPMF without copying all the code from SPMF, you should first determine which classes are necessary. For example, if you want to copy the source code of the SPAM algorithm in another project, then you would need to first locate the package for the SPAM algorithm. It is ca/pfv/spmf/algorithms/sequentialpatterns/spam_saveToFile/ .
Then, you would need to copy the file AlgoSPAM.java in this package, as well as other files used by that file which are: AlgoSPAM. java, Bitmap.Java, Itemset.java and Prefix.Java.
Then you should check the first lines of those Java files in that package to see if there is some additional files that are required by looking at the import statements of each file. In the case of SPAM, there is only two such files indicated by the import statement in AlgoSPAM.java, which are:
Therefore, we should also copy these files. Then we should also look at the import statement and dependency of these files to see if other files are required.
Note that each Java file has a package statement in its first line. If you move the files to another package, you should change the package statements accordingly.
Also, note that the source code of SPMF is distributed under the GPL license. If you copy parts of the source code of SPMF in another project, it should comply with the GPL license (see license).
If this does not help you, you can let me know. I can give more explanations.