Give me a convenient method to add an external jar file to JRE.
At past, when i use some external frameworks like struts,servlet, i should set the classpath as:
.;C:\jdk1.5.0\lib\tools.jar;C:\jdk1.5.0\lib\xercesImpl.jar;C:\ApacheGroup\Tomcat 5.5\common\lib\servlet-api.jar;C:\ApacheGroup\Tomcat 5.5\common\lib\struts.jar;C:\classes\;C:\ApacheGroup\Tomcat 5.5\webapps\struts-blank\WEB-INF\classes\
when i want to use an exeternal framework, i must add the %INSTALL_PATH%\someframeworkname.jar to the classpath.
But i feel that is inconvenient for me, for example,I want to use jaxp,jaxr,jaxm,jaxrpc,saaj, I must add each of the jar file to the classpath.
I think that must be a convenient method to do that?
Can u give me a method?
hi
As I think u have to follow this step to use external jar in jre.
1. Find installed jre path in one variable
2. At Installation time add jar file to lib
U can get jre path using System property
Similar Messages
-
How to add one poi jar file into webdynpro project
Hi all:
We would like to add one poi jar file into one webdynpro project, however, what should we do ?
Its one external 3rd party jar file.Hi,
To add a jar file you need to have an external library DC.
Hope the below link will help you:
[http://help.sap.com/saphelp_nw70/helpdata/en/46/3ce3e4df201d63e10000000a11466f/frameset.htm]
thanks & regards,
Manoj -
how to add images in jar file?
Check this article in ADF code corner:
http://www.oracle.com/technetwork/developer-tools/adf/learnmore/86-images-from-jar-427953.pdf
Thanks,
Navaneeth -
How to add the mail.jar file to my CLASSPATH ?
Hi;
I wish to Instal JavaMail 1.2
To use the JavaMail 1.2 API, i unbundle the javamail-1_3_1-upd.zip file.....and now, i would like to add the mail.jar file to your CLASSPATH.
My question is: how do you do this ?
- ok i did that for CATALINA_HOME & JAVA_HOME but how to add the mail.jar file to my CLASSPATH ??
1000 thanks.I think you're looking for "developer support", not packaged application support. different server, different batch of groups. . .
Since I have very little contact with devopers, I don't truly know. -
Classes+resources in JAR: have to add each single Jar file to CLASSPATH?
Hello,
For my application, I plan to easily embed plugins that can be added by the user by copying it into a subfolder "plugins".
Now, I start my app from a shellscript and in order to load resources from within some of these Jars (e.g. using Class.getResourceAsStream() ), it only works if I explicitly add the specific Jar filename to the classpath from the shellscript.
I read in a German Java book, that also just using folder names is enough, but it does not work for me:
Works:
$JAVA_HOME/bin/java -Djava.library.path="./lib" -classpath "./lib:./plugins/test.jar" test.AppFails:
$JAVA_HOME/bin/java -Djava.library.path="./lib" -classpath "./lib:./plugins/" test.AppIs it really required to add Jars explicitly, so that e.g. my shellscript has to make a Jar listing of that folder in order to pass them as classpath files?
Thanks and regards,
TimoNo, you don't have to do it that way. What you need
to do is to have your progam create a URLClassLoader
pointing to all the jars in the plugin directory.
Then request your plugin classes from that, rather
than Class.forName();
You need to create an array of file URLs for the
jars, use File.listFiles() and then File.toURL() on
each ..jar you find.
p.s. If you do it this way make sure your plugin
classes are not on the classpath.
Hmm. Cool. I had no idea. Thanks for correcting me. -
Do I need to add to add a new jar file to the WLS ?
I am new to java development and would like to know if I were to use a new jar
file developed by another party in my EJB development, do I need to have this
jar file available in WLS when I deploy the EJB to it ?
I think this is not required but just need a confirmation.
ThanksHi,
I take this to mean you are using java classes from the 3rd party jar in your
EJB bean class. If that is the case, then you need the jar file in your classpath
when you compile the EJB classes.
Also, you will need the jar file to be in the classpath when the EJB is used.
You can do this in a variety of ways. If the 3rd party jar is going to change
infrequently, then you can put it in the system CLASSPATH in your startWebLogic
script. Or you can add all the classes of the jar file in the root level of the
EJB (Yuck!!).
Perhaps the best answer is to create an enterprise application (EAR). Then you
place the jar file in the root level of the EAR. In the META-INF\MANIFEST.MF
file of the EJB place
Class-Path: filename.jar
Then when you build the .ear file use:
jar -cvfm ..\commuterLog.jar META-INF\MANIFEST.MF *
hope this helps,
pat
"John" <[email protected]> wrote:
>
I am new to java development and would like to know if I were to use
a new jar
file developed by another party in my EJB development, do I need to have
this
jar file available in WLS when I deploy the EJB to it ?
I think this is not required but just need a confirmation.
Thanks -
How do I add my own JAR file to the classpath?
When I put a JAR file containing several compiled Java classes in the '/opt/SUNWips/lib' directory they are not found while compiling a JSP-Provider. When I extract them from the JAR it is not a problem (I think because the '/opt/SUNWips/lib' directory is already in the classpath).
Where can I add my JAR to the classpath?I have been successfully editing the jvm12.conf file to add jars. This is
the web server config file in
/opt/netscape/server4/http-your.server.com/config directory. Add to the
jvm.classpath line with all the other jars. Yes, lib is in the path, but
Java doesn't see inside the jars unless they are explicitly in the path.
"Ulf Licht" <[email protected]> wrote in message
news:[email protected]..
When I put a JAR file containing several compiled Java classes in the
'/opt/SUNWips/lib' directory they are not found while compiling a
JSP-Provider. When I extract them from the JAR it is not a problem (I
think because the '/opt/SUNWips/lib' directory is already in the
classpath).
Where can I add my JAR to the classpath?
Try our New Web Based Forum at http://softwareforum.sun.com
Includes Access to our Product Knowledge Base! -
How to add version to jar file
Hi,
Does anyone know if there is way to add the version property to a jar file? Like VB component, if we right click on it, and choose property, we can find the version of it.
Thanks a lot.See this thread:
http://forum.java.sun.com/thread.jsp?forum=22&thread=198721 -
How can i add update signed jar file
I am developing an applet which requires signing to run in a browser.
I am developing supporting classes. But these class files have to be added
to the jar. Isnt it??
But to test the applet i need to load it in the browser each time i modify the class files. So the jar file need to be updated every time. But an
IOError
is being displayed when i try to update the signed jar file.
How can i update signed jar file?? Or is there any othe way to test the signed applet during development??How can i update signed jar file?You can't, the signature is there to make sure the content of the jare hasn't been messed
with.
Either recreate the jar and re sign it or set up a policy during testing. -
How to add the stl.jar file
Hi,
where should i put the jstl.jar file in order to use it with apache tomcat.
thnx.The jstl.jar and standard.jar files should be in the web-inf/lib directory of your webapplication.
-
How to add an external CSS file in master page
Hi,
We're running a SharePoint 2013 (Office 365) team site. I'd like to use the same formatting in all my site pages. I currently use a script editor web part to apply the formatting changes which is cumbersome. How can I utilize a css file so
that all of the site pages use the same formatting?
The site that I want to apply the formatting to is a sub site of the main site. Only the main site has a "Styles Library" if this matters.
Thanks.
BrianYou can also consider activating publishing features and uploading the css files to the Styles library that is created. This allows you to override the oob CSS.
Steven Andrews
SharePoint Business Analyst: LiveNation Entertainment
Blog: baron72.wordpress.com
Twitter: Follow @backpackerd00d
My Wiki Articles:
CodePlex Corner Series
Please remember to mark your question as "answered" if this solves (or helps) your problem. -
Hi all,
I am using some external jar files for my backing bean.
As of now I am adding jar files to my view properties in the libraries tab.
when I shift my application to another machine I got to add the jar files again. Kindly comeup
with the ways in which I can add the jar files permanently to my application. I dont want to add
the jar files when ever I shift my app to other system.
Thanks,
PhaniDo you use any kind of source control system (SVN, GIT, ...)
That's the reason why you should. You normally put thirs party jars somewhere where you can access them from every pc.
How do you 'shift your app' to an other machine?
Just copy the directory? Then you can copy a directory containing the jars too.
On other solution would be to put hte jars into the workspace folder of your app (e.g. tird-party-jars) and set up a library in dev pointing to this folder. Disadvantage of this method is that you need to do this for every app you create. So I wouldn't consider this as a solution.
Timo -
Good morning.
I need to add an external library to my project. The library is the Apache POI (http://poi.apache.org/). Anyway, I do not know how to do it because it gives me many problems. I tried modifying the classpath and placing it in the lib folder of the project from "Navigator". Also project properties, add. jar outside, and throws me the following error:
The project not was built STI Since classpath is incomplete. Can not find the file class for java.lang.Iterable. Fix the classpath Rebuilding Then try this project. "LocalDevelopment ~ name ~ vendor."
Also this:
Indirectly this compilation unit references the missing type java.lang.Iterable (typically Some required class file is referencing a type Outside the classpath).
Given these errors, I know my includes without problems and I can instantiate objects from library classes, but these errors I can not deploy.
I read the following link:
/people/bertram.ganz/blog/2008/11/24/how-to-use-external-jar-files-in-web-dynpro-development-components
but my version is 2.0.14 NetWeaver. On the other hand, did not understand because they do not know how to add "External Library DC. "
Infinitely appreciate any help. Thank you very much.I'm trying to work with POI that can be found in http://poi.apache.org/. The. jar I'm adding are
commons-logging-1.1.jar
junit-3.8.1.jar
log4j-1.2.13.jar
poi-3.7-20101029.jar
poi-examples-3.7-20101029.jar
poi-OOXML-3.7-20101029.jar
poi-OOXML-schemas-3.7-20101029.jar
poi-scratchpad-3.7-20101029.jar
Of the code is
HSSFWorkbook HSSFWorkbook book = new ();
/ / Create a sheet inside the book
HSSFSheet libro.createSheet leaf = ();
/ / Create a row within the sheet
HSSFRow row = hoja.createRow (0);
/ / Create a cell within the row
HSSFCell fila.createCell cell = ((short) 0);
/ / Create the contents of the cell and gets into it.
HSSFRichTextString HSSFRichTextString text = new ("hello world");
When I look for the "Organize Imports" I do not recognize any other additional library
Edited by: Daynet1840 on Feb 26, 2011 3:19 PM -
Jar files to add to the classpath for KM development.
Hello Friends:
I am trying to retrieve the favorites of the user stored
under him home folder. In KM we have a readymade iview,
called 'Favorites'. I am programmatically trying to
read the values stored by this iview.
I am using NWDS 2.0.5 on EP60SP2Patch3. When I use the
following code,
IUserManagementService umService =
(IUserManagementService) request.getService(IUserManagementService.KEY);
// get the user object
IUser user =
umService.getDefaultFactory().getUser(userId);
IResourceContext context = new ResourceContext(user);
in my IDE I get the following error:
"This compilation unit indirectly references a missing
type com.sapportals.portal.security.usermanagement.
IUserFactory"
The following are the jar files added to my project's
classpath.
com.sap.portal.usermanagementapi.jar
com.sap.portal.usermanagementcore.jar
com.sap.portal.usermappingapi.jar
com.sap.security.api.jar
com.sap.security.api.perm.jar
com.sap.security.core.jar
com.sap.security.core.tpd.jar
apart from the usual portal framework related jar files.
I tried also to add all the jar files with the prefix like...
com.sap.km.*
com.sap.netweaver.bc.*
It didn't help.
What are the other jar files I need to add, and where
they are available.
BTW, I unzipped all the 'portallibs' downloaded from the
portal and using those jar files to attach to the project.
Thank you very much,
Prasad NutalapatiHi Prasad,
additionally you need com.sap.security.api.ep5.jar due to the fact that KM is using the old EP5 usermanagement libraries.
Concerning the KM / RF libraries I would recommand to include all libraries matching the patterns bc._api.jar and km._api.jar
Best regards,
Thilo -
Add & use custom jars in "Java embedding" component
I need to generate pdf file in process.
So I included "Java embedding" component, and write my code. For clarity example:
com.itextpdf.text.Document document = new com.itextpdf.text.Document(
com.itextpdf.text.PageSize.A4, 50, 50, 50, 50);
try {
com.itextpdf.text.pdf.PdfWriter pdf = com.itextpdf.text.pdf.PdfWriter
.getInstance(document, new java.io.FileOutputStream("c:\\text.pdf"));
document.open();
document.add(new com.itextpdf.text.Paragraph("This is test message"));
catch (com.itextpdf.text.DocumentException de) { System.err.println(de.getMessage()); }
catch (Exception de) { System.err.println(de.getMessage());}
document.close();Im using external jar file, of course I add it to classpath (right click soa project -> properties -> libraries and classpath ->add jar).
But I get folowing error (no during compilation, but during deploying):
Failed to compile bpel generated classes.
failure to compile the generated BPEL classes for BPEL process "SimpleProcess" of composite "default/SOAProject!1.0*soa_9f8e80a4-346d-424e-9e12-1b69e2024e58"
The class path setting is incorrect.
Ensure that the class path is set correctly. If this happens on the server side, verify that the custom classes or jars which this BPEL process is depending on are deployed correctly. Also verify that the run time is using the same release/version.
[04:35:23 PM] Check server log for more details.
[04:35:23 PM] Error deploying archive sca_SOAProject_rev1.0.jar to soa_server1 [[fe80:0:0:0:5968:cb45:2001:f6ce]:8001]
[04:35:23 PM] #### Deployment incomplete. ####
[04:35:23 PM] Error deploying archive file:/C:/Projects/SOAProject/deploy/sca_SOAProject_rev1.0.jar
(oracle.tip.tools.ide.fabric.deploy.common.SOARemoteDeployer)where ist the problem???
Edited by: user1175491 on Nov 2, 2010 4:39 PMAjaykumar, can u please write me what exactly append to bpel:exec part (which classes include?)? it looks now:
<bpelx:exec name="GeneratePDF" version="1.5" language="java">
<![CDATA[
com.itextpdf.text.Document document = new com.itextpdf.text.Document(
com.itextpdf.text.PageSize.A4, 50, 50, 50, 50);
try {
com.itextpdf.text.pdf.PdfWriter pdf = com.itextpdf.text.pdf.PdfWriter
.getInstance(document, new java.io.FileOutputStream("c:\\text.pdf"));
document.open();
document.add(new com.itextpdf.text.Paragraph("This is test message"));
catch (com.itextpdf.text.DocumentException de) {System.err.println(de.getMessage());}
catch (java.lang.Exception de) {System.err.println(de.getMessage());}
document.close();]]>
</bpelx:exec>Edited by: user1175491 on Nov 2, 2010 5:07 PM
Edited by: user1175491 on Nov 2, 2010 5:08 PM
Maybe you are looking for
-
Computer can't read or wright to my ipod shuffle
The computer seems to recognise the ipod and the tunes seem to transfer but the ipod will not play, when I try to autofill I get the message that the disk 'cannot be read or written to'. I've tried restoring to the factory settings but I get a messag
-
Lack of trained support agents!
Hi all To start with im a pretty savvy computer user. When contacting BT and asking about thier unlimited BB i was told by the slaes rep that he had downloaded 500gig a month without restriction and i would not need to worry about a a fup restricting
-
How to reflect new changes in older instance of work flow?
Hi All, I am working on a custom workflow. This workflow is triggered by web dynpro component. Earlier my custom infotype was getting updated from web dynpro, and work flow is used to maintain process flow. But currently we started facing some author
-
I have 2 domain controllers running 2003 server, server1 and server2. I ran dcpromo on server1 and removed AD and removed him from the domain and disconnected from network. I then added a 2012 server with the same name and IP address server1 with no
-
Hi , I would reaally appreciate if someone could post an example of using a JList as a custom Cell renderer Thank you.