• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why rmic does not compile the remote interface implementing?

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Light Wan
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
The only taste of success some people get is to take a bite out of you. Or this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic