Run ClusteringDocumentList carrot-example through command line

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Run ClusteringDocumentList carrot-example through command line

Gaurang Patel
I am trying to run ClusteringDocumentList main class through command line so that I can integrate it into my project.

I am struggling with the classpath errors while trying to run it from command line. I already included some of the classes and jar files:
Current classpath list looks as follows:

$ java -classpath /home/gaurang/workspace/carrot2-examples/tmp/eclipse:/home/gaurang/workspace/carrot2-core/tmp/eclipse:/home/gaurang/workspace/com.google.collections/google-collections.jar:/home/gaurang/workspace/carrot2-algorithm-synthetic/tmp/eclipse org.carrot2.examples.clustering.ClusteringDocumentList


Now this is becoming tedious for me to include classpaths for each and every class one by one following trial and error method.

1) I am not that familiar to writing build files.
Following settings in build file confuse me:

    <java classname="org.carrot2.examples.clustering.ClusteringDocumentList"
          outputproperty="dev.null" failonerror="true">
      <classpath>
        <fileset dir=".">
          <include name="**/*.jar" />
        </fileset>
        <pathelement location="tmp/classes"/>
      </classpath>
    </java>

2) I observed following in the project build path in project properties:
build+path

Can somebody get me the whole one list of classes, jar files, packages needed to be included to run this class though command line?

Regards,
Gaurang
Reply | Threaded
Open this post in threaded view
|

Re: Run ClusteringDocumentList carrot-example through command line

Dawid Weiss-2
It does not make sense to set the classpath manually, Guarang. Use ANT
or write a shell script that will collect the required JARs.

Dawid

On Wed, Nov 4, 2009 at 7:45 AM, Gaurang Patel <[hidden email]> wrote:

>
> I am trying to run ClusteringDocumentList main class through command line so
> that I can integrate it into my project.
>
> I am struggling with the classpath errors while trying to run it from
> command line. I already included some of the classes and jar files:
> Current classpath list looks as follows:
>
> $ java -classpath
> /home/gaurang/workspace/carrot2-examples/tmp/eclipse:/home/gaurang/workspace/carrot2-core/tmp/eclipse:/home/gaurang/workspace/com.google.collections/google-collections.jar:/home/gaurang/workspace/carrot2-algorithm-synthetic/tmp/eclipse
> org.carrot2.examples.clustering.ClusteringDocumentList
>
>
> Now this is becoming tedious for me to include classpaths for each and every
> class one by one following trial and error method.
>
> 1) I am not that familiar to writing build files.
> Following settings in build file confuse me:
>
>    <java classname="org.carrot2.examples.clustering.ClusteringDocumentList"
>          outputproperty="dev.null" failonerror="true">
>      <classpath>
>        <fileset dir=".">
>          <include name="**/*.jar" />
>        </fileset>
>        <pathelement location="tmp/classes"/>
>      </classpath>
>    </java>
>
> 2) I observed following in the project build path in project properties:
> http://n2.nabble.com/file/n3943464/build%2Bpath build+path
>
> Can somebody get me the whole one list of classes, jar files, packages
> needed to be included to run this class though command line?
>
> Regards,
> Gaurang
> --
> View this message in context: http://n2.nabble.com/Run-ClusteringDocumentList-carrot-example-through-command-line-tp3943464p3943464.html
> Sent from the Carrot2 Users and Developers Forum mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Carrot2-developers mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/carrot2-developers
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Carrot2-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/carrot2-developers