Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Fw: [jdt-core-dev] why is jdtCompilerAdapter.jar not exploded in org.eclipse.jdt.core_3.1.0.jar

Forwarding.

----- Forwarded by Philippe P Mulet/France/IBM on 05/14/2005 09:40 PM -----
                                                                           
             Jeff                                                          
             McAffer/Ottawa/IB                                             
             M@IBMCA                                                    To 
                                       Philippe P                          
             05/14/2005 02:27          Mulet/France/IBM@IBMFR@IBMDE        
             AM                                                         cc 
                                                                           
                                                                   Subject 
                                       Re: Fw: [jdt-core-dev] why is       
                                       jdtCompilerAdapter.jar not exploded 
                                       in                                  
                                       org.eclipse.jdt.core_3.1.0.jar      
                                       (Document link: Philippe P Mulet)   
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



This is actually an Ant question but I'll stab at it here.  Basically when
you contribute an Ant task you have to spec which jar it comes in.  That is
the jdtCompilerAdaptor.jar in this case.  When you run an Ant script, the
Ant support builds a classloader that knows about all the jars contributing
tasks etc and uses it to run the script.  If the ant jar code was simply
merged into the plugin jar (actually what we would like to have done), then
the Ant support cannot tell the difference between classes that should b
eloaded by the Ant classloader and ones that should be loaded by the
standard Eclipse classloaders.  (I should have mentioned that the special
Ant classloaders eventually delegate to the plugin classloaders allowing
tasks to reference standard plugin code).

So, an alternative that was considered was to have the task code in the
main jar but in a special dir or to have a look aside file that told the
ant classloaders which classes/packages are for it and which are for the
plugin.  Both of these were quite a bit more work for Eclipse but more
importantly they were more of a departure for task developers.  They would
have to maintain these lists and somehow get the build to do the right
thing etc.

In the RedHat case, if they use their file initializer to extract the jars
(this is what the Ant support does anyway) then the jars are not nested and
perhaps the gcj infrastructure can be made to understand them?

Jeff




                                                                           
             Philippe P                                                    
             Mulet/France/IBM@                                             
             IBMFR                                                      To 
                                       Jeff McAffer/Ottawa/IBM@IBMCA       
             05/13/2005 05:15                                           cc 
             PM                                                            
                                                                   Subject 
                                       Fw: [jdt-core-dev] why is           
                                       jdtCompilerAdapter.jar not exploded 
                                       in                                  
                                       org.eclipse.jdt.core_3.1.0.jar      
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           



Do you have an answer ?

----- Forwarded by Philippe P Mulet/France/IBM on 05/13/2005 11:15 PM -----
                                                                           
             ben konrath                                                   
             <ben@xxxxxxxx>                                                
             Sent by:                                                   To 
             jdt-core-dev-boun         jdt-core-dev@xxxxxxxxxxx            
             ces@xxxxxxxxxxx                                            cc 
                                                                           
                                                                   Subject 
             05/13/2005 10:03          [jdt-core-dev] why is               
             PM                        jdtCompilerAdapter.jar not exploded 
                                       in                                  
                                       org.eclipse.jdt.core_3.1.0.jar      
             Please respond to                                             
             "Eclipse JDT Core                                             
             developers list."                                             
                                                                           
                                                                           
                                                                           




Hi,

An "ahead of time" compiled version of the Eclipse Java batch compiler
[1] will be included on Fedora Core 4. The recent "jar'd plugins" might
present a problem for this and I'm wondering if there is an upstream
solution. Before I explain the problem, here's a quick run down of how we
were building ECJ with 3.1M6 ...

After the jdt.core plugin was built, the jars were compiled to shared
objects:
   gcj -g -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic -O2 \
       -o jdtcore.jar.so jdtcore.jar;
   gcj -g -fPIC -fjni -findirect-dispatch -shared -Wl,-Bsymbolic -O2 \
       -o jdtCompilerAdapter.jar.so jdtCompilerAdapter.jar

The jar.sos were then compiled into an ecj binary:
   gcj -g -O2 --main=org.eclipse.jdt.internal.compiler.batch.Main \
       -Wl,-R,%{_libdir}/%{name}/plugins/org.eclipse.jdt.core_3.1.0 \
       jdtcore.jar.so jdtCompilerAdapter.jar.so -o ecj

Finally, gcj-dbtool is used to create a database of class signatures so
that gcj knows when to use the ahead of time compiled version of a
class. Details of how to set this up with gcj-dbtool can be found in
eclipse.spec which is in the eclipse module in
:pserver:anonymous@xxxxxxxxxxxxxxxxxxxxx:/cvs/dist.

With the latest i-builds we have to manually extract
jdtCompilerAdapter.jar because gcj doesn't support "jars inside of
jars". It would be much better for us if jdtCompilerAdapter.jar was
exploded inside org.eclipse.jdt.core_3.1.0.jar. So, is there a reason
why the classes from jdtCompilerAdapter.jar are not exploded? Would it
be reasonable to file a bug about this?

Thanks, Ben

1. We call the Eclipse Java batch compiler "the Eclipse Compiler for
   Java" or ECJ.
_______________________________________________
jdt-core-dev mailing list
jdt-core-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jdt-core-dev




Back to the top