1

I need to compile my java CORBA applications in java 11, which no longer includes an ORB implementation.

I have included jacorb.jar in the CLASSPATH, but I'm still getting errors while compiling, not finding the CORBA imports:

import org.omg.CORBA.*
^
error: package org.omg.CORBA does not exist

Is there anything else I should do?

Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95
dummyhead
  • 81
  • 2
  • 9
  • 2
    JacORB doesn't have that package. See https://jacorb.github.io/JacORB/ It's not a drop-in replacement – Federico klez Culloca May 24 '19 at 08:38
  • Thanks for your comment...In that case , something I don't understand is why the examples of the jacorb developers guide, includes import org.omg.CORBA. see https://www.jacorb.org/releases/3.9/ProgrammingGuide.pdf My feeling was that thre should be some 'trick' in the same way as when it is executed: -Dorg.omg.CORBA.ORBClass=org.jacorb.orb.ORB -Dorg.omg.CORBA.ORBSingletonClass=org.jacorb.orb.ORBSingleton – dummyhead May 24 '19 at 09:01
  • 1
    See on top of page 14. You also need to include other JARs in the classpath. Without looking thoroughly, I suspect that the packages you want are inside `jacorb-omgapi.jar` – Federico klez Culloca May 24 '19 at 09:26
  • Claro que si!! Absolutely. Works like a charm. Many thanks, Federico – dummyhead May 24 '19 at 09:33
  • Hey, no problem ;) – Federico klez Culloca May 24 '19 at 09:33

1 Answers1

3

The problem is that the JAR you're including in the classpath doesn't have that package.

You also need to include jacorb-omgapi.jar.

While you're at it you should do what the documentation says on page 14 and include all of

  • acorb.jar - containing the ORB, IMR, IR and NamingService
  • jacorb-omgapi.jar - containing the core OMG API stubs.
  • jacorb-services.jar - containing all other services (e.g. Notification, DDS, Collection etc).
  • idl.jar - containing the IDL compiler.
Federico klez Culloca
  • 26,308
  • 17
  • 56
  • 95