Compile Java 11 with jacorb

3.9k Views Asked by At

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?

1

There are 1 best solutions below

0
Federico klez Culloca On

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.