Hi Nicolas,

I'll try to give you information about GenIC and CLASSPATH.
I hope this will help you.

All the JOnAS scripts files located in the $JONAS_ROOT/bin/unix or
%JONAS_ROOT%\bin\nt directory use the file
"$JONAS_ROOT/bin/unix/config_env" on Unix
or the file "%JONAS_ROOT%\bin\nt\config_env.bat on Windows.
This is via this configuration file that you update the CLASSPATH for
JOnAS with
the prerequisites classes.
You may also add your own classes at the end of this file.
(This is described in the Installation guide and in comments in this
configuration file).

The GenIC tools calls the javac and rmic with the -classpath option and
its
classpath value, that's why you have 
        GenIC: Running 'javac -d . -classpath
                d:\dev\jonas-2-1-1\examples\classes;d:\dev\jonas-2-1-1;
                d:\dev\jonas-2-1-1\lib\RMI_jonas.jar
                ........
Then, you cannot specify the -classpath option to javac or rmic called
by GenIC.

Moreover, there is a syntax error in the GenIC command
        genic -verbose -d . -javacopts "-classpath ." ejb-jar.xml
instead of
        genic -verbose -d . -javacopts -classpath . ejb-jar.xml

To conclude, I think that you should update the config_env file to add
your own classes of your beans or use the XTRA_CLASSPATH variable in
your
environment, as it is described in the JOnAS documentation.

Kind regards,
Hélène.

Nicolas GANDRIAU wrote:
> 
> Hi,
> I am trying to integrate the open source tool "ant" :
> http://jakarta.apache.org/ant/index.html in my Jonas development
> environment and I need to use the options of the GENIC tool.
> 
> My environment is
>     windows NT 4
>     jdk 1.3 (SUN)
>     JONAS 2.1.1
>     ant 1.2
> 
> I am especialy interested by the parameter -javacopts (and I assume
> -rmicopts).
> In fact, I want to dynamically build the classpath for the javac and
> rmic tools.
> 
> assume that my current directory contains my .class and the file
> ejb-jar.xml
> if I use the following command :
> genic -verbose -d . -javacopts -classpath . ejb-jar.xml
> 
> I obtain the following error message :
> java -Dinstall.root=d:\dev\jonas-2-1-1 org.objectweb.jonas.tools.GenIC
> -verbose -d . -javacopts -classpath . ejb-jar.xml
> 
> GenIC for JOnAS 2.1.1: Bean 'FileWriterEJBean' generation...
> GenIC: The Implementation Remote Class is successfully generated in
> .\com\nico\util\ejb\JOnASFileWriterEJBeanRemote.java
>  file.
> GenIC: The Implementation Home Class is successfully generated in
> .\com\nico\util\ejb\JOnASFileWriterEJBeanHome.java fil
> e.
> GenIC: Running 'javac -d .  -classpath -classpath
> d:\dev\jonas-2-1-1\examples\classes;d:\dev\jonas-2-1-1;d:\dev\jonas-2-
> 1-1\lib\RMI_jonas.jar;
> .\com\nico\util\ejb\JOnASFileWriterEJBeanRemote.java
> .\com\nico\util\ejb\JOnASFileWriterEJBeanHo
> me.java'
> javac: invalid argument:
> 
>d:\dev\jonas-2-1-1\examples\classes;d:\dev\jonas-2-1-1;d:\dev\jonas-2-1-1\lib\RMI_jonas.jar;
> 
> Usage: javac <options> <source files>
> where possible options include:
>   -g                        Generate all debugging info
>   -g:none                   Generate no debugging info
>   -g:{lines,vars,source}    Generate only some debugging info
>   -O                        Optimize; may hinder debugging or enlarge
> class file
>   -nowarn                   Generate no warnings
>   -verbose                  Output messages about what the compiler is
> doing
>   -deprecation              Output source locations where deprecated
> APIs are used
>   -classpath <path>         Specify where to find user class files
>   -sourcepath <path>        Specify where to find input source files
>   -bootclasspath <path>     Override location of bootstrap class files
>   -extdirs <dirs>           Override location of installed extensions
>   -d <directory>            Specify where to place generated class files
> 
>   -encoding <encoding>      Specify character encoding used by source
> files
>   -target <release>         Generate class files for specific VM version
> 
> GenIC ERROR: Failed when compiling the implementation classes via java
> compiler
> The command sucessfully generate the .java files. But it failed to
> compile them. It seems that GENIC, does not handle correctly handle the
> fact that I want to overides its definition of the -classpath option. In
> fact it does not handle the value I give to the -classpath option.
> If I use instead "-classpath .", the javac command it generate is the
> following :
> javac -d .  -classpath .  -classpath
> d:\dev\jonas-2-1-1\examples\classes;d:\dev\jonas-2-1-1;d:\dev\jonas-2-
> 1-1\lib\RMI_jonas.jar;
> .\com\nico\util\ejb\JOnASFileWriterEJBeanRemote.java
> .\com\nico\util\ejb\JOnASFileWriterEJBeanHo
> me.java
> 
> So my classpath value is overriden by the GENIC's one
> 
> I have missed something in the GENIC tool usage?
> 
> Thank you
> 
> ----
> To unsubscribe, send email to [EMAIL PROTECTED] and
> include in the body of the message "unsubscribe jonas-users".
> For general help, send email to [EMAIL PROTECTED] and
> include in the body of the message "help".

-- 
-=- Hélène JOANIN -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  mailto:[EMAIL PROTECTED]   http://www.evidian.com
  Phone: 33.4.76.29.73.53            Fax: 33.4.76.29.76.00
  Download our EJB Server JOnAS at http://www.objectweb.org
----
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body of the message "unsubscribe jonas-users".
For general help, send email to [EMAIL PROTECTED] and
include in the body of the message "help".

Reply via email to