aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Why rmic does not compile the remote interface implementing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Why rmic does not compile the remote interface implementing? " Watch "Why rmic does not compile the remote interface implementing? " New topic
Author

Why rmic does not compile the remote interface implementing?

Light Wan
Ranch Hand

Joined: May 15, 2002
Posts: 31
On platform RH8.0, J2SDK1.4.1_02, I use rmic to compile the implementing class of remote interface, but output the following message. On window2000, J2SDK1.4.1_02, the rmic works fine. Could someone tell me why the rmic does not work on RH8.0? Thanks very much!
Exception in thread "main" java.lang.InternalError: Unexpected exception while defining class suncertify.client.FBNClientView: java.lang.ClassNotFoundException: javax.swing.JFrame
at 0x4027615f: java.lang.Throwable.Throwable(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4026908e: java.lang.Error.Error(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40276542: java.lang.VirtualMachineError.VirtualMachineError(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4026aa92: java.lang.InternalError.InternalError(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40267ff2: java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int, java.security.ProtectionDomain) (/usr/lib/libgcj.so.3)
at 0x40267dbb: java.lang.ClassLoader.defineClass(java.lang.String, byte[], int, int) (/usr/lib/libgcj.so.3)
at 0x4030029b: java.net.URLClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x402556d7: gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40267cac: java.lang.ClassLoader.loadClass(java.lang.String, boolean) (/usr/lib/libgcj.so.3)
at 0x40255dcc: _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader) (/usr/lib/libgcj.so.3)
at 0x402521fd: java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.3)
at 0x4024af7c: _Jv_BytecodeVerifier.type.compatible(_Jv_BytecodeVerifier.type&, _Jv_BytecodeVerifier) (/usr/lib/libgcj.so.3)
at 0x4024816f: _Jv_BytecodeVerifier.verify_instructions_0() (/usr/lib/libgcj.so.3)
at 0x4023e697: _Jv_VerifyMethod(_Jv_InterpMethod) (/usr/lib/libgcj.so.3)
at 0x40236a24: _Jv_PrepareClass(java.lang.Class) (/usr/lib/libgcj.so.3)
at 0x40255568: java.lang.ClassLoader.linkClass0(java.lang.Class) (/usr/lib/libgcj.so.3)
at 0x40268073: java.lang.ClassLoader.resolveClass0(java.lang.Class) (/usr/lib/libgcj.so.3)
at 0x4025399c: java.lang.Class.initializeClass() (/usr/lib/libgcj.so.3)
at 0x40252224: java.lang.Class.forName(java.lang.String, boolean, java.lang.ClassLoader) (/usr/lib/libgcj.so.3)
at 0x402522bf: java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x4032a1ff: gnu.java.rmi.rmic.RMIC.findClass() (/usr/lib/libgcj.so.3)
at 0x40329fd1: gnu.java.rmi.rmic.RMIC.analyzeClass(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40329d1d: gnu.java.rmi.rmic.RMIC.processClass(java.lang.String) (/usr/lib/libgcj.so.3)
at 0x40329c7c: gnu.java.rmi.rmic.RMIC.run() (/usr/lib/libgcj.so.3)
at 0x40329b3b: gnu.java.rmi.rmic.RMIC.main(java.lang.String[]) (/usr/lib/libgcj.so.3)
at 0x40250308: gnu.gcj.runtime.FirstThread.call_main() (/usr/lib/libgcj.so.3)
at 0x402bb0b1: gnu.gcj.runtime.FirstThread.run() (/usr/lib/libgcj.so.3)
at 0x4025cfdc: _Jv_ThreadRun(java.lang.Thread) (/usr/lib/libgcj.so.3)
at 0x4022978c: _Jv_RunMain(java.lang.Class, byte const, int, byte const, boolean) (/usr/lib/libgcj.so.3)
at 0x402298ad: JvRunMain (/usr/lib/libgcj.so.3)
at 0x080485a0: ?? (??:0)
at 0x420158d4: ?? (??:0)
at 0x080484ed: ?? (??:0)


SCJP2
Murali Nanchala
Ranch Hand

Joined: Mar 14, 2001
Posts: 74
At the command prompt where you are trying to RMIC, check the version of Java you are running using java -version.
Also check which java at the command prompt. Is it pointing to your JDK1.4?


"It is almost always answered in the API" - Murali Nanchala
frank sun
Ranch Hand

Joined: Apr 11, 2003
Posts: 102
And, please check if the classpath is set correctly? the rmic has the option classpath to locate the relative classes.
Frank
Light Wan
Ranch Hand

Joined: May 15, 2002
Posts: 31
I checked the rmic compiler(which rmic), the system showed me that /usr/bin/rmic. So, in RH8.0,
there two rmic, one is at /usr/bin/rmic and the other is at /usr/java/j2sdk1.4.1_02/bin. In fact, the rmic in JAVA_HOME should be used.
Thanks all of you!
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11481
    
  94

Hi Light,
Do you have kaffe installed? (try rpm -q kaffe) - if so, then I would recommend you uninstall it (if you are allowed to) since you dont really want to have two java compilers installed.
(For anyone interested: Kaffe is a cleanroom implementation of Java (that is, it was developed by people outside of Sun based purely on the published documentation from Sun) that was developed when Sun used to release each version of Java for Linux several months after they had released the version for Solaris and Windows).
If you dont have kaffe installed, it might be worth trying to find out what has installed the non desired rmic compiler. Try rpm -q --whatprovides /usr/bin/rmic. Once you have found out what the package is, decide if you really need it - other similar problems could also occur with other clashes in executables, or libraries, or .....
By the way, there is a Linux forum in JavaRanch - perhaps this question should have been raised there?
Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Light Wan
Ranch Hand

Joined: May 15, 2002
Posts: 31
Hi Andrew,

Thank you very much! You are right!

On RH8, other three packages need libgcj. I use rpm -e to delete all of them. Now, I do not need to specify the path of rmic. rmic works fine.
Thank your reply on this and linux forum.
Regards, Light rpm -e
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why rmic does not compile the remote interface implementing?