0

I've got a working, deployable ear. It has ejbs and wars in it. But I'm not sure what version of Java EE I'm currently using. How do I find that out?

To be clear, I don't care about the version on the app server, I want to know what version my artifacts are configured to use.

Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
  • possible duplicate of [What version of javac built my jar?](http://stackoverflow.com/questions/3313532/what-version-of-javac-built-my-jar) – AntonH Mar 04 '14 at 23:45
  • @AntonH unrelated. I can deploy to an older version if I want. – Daniel Kaplan Mar 04 '14 at 23:46
  • 1
    Do you mean the JDK version or the Enterprise Edition version you are working on? – robermann Mar 04 '14 at 23:53
  • If you do you mean the JDK version, see my answer; EE compliance is another matter, you should check for what application server version it was packaged, then see to what spec version that AS is compliant. – robermann Mar 05 '14 at 00:03
  • I don't mean either of those things. I mean Java EE compliance. @robermann that's not enough as I assume I could always build an older version of a Java EE ear and still deploy it to that AS. That would just tell me the maximum version number, not *the* version number. Right? – Daniel Kaplan Mar 05 '14 at 00:05
  • No, an older version of an EAR could not be compiled if the sources use new specs API. EE compliance could not be known by anything in the jar, you have to know the target AS version (for example http://en.wikipedia.org/wiki/Oracle_WebLogic_Server#Standards_support_by_version), or do some reverse engineering on .classes and see for example if they use new API methods. – robermann Mar 05 '14 at 00:12
  • @robermann I'm saying that if the older version of an EAR uses the old sources of the specs, it could still be deployed to an AS that uses new specs, assuming the specs are backwards compatible. Right? – Daniel Kaplan Mar 05 '14 at 00:16
  • Correct (I deleted my answer, now the question is clearer so it would be OT) – robermann Mar 05 '14 at 00:27
  • Inside the EAR there could be some hint, for example inside the web.xml (DTD or schema version) or application.xml – robermann Mar 05 '14 at 00:32
  • Or the meta-inf/maven/pom.xml, if you are lucky :) – robermann Mar 05 '14 at 00:41

0 Answers0