problem with importing jars into JCAPS eDesigner

hi,

can any body help me about in how many ways we can import jars into eDesigner.Because here i'm trying to putting jars into "eDesigner/usrdir/lib" directory but i'm not able to pick/find those classes from the collaborations, previously i have done with ICAN and its worked out. but here i'm not able to do it.

Thanks

[343 byte] By [GoldFish] at [2007-11-26 10:35:18]
# 1
You'll need to put them in edesigner/lib/ext and restart the edesigner afterwards.
guido@be at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 2
Why not just import into the project that is using the JAR in JCAP? There is less of a JAR management issue when there is a large developer population coding in the same repository.
bgrant88 at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 3

hi,

Directly importing jars into project and collaboration is better when we have less no of jar files but if we have more jars then if we import them into project directly will grow ear file size also if there is any modificataions again i have import all the jars into project and agian redeployment and so on...but if we place jars into the specified directory where user jars have to be place it will give us better options than noraml importing jars method.

Thanks

GoldFish at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 4

You only need and usefully can import into the Project structure the JARs you actually use and reference from the JCDs. These JARs then get deployed to the IS. There is no need to place any extra JARs in the eDesigner directory tree if you import required JARs into the project. Other JARS, even the ones on which your imported JARs rely are not referenced in eDesigner at any time, wether at JCD validation time or at EAR building time.

At runtime your additional JARs, the ones on which your imported JARs rely, must be in the classpath somewhere so the IS can find them. The best way to do this is to put them into a directory of your own and add the path to the directory to the IS's classpath append or classpath prepend.

mczapski at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 5
Michael, is it correct that you can put a directory in the classpath. As far as I can tell you need to list all the individual JAR files.
lerognon at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 6
To the best of my knowledge , All the JAR files need to be listed individually.> Michael, is it correct that you can put a directory> in the classpath. As far as I can tell you need to> list all the individual JAR files.
CAPSHelp at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 7

If you have jar files that are shared by all of your projects, you may want to load them as "extensions." The runtime has a facility for specifying optional packages via the extensions mechanism. It was designed to allow you to add optional javax packages to the core classpath without having to include all the jar files in the classpath itself.

You use it by specifying the java.ext.dirs environment variable on the command line. By defalt it is <java root>/jre/lib/ext. You can add your own ext dir to the path by adding your dir to the default java.ext.dirs=$JAVA/jre/lib/ext:$LIB_DIR/mylib/ext

One thing to be aware of is that the extensions take precedence to any jars listed in the classpath. You may experience undesired behavior if you inadvertently replace a jar in the classpath.

Your milage may vary.

mjenkins at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 8
Yes. Tht's correct.
mczapski at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 9
And the biggest potential issue with this approach is that you need to remenber to "extend" all your Java CAPS domains to which your rpoject can be potentially deployed and you must be mindful of JAR versining issues you may get over a number of projects.
mczapski at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...
# 10

As mczapski points out, jar files imported to the repository and used by collaborations are deployed within the ear file to the IS. While this is sometimes the easiest approach, it does require that you rebuild and redeploy any using applications when the jar needs to be changed and reimported to the repository. (In past releases this also required several other steps to workaround related problems.)

Adding shared jar files to ../usrdir/lib/ext (or other such location) in edesigner and to a suitable IS classpath suffix avoids the need to rebuid and redeploy applications should a change confined to the jar file be required. One way to make provide all developers the lastest jar is to update the edesigner.zip and have them download it using the Suite Installer.

Regards.

AKsuited at 2007-7-7 2:45:38 > top of Java-index,Java Enterprise System,Java Composite Application Platform Suite -- General Discussion...