如何找到我的Eclipse项目正在使用的EclipseLink版本? [英] How to find what version of EclipseLink my Eclipse Project is using?

查看:146
本文介绍了如何找到我的Eclipse项目正在使用的EclipseLink版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个在Eclipse中开发的Maven jersey-quickstart-webapp项目。该项目是一个使用angularjs javascript前端的JERSEY REST后端。



我想知道如何检查我的项目使用的EclipseLink版本。



我在哪里可以找到这个属性?我搜索了高和低,但我无法找到它 - 我知道我曾经偶然发现它,所以它肯定存在....



这个问题正在试图解决我几个月前提出的关于eclipselink和Jersey REST问题的下列问题,该问题仍未解决:

所有帮助高度赞赏...

解决方案

您正在运行的eclipselink由Glassfish服务器提供。查看glassfish / modules目录并找到org.eclipse.persistence.core.jar文件。它内部将是一个readme.html。打开它,在Glassfish中安装eclipselink的版本将会在那里。



Mine说,对于glassfish 4(有点旧)是:

 < B> EclipseLink 2.5自述< / B> 


I have a Maven jersey-quickstart-webapp Project I am developing in Eclipse. The project is a JERSEY REST backend with angularjs javascript frontend.

I would like to know how to check what version of EclipseLink my project is using.

Where can I find this property? I've searched high and low but I can't find it - I know that I did stumble across it before, so it definitely exists....

This question is trying to get to the bottom of the following question I posed months ago about a problem with eclipselink and Jersey REST, that still hasn't been fixed: Class not found when using JAX-RS with Eclipse and Glassfish This should be fixed with jersey 2.22.1 and eclipselink 2.6.1, but I think somewhere in my setup, eclipselink 2.6.0 is still hanging around and screwing the whole thing up. Highly frustrating!

I know that eclipselink is being used in this project, because the following code returns 2.6.1 when the project is running. However, previously I saw that even though this was saying 2.6.1, that the eclipselink configuration somewhere(I can't remember where - doh!) was still saying version 2.6.0.

//This helps us tell what version of eclipse link we are using
Class<?> myClass = Class.forName("org.eclipse.persistence.Version");
Method myMethod = myClass.getMethod("getVersion");
String version = myMethod.invoke(null).toString();
System.out.println("version = " + version);

Here is what the Maven dependency hierarchy looks like - as you can see it has no eclipselink stuff in there:

All help highly appreciated...

解决方案

The eclipselink you're running is provided by the Glassfish server. Look in the glassfish/modules directory and find the org.eclipse.persistence.core.jar file. Inside it will be a readme.html. Open that and the version of eclipselink that is installed in Glassfish will be there.

Mine says, for glassfish 4 (somewhat old) is:

<B>EclipseLink 2.5 Read Me</B>

这篇关于如何找到我的Eclipse项目正在使用的EclipseLink版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆