Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Stupid user question on rmic

1 view
Skip to first unread message

Joseph Dionne

unread,
Dec 23, 2005, 2:55:29 PM12/23/05
to
I have the following directory tree structure and contents therein.

./class
`-- com
`-- project
`-- services
`-- lib
|-- Hello.class

As I read the docs on rmic, the following command line should result in the
creation of ./class/com/project/services/lib/Hello_Stub.class.

rmic -v1.2 -classpath class -d class com.project.services.lib.Hello

However, I get the following ClassNotFoundException

java.lang.ClassNotFoundException: com.project.services.lib.Hello not found in
[file:./, core:/]
at java.net.URLClassLoader.findClass(java.lang.String)
(/usr/lib/libgcj.so.4.0.0)
at gnu.gcj.runtime.VMClassLoader.findClass(java.lang.String)
(/usr/lib/libgcj.so.4.0.0)
at java.lang.ClassLoader.loadClass(java.lang.String, boolean)
(/usr/lib/libgcj.so.4.0.0)
at _Jv_FindClass(_Jv_Utf8Const, java.lang.ClassLoader)
(/usr/lib/libgcj.so.4.0.0)
at java.lang.Class.forName(java.lang.String, boolean,
java.lang.ClassLoader) (/usr/lib/libgcj.so.4.0.0)
at java.lang.Class.forName(java.lang.String) (/usr/lib/libgcj.so.4.0.0)
at gnu.java.rmi.rmic.RMIC.findClass() (/usr/lib/libgcj.so.4.0.0)
at gnu.java.rmi.rmic.RMIC.analyzeClass(java.lang.String)
(/usr/lib/libgcj.so.4.0.0)
at gnu.java.rmi.rmic.RMIC.processClass(java.lang.String)
(/usr/lib/libgcj.so.4.0.0)
at gnu.java.rmi.rmic.RMIC.run() (/usr/lib/libgcj.so.4.0.0)
at gnu.java.rmi.rmic.RMIC.main(java.lang.String[]) (/usr/lib/libgcj.so.4.0.0)

What bonehead thing am I not doing corectly?

Joseph

Jean-Francois Briere

unread,
Dec 23, 2005, 3:05:53 PM12/23/05
to
Simple test, try by specifying absolute paths:

rmic -v1.2 -classpath /some/absolute/path/class -d
/some/absolute/path/class com.project.services.lib.Hello

VisionSet

unread,
Dec 23, 2005, 3:14:54 PM12/23/05
to

"Joseph Dionne" <jdi...@hotmail.com> wrote in message
news:RCYqf.9921$Dd2....@newsread3.news.atl.earthlink.net...

>
> As I read the docs on rmic, the following command line should result in
the
> creation of ./class/com/project/services/lib/Hello_Stub.class.
>
> rmic -v1.2 -classpath class -d class com.project.services.lib.Hello
>
> However, I get the following ClassNotFoundException

If you use SDK1.5 you don't need to use rmic, javac does the lot

--
Mike W


Joseph Dionne

unread,
Dec 23, 2005, 3:21:14 PM12/23/05
to

Same result, ClassNotFoundException. However, if I change directory to the
"class" directory, and run the following command line it works fine.

rmic -v1.2 -classpath . -d . com.project.service.lib.Hello

I have tried absolute path, relative path, i.e. "./class", and rmic seems not
to use "-classpath' BUT, just on a lark, I tried the following command line
and it works.

CLASSPATH=./class rmic -v1.2 -d class com.project.services.lib.Hello

I assume rmic has a bug with option "-classpath"

Thanks for help, work around found and will be used.

Joseph

Joseph Dionne

unread,
Dec 23, 2005, 4:14:01 PM12/23/05
to


I am using SuSE Linux, and it has someone's third party rmic command, which is
what I was running, not Sun's JDK rmic.

In short, Sun's rmic works as documented.

Sorry for the confusion, and thanks for the help
Joseph

0 new messages