You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Peter Nordlund <pe...@lentus.se> on 2000/11/29 09:34:02 UTC

rmic fails with jdk/1.3.0 from IBM

 Hi,

 I sent the very same mail yesterday, but I screwed up the
 subject line so that it became somewhat misleading.

 So once again:
-----------------------------------------
 
 I have an rmic call which works ok with jdk/1.3.0 from sun
 
 I downloaded 1.3.0 from IBM 17 nov 2000 and it fails.
 I can run IBMs rmic manually on the command line, but from inside
 ant it fails.
 
 I dont know if this is a bug that should be reported to IBM or if
 you ant guys have any idea of what is going on?
 
 I have ant/1.2 and redhat 6.2
 --------------------------------
 Excerpt from my build.xml:
   <target name="rmic" depends="">
         <rmic
 classname="se.lentus.lentus.callback.ServerCallBackProxy"
          base="${lentus.build.classes}">
         </rmic>
         <rmic
 classname="se.lentus.lentus.serveraccess.Server$$CallProgressProxy"
          base="${lentus.build.classes}">
           <classpath>
            <pathelement location="${util.classpath}" />
           </classpath>
         </rmic>
   </target>
 
 -------------------------
 Output
 rmic:
 java.lang.NoClassDefFoundError: com/sun/corba/se/internal/util/Utility
         at
 sun.rmi.rmic.RMIGenerator.sourceFileForClass(RMIGenerator.java:186)
         at sun.rmi.rmic.RMIGenerator.<init>(RMIGenerator.java:267)
         at sun.rmi.rmic.RMIGenerator.generate(RMIGenerator.java:105)
         at sun.rmi.rmic.Main.doCompile(Main.java:526)
         at sun.rmi.rmic.Main.compile(Main.java:133)
         at org.apache.tools.ant.taskdefs.Rmic.execute(Rmic.java:210)
         at org.apache.tools.ant.Target.execute(Target.java:142)
         at org.apache.tools.ant.Project.runTarget(Project.java:818)
         at org.apache.tools.ant.Project.executeTarget(Project.java:532)
         at
org.apache.tools.ant.Project.executeTargets(Project.java:506)
         at org.apache.tools.ant.Main.runBuild(Main.java:420)
         at org.apache.tools.ant.Main.main(Main.java:149)
 error: An error has occurred in the compiler; please file a bug report
 (http://java.sun.com/cgi-bin/bugreport.cgi).
 1 error
 
 
 Regards,
 Peter

Re: rmic fails with jdk/1.3.0 from IBM

Posted by Stefan Bodewig <bo...@apache.org>.
Peter Nordlund <pe...@lentus.se> wrote:

> Sorry for bothering you, but now that I knew that it worked ok for
> you, I started to investigate my problem more thorougly and backed a
> version of IBM jdk ....  Eventually I found out what probably caused
> the failure.
> 
> I had by misstake included suns 1.3.0/lib/tools.jar in my classpath.
> Somehow this seems to generate the failure.

OK, but this is something one might expect (that the tools.jar files
of different JDKs are not compatible). Good to know it now works for
you, so I can savely upgrade my JDK 8-)

Cheers

        Stefan

Re: rmic fails with jdk/1.3.0 from IBM

Posted by Peter Nordlund <pe...@lentus.se>.
Hi Stefan,

Strings ... produces the same output as you get.
>>strings $JAVA_HOME/bin/exe/rmic | grep Main
Main-Class is '%s'
Failed to load Main-Class manifest attribute from
getMainAttributes
Main-Class
sun.rmi.rmic.Main

Sorry for bothering you, but now that I knew that it worked ok for you,
I started to investigate my problem more thorougly and backed
a version of IBM jdk ....
Eventually I found out what probably caused the failure.

I had by misstake included suns 1.3.0/lib/tools.jar in my classpath.
Somehow this seems to generate the failure.

/Peter

Stefan Bodewig wrote:
> 
> Peter Nordlund <pe...@lentus.se> wrote:
> 
> >  I downloaded 1.3.0 from IBM 17 nov 2000 and it fails.
> >  I can run IBMs rmic manually on the command line, but from inside
> >  ant it fails.
> 
> I have an older version
> 
> bodewig@bodewig ~/java/tests >java -version
> java version "1.3.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
> Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20000623 (JIT enabled: jitc))
> 
> and it seems to work for me - I don't have a package starting with
> com.sun.corba either, neither in tools.jar nor in dt.jar or rt.jar.
> 
> The same class is not part of Sun's own JDK 1.3 for Linux either BTW,
> there is a package com/sun/corba/se/idl but not
> com/sun/corba/se/internal.
> 
> My best guess would be that comand line rmic doesn't use
> sun.rmi.rmic.Main. Does "strings JAVA_HOME/bin/exe/rmic | grep Main"
> give a result similar to mine?
> 
> bodewig@bodewig ~/tmp/rmic >strings /usr/local/java/jdk1.3/bin/exe/rmic | grep Main
> Main-Class is '%s'
> Failed to load Main-Class manifest attribute from
> getMainAttributes
> Main-Class
> sun.rmi.rmic.Main
> 
> Stefan

Re: rmic fails with jdk/1.3.0 from IBM

Posted by Stefan Bodewig <bo...@apache.org>.
Peter Nordlund <pe...@lentus.se> wrote:

>  I downloaded 1.3.0 from IBM 17 nov 2000 and it fails.
>  I can run IBMs rmic manually on the command line, but from inside
>  ant it fails.

I have an older version

bodewig@bodewig ~/java/tests >java -version
java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Classic VM (build 1.3.0, J2RE 1.3.0 IBM build cx130-20000623 (JIT enabled: jitc))

and it seems to work for me - I don't have a package starting with
com.sun.corba either, neither in tools.jar nor in dt.jar or rt.jar.

The same class is not part of Sun's own JDK 1.3 for Linux either BTW,
there is a package com/sun/corba/se/idl but not
com/sun/corba/se/internal.

My best guess would be that comand line rmic doesn't use
sun.rmi.rmic.Main. Does "strings JAVA_HOME/bin/exe/rmic | grep Main"
give a result similar to mine?

bodewig@bodewig ~/tmp/rmic >strings /usr/local/java/jdk1.3/bin/exe/rmic | grep Main
Main-Class is '%s'
Failed to load Main-Class manifest attribute from
getMainAttributes
Main-Class
sun.rmi.rmic.Main

Stefan