Eclipse IDL compilation

前端 未结 3 1309
深忆病人
深忆病人 2021-01-27 22:20

I added orb plug-in to Eclipse and created an IDL file.I configured IDL Compiler to the project which has IDL file.When i rigth-click on the IDL file there is an option as follo

相关标签:
3条回答
  • 2021-01-27 23:11

    I am also having trouble with CORBA IDL compilation under Eclipse. The CORBA IDL compiler generates an error in the Eclipse error log = “Unhandled event loop exception” due to a “java.lang.NoClassDefFoundError: org/openorb/compiler/IdlCompiler” exception.

    The above answer may work for "HelloWorld", but CORBA IDL files are a super-set of standard IDL syntax and have their own unique keywords like "typeprefix" and "local".

    Therefore they must be compiled using the IDL compiler org.openorb.compiler.IdlCompiler.

    One way to do this is using the ANT compiler. A sample ANT XML script would read:

     <target name="idl" depends="compiler" 
    description="Generate java classes from idl." 
    unless="nobuild.idl" >
    <java classname="org.openorb.compiler.IdlCompiler" fork="yes">
      <arg line="-silence -all -I ${idl} -d ${gensrc}/main ${idl}/orb.idl ${idl}/interop.idl ${idl}/misc.idl ${idl}/openorb.idl"/>
      <classpath refid="project.class.path" />
      <sysproperty key="openorb.home" file="src" />
    </java>
    
    0 讨论(0)
  • 2021-01-27 23:17

    I know the thread has some time now. But maybe i can help others anyway.

    For me this issue was related to configuration. All I had to do was to select the project, going to Project->Properties and then select IDL compilation.

    On tab "Compilation Options" select the ones I needed and then on tab Compilers, explicitly select "OpenORB".

    Then it worked ! :)

    0 讨论(0)
  • 2021-01-27 23:24

    open the command line and go to the directory where you have your IDL file and run this line

    idlj -fall nameOfIdlFile.idl
    

    e.g. if your idl file is named HelloWorld.idl

    idlj -fall HelloWorld.idl
    

    after running the above command line, in your root folder it will generate java classes namely:

    • HelloWorld.java
    • HelloWorldPOA.java
    • HelloWorldStub.java
    • HelloWorldHelper.java
    • HelloWorldOperations.java
    • HelloWorldHolder.java.

    Hope this will help you or anyone in the future with the same question.

    0 讨论(0)
提交回复
热议问题