Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] Eclipse conflicting libraries issues- Need help

The stack overflow answer refers to Eclipse plug-in projects and RCP
projects. Are your projects Eclipse plug-ins or RCP applications?

If so, then defining proper target platforms is the right way to go.
However, my guess is you are not actually developing Eclipse plug-ins.

This doesn't actually seem to be an Eclipse question at all as you
seem to be running the program outside of Eclipse? Does running it
inside Eclipse work?

A bit of a red flag is the wildcard in your command: java -cp "*"

If you have two versions of a jar in your classpath, then the first
one wins, and it might be the wrong one for your project. Try only
including jars you actually need in the classpath. If you run your
program inside Eclipse, then Eclipse should handle the classpaths for
you.


On Wed, 5 Jan 2022 at 13:56, Bubunia Patra <bubunia2000ster@xxxxxxxxx> wrote:
>
> Hi all,
>
> I am using Eclipse-Workspace and in the same eclipse path (e.g C:\eclipse-workspace) I have created 2 different JAVA projects.
>
> One java project is using a specific version jars(e.g 3.x) and other Java project is using (e.g 4.x) version of jars.
>
> I am getting conflicting libraries errors as below. After checking with experts from the community I got to know that issue was due to conflicting Libraries only. Any idea how I can use different set of libraries for different Java projects? Issue is similar to this But i quite did not understand the response. can anyone please help?
>
> Want to use both older and newer version of ant plugin in eclipse for two different projects
>
> I have two Java projects and they are using different libraries in Eclipse
>
> Java Project - SentiWordnet - This uses 3.6 (Build Path->Configure Build Path-> Java Build Path->Libraries and its only using 3.6 jars --- This is not working with the error.
> Java Project - CoreNLP to get the overall sentiments- This uses 4.3.2( Build Path->Configure Build Path-> Java Build Path-> Libraries and its only uses 4.3.2 libraries --- This is working
>
> C:\eclipse-workspace\SentiWordNet\lib>java -cp "*" edu.stanford.nlp.tagger.maxent.MaxentTagger -model edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger Loading default properties from tagger edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger Reading POS tagger model from edu/stanford/nlp/models/pos-tagger/english-left3words/english-left3words-distsim.tagger ... Exception in thread "main" java.lang.ClassCastException: edu.stanford.nlp.process.AmericanizeFunction cannot be cast to edu.stanford.nlp.util.Function at edu.stanford.nlp.tagger.maxent.MaxentTagger.init(MaxentTagger.java:418) at edu.stanford.nlp.tagger.maxent.MaxentTagger.readModelAndInit(MaxentTagger.java:690) at edu.stanford.nlp.tagger.maxent.MaxentTagger.readModelAndInit(MaxentTagger.java:648) at edu.stanford.nlp.tagger.maxent.MaxentTagger.(MaxentTagger.java:284) at edu.stanford.nlp.tagger.maxent.MaxentTagger.(MaxentTagger.java:265) at edu.stanford.nlp.tagger.maxent.MaxentTagger.runTagger(MaxentTagger.java:1362) at edu.stanford.nlp.tagger.maxent.MaxentTagger.main(MaxentTagger.java:1693)
>
> C:\eclipse-workspace\SentiWordNet\lib>
>
> Regards Prakash
>
> _______________________________________________
> eclipse-dev mailing list
> eclipse-dev@xxxxxxxxxxx
> To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/eclipse-dev



-- 
Mat Booth
http://fedoraproject.org/get-fedora


Back to the top