gcj and apache

Zhi Qing Wu zhiqing69@yahoo.co.uk
Thu Sep 9 14:45:00 GMT 2004


Hello,
I wrote a GCJ C program and a Java class (see the
attachment for details, java2.cpp and Sigclass.java).
I tried to let the C program to call the "main" method
of the Java class by putting the path of compiled Java
class into CLASSPATH. 
For example, in this way:
export CLASSPATH=/home/zhiqing/make/example3
Directory "example3" contains the compiled class
single/Sigclass.class
The execution of the compiled C program is successful.
(Main procedures:
 gcc java2.cpp -o java2 -lgcj -lstdc++
 javac single/Sigclass.java
 ./java2 single.Sigclasss www
)
If I compressed the class "single/Sigclass.class" into
jar (say single1.jar), the result is also successful. 
(
 jar -cvf single1.jar single/Sigclass.class
 export
CLASSPATH=/home/zhiqing/make/example3/single1.jar
)
However, if I copied the GCJ C program to an apache
module (wrote in GCJ C, no errors occur in
compilation, mod_permis.cpp) and ran the apache after
set CLASSPATH:
export CLASSPATH=/home/zhiqing/make/example3/ or
/home/zhiqing/make/example3/single1.jar
The error_log of the apache:
....
Unhandled Java exception:
java.lang.ClassNotFoundException: single.Sigclass not
found in
[file:/home/zhiqing/make/example3, file:./, core:/]
....
or
Unhandled Java exception:
java.lang.ClassNotFoundException: single.Sigclass not
found in
[file:/home/zhiqing/make/example3/single1.jar,
file:./, core:/]
The apache in my computer is version 1.3.29 compiled
with the same gcc (gcc (GCC) 3.3.2) as mentioned
above.
Why gcj can not search its CLASSPATH in this case? Any
advice or suggestion would be appreciated.
Zhi Qing
	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: java2.cpp
Type: application/octet-stream
Size: 2896 bytes
Desc: java2.cpp
URL: <http://gcc.gnu.org/pipermail/java/attachments/20040909/bbb25a02/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Sigclass.java
Type: application/octet-stream
Size: 800 bytes
Desc: Sigclass.java
URL: <http://gcc.gnu.org/pipermail/java/attachments/20040909/bbb25a02/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_permis.cpp
Type: application/octet-stream
Size: 3797 bytes
Desc: mod_permis.cpp
URL: <http://gcc.gnu.org/pipermail/java/attachments/20040909/bbb25a02/attachment-0002.obj>


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /