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

Thanks a lot for your quick response. Appreciate your help in this regard. 
I have copied all the eclipse file from the existing directory to a different folder for example C:\sentiwordnet\eclipse from C:\Users\Admin\eclipse-workspace\SentiWordnet so that there is no overlapping jars and its versions.
But I could see there is only 1 version of  "edu.stanford.nlp.process.AmericanizeFunction" and "edu.stanford.nlp.util.Function" which is 3.6.
Attached are the screenshots.

I created the new launch Configurations and added the new class libraries but still it did not work.

Code: 

http://informatics.yonsei.ac.kr/yTextMiner/yTextMiner1.2.zip


Any inputs is really appreciated.

Regards
Bubunia

On Wed, Jan 5, 2022 at 10:03 PM Aaron Digulla <digulla@xxxxxxxx> wrote:
Am 05.01.22 um 14:56 schrieb Bubunia Patra:
> 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?
>
Eclipse only uses the JARs which you mention in the Java Build Path to
build the project for this project. Each project gets their own build
path. Unless you instruct Eclipse to add another project to your build
path, they don't affect each other.

If the project builds, that means the code that Eclipse compiles (i.e.
all the source code you wrote) is compatible with the interfaces of the
libraries on the classpath.

It doesn't mean the program will run. That is because your code calls
some method in JAR X which in turn calls code from JAR Y. Eclipse will
not check that X and Y work together. You will need integration tests
for that.

The error you got means: X and Y are not compatible.

A simple way to check this is to open the Java Type
"edu.stanford.nlp.process.AmericanizeFunction" in Eclipse
(Ctrl+Shift+T). Then right click and "Show in -> Project Navigator".
This will open the .class file in the JAR. That is the most simple way
to see which JAR file contains this class.

You should also check whether The "Open Java Type" dialog finds more
than one entry; that means you have several JARs on the classpath with
the same classes in it. This is usually a source of weird bugs.

Do the same for "edu.stanford.nlp.util.Function". Check the versions of
the JARs to make sure they are the same.

Next, when you run the code from the command line, you should use the
same classpath as Eclipse. Instead of this, you use "*" which can mean
anything. The command line "java" executable has no knowledge of Eclipse
or your project settings and the build path. If you change something in
Eclipse, that will have no effect on the command line.

Try to create a "Launch Configuration" to start the main class and use
that. This way, you can manage the classpath inside of Eclipse and you
can see what you get (and you can debug, too).

Regards,


--
Aaron "Optimizer" Digulla a.k.a. Philmann Dark
"It's not the universe that's limited, it's our imagination.
Follow me and I'll show you something beyond the limits."
http://blog.pdark.de/

_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/eclipse-dev

Attachment: AmericanizeFunction.jpg
Description: JPEG image

Attachment: util.jpg
Description: JPEG image


Back to the top