Using jar file in XML

hi all,
Dont get angry for asking this silly question.I m new for XML.
I have an image that is in jar file ,i want to display that image in an XML page.
What problem occurs is when i run the jar file ,XML and XSL files created in C drive.
But the image path in img tag occurs as
"jar:file:/D:/ARManagerV5.7/ArTool.jar!/Images/tufts.jpg"
I dont know how to give path for image.
So it is not displaying image.
Please Some one help me to solve this problem.

Your URL is correct for an image within a jar file. I imagine that the viewer for your XML cannot read and render an image from within a jar file. You may need to extract the image file just like the XML and XSL files.
-Jim

Similar Messages

  • How to use 3rd party jar files for xml transform

    Hi all,
    Am using OAS9.0.4 and I deployed my .ear successfully.
    In my application am using 4 jar files for xml transformation. (xerces.jar, xalan.jar, xml-apis.jar,xercesImpl.jar)
    OAS has its own xmlparserv2.jar file. Its using this jar file for transforming xml data and not even looking for above mentioned 4 jar files.
    In opmn.xml, I provided these 4 jar files in to class path. Then also it didn't effect my output.
    I also tried as put these 4 jar files into j2ee\home\applib directory, but o result.
    Can anybody tell me where should I keep these 4 jar files in OAS and OAS should use these 4 jar files instead of its own xmlparserv2.jar for transforming data.
    Thanks in Anticipation,
    Regards,
    RK

    Add the Xbootclasspath variable in the java-options field. It will somewhat look like the following in your opmn.xml file
    <process-type id="<OC4J Instance Name>" module-id="OC4J">
    <module-data>
    <category id="start-parameters">
    <data id="java-options value="........... -Xbootclasspath^/a:<location of your jar files>" />
    Ensure to use th ^/a (append) signature
    Regards,
    Chirag

  • Error while using .jar file instead of class file.

    Hello friends,
    I created a java class which are referred and called from other jsp\xml and java files. I compiled this java class and everything is working properly. However, I do not want to use class files but want to use jar files instead. So, I created a jar file of this class file by using the command "jar -cvf jarfilename.jar".I kept the jar file in its respective folder .Also, I removed the class file from its path, just to see that the jar file will work automatically.
    Unfortunately, I am getting an error:
    java.lang.RuntimeException: Component.createComponent(...) Component class not found: <java class path>. I also tried giving the path of this jar file in the classpath. This also does not seem working.
    How to solve this problem?
    Thanks,
    Ranjith M.V
    Edited by: RanjithM.V on May 11, 2008 10:34 PM

    You probably populated the jar file incorrectly.
    A common mistake is to include the path that you had on the classpath, in the jar file.
    So a person will have a classpath like this: /foo/
    And a class in a package bar, like this:
    package bar;So that other classes would include the file like this:
    import bar.TheClass;And the class file is on the filesystem like this:
    .../foo/bar/TheClass.classThen they'll create the jar file including the foo directory, so if they list the jar's contents, they'll see the above (/foo/bar/TheClass.class). But this is wrong. It should start off so that the jar entries start with the top-level package names (like /bar/TheClass.class).
    Maybe you've done that.

  • Help using jar file!

    Help using jar file!
    Hello
    I have created a jar file by using
    jar cvmf Manifest.txt myjar.jar 1.class Mydirectory
    In 1.java file :I have used
    JEditorPane editor;
    editor.setPage(getClass().getResource("/Mydirectory/default.htm"));
    If I am only giving myjar.jar file to the client without Mydirectory then also it is working fine by showing default.htm in JeditorPane.
    But my problem is I want to use
    Runtime.getRuntime().exec("cmd /c start IEXPLORE"+targetstr) ;
    targetstr will be the filename with path of the default.htm
    If I am giving myjar.jar file with Mydirectory to the client it is working but I don't want to give Mydirectory to the client .
    What should I do?
    Is there any solution for this?
    Using another jar file which will include mydirectory can solve this problem?
    Is there any othe concept in java so that I wll be able to hide Mydirectory from client?
    Please help.

    It seems like you could extract the .htm file from the jar, either with Runtime.exec or using the Jar API classes.

  • Using .jar files

    I was able to use .jar files in Java programs that I write on my computer. I could write a program that used an import statement to bring in classes contained in a .jar file.
    One day, I was trying to incorporate a jar file folder directly into my windows operating system by using the environmental variable called CLASSPATH. Unfortunately, I made the mistake of screwing up my PATH variable. I fixed my PATH variable back up by adding the directory to the bin folder inside of the Java folder as is described commonly by the documentation for installing the Java SE on windows computer.
    Since that day, I have not been able to use .jar files using an import statement. My computer is unable to find the .jar files even if I specify the exact directory. Even the IDE(netbeans) that I use is unable to find and use .jar files. I have found that I can open up .jar files and pull the contents that I need out of said .jar files, but I have a project that does not allow me to open up the .jar files and extract the needed classes.
    I have googled this problem so much that I have read hundreds of posts about .jar files, and I cant find anyone in a situation that is similar to mine. If I take my files to another computer with Java SE installed, then my source code can access the .jar files just fine. For some reason, my work computer seems to hate using .jar files. I have no idea what could be the problem. There is no information in the java documentation on troubleshooting with this problem, and the most confusing part is that it worked perfectly fine until That one day
    Does anyone have any ideas?
    Specific technical details:
    I need to pull the Stopwatch.class file from a stdlib.jar file. In the past I had done this by using an import statement inside of my program:
    "import stdlib.Stopwatch; "
    Using this command to compile:
    "javac -cp .;(directory path to .jar file); source.java"
    This used to work. Now when using the javac command I get error messages
    1. Error points directly to import statement. Arrow directed at the period after stdlib.
    "cannot find symbol"
    2. Error message pointing to all instances of the class that I was attempting to import into my program.
    Thanks for reading
    Edited by: 955611 on Aug 28, 2012 7:22 PM

    I read your post. I want to compile this project by using the "-classpath" option in the javac command. After screwing up important system variables once, I do not want to continually have to play with system variable in order to compile projects. To quote from the website that you linked:
    Using the JDK tools' -classpath option
    The JDK tools java, jdb, javac, and javah have a -classpath option which replaces the path or paths specified by the CLASSPATH environment variable while the tool runs. This is the recommended option for changing class path settings, because each application can have the class path it needs without interfering with any other application.
    The runtime tool java has a -cp option, as well. This option is an abbreviation for -classpath.
    For very special cases, both java and javac have options that let you change the path they use to find their own class libraries. The vast majority of users will never to need to use those options, however.
    Clearly, the "-classpath" option in the javac is intended to replace the need to play with important system variables. I guess my post boils down to the question of "Why doesn't this command work for me?". I followed your suggestion by removing the bin directories and adding the stdlib.jar directory directly into the system variable itself. Here is the following output from my command prompt:
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Lelo>E:
    E:\>cd Programs\Java
    E:\Programs\Java>javac testy.java
    testy.java:1: error: package stdlib does not exist
    import stdlib.Stopwatch;
    ^
    1 error
    E:\Programs\Java>echo %CLASSPATH%
    C:\Program Files\Java\jre6\lib\ext\QTJava.zip;E:\Programs\Java\stdlib.jar;
    E:\Programs\Java>javac -classpath .;E:\Programs\Java\stdlib.jar; testy.java
    testy.java:1: error: package stdlib does not exist
    import stdlib.Stopwatch;
    ^
    1 error
    E:\Programs\Java>
    I still received the same errors. It seems that even adding the directories into the system variable will not work for me.

  • Using JAR file in running application and POI !

    Hi all
    I am trying to use POI HSSF f(for the first time, So pls bear with me!)or creating excel file from my java Application. I am using the jar file :
    poi-2.0-RC2-20040102.jar. Not sure if its the correct one. So If I am wrong pls correct me.
    Now I am creating a bat file to compile my application:
    @echo off
    C:\jdk1.3.1_04\bin\javac -classpath C:\POI\poi-2.0-RC2-20040102.jar MyApp.java
    pauseIt compiles fine. Now If I try to use the jar file in run.bat for running my application, it says NoClassDef FoundError:MyApp. Here is my run.bat
    java -classpath C:\POI\poi-2.0-RC2-20040102.jar MyApp
    pauseI am not able to run my application with this run.bat file . If I change the content to:
    "java MyApp.java"
    It runs but give me error: NOClassDefFoundError:import org.apache.poi.hssf.usermodel.HSSFWorkbook
    Pls suggest me about how to use jar file in running my app and how to rresolve workbook finding problem.
    Reagrds

    Try this:
    java -classpath .;C:\POI\poi-2.0-RC2-20040102.jar MyApp
    pauseNote the "dot semi-colon" at the start of the CLASSPATH. That puts the current directory in the CLASSPATH, which is where MyApp.class lives. (No package, right?)
    See if that works better.

  • Performance issue if we use jar file instead of classes

    Hi,
    My application uses tomcat as web server.
    If i use calsses in webapps -> WEB-INF -> classes folder, i place classes in that ,
    In other case i use jar file and place that file in WEB-INF -> lib folder in the webapps directory.
    There is huge performance difference.
    While using classes performance is great while using jar file performance is very disappointed.
    I am using a file for encryption /decryption also.

    I can't really believe that classes vs jars makes a difference, but whatever.

  • How to use jar files without setting classpath

    Hi,
    I have a situvation, I can not set classpath, but i have to use jar files, how can I do that.

    URL[] urls = new URL[]{pathToJar, pathToAnotherJar, ...};
    URLClassLoader urlc = new URLClassLoader(urls);
    Now load classes within the jars loaded by the urlc classloader as needed. This is a limited approach, you can mostly use interfaces to work with classes loaded by the custom loader instance above and your existing classes.

  • Use jar file

    dear guys,
    can somebody tell me why would use jar file? how it would be use? i would like to get the idea of jar file
    thanks

    Are you familiar with zip files? A jar file is just a kind of zip (the jar utility will even read zip files as though they were jars).
    The most common use is to hold .class files generated from all the classes of a Java program so that you can run the program from that one file, rather than very large numbers of small class files. Libraries of classes are almost always stored as jars.
    Of course you can put other stuff in there too, like image files and the like.

  • Using JAR files from a servlet

    Hi,
    I have a Tomcat server running multiple web applications (using Java Servlets).
    One of the applications needs to use classes from a JAR file.
    How do I make the classes in the JAR file accessible to this application alone?
    I would prefer not to change the CLASSPATH of the Tomcat server for this.
    Also, for some reasons, placing the JAR file under the common\lib or the shared\lib directories is a problem.
    Is there some way to change the CLASSPATH on a per web-application basis...... so that each web app running on the Tomcat server has its own CLASSPATH?
    Some parameter in the web.xml file for the web application?
    Presently I'm using the ClassLoader APIs for this.... but would like to move away from that.
    Thanks.

    Well As per the J2ee specification ...
    We have to place all the application specific jar files in lib folder
    under the WEB-INF dir of the application ...
    Try it ...

  • Use jar file for one servlet in one application (not global in classpath)

    I have a servlet application that needs a jar file to load with one particular servlet. If I put the classpath to the jar file in the jvm12.conf, the servlet loads fine. I can't run it like that, however, since I use another jar file by the same name in a different application. I would like to specify it only with the servlet that needs it. According to the online help file, it says more than one jar, zip, or class file can be specified in the servlet classpath, but that doesn't seem to be the case. We're running iPlanet 4.1. I've tried adding the classpath to the jar file after the classpath for the servlet itself (servlet.properties), but it gives the class not found error for that function. Is there a way to do this? Context.properties, maybe? I can't find any instructions on setting that up.

    You might have better luck asking this question on a web server forum. This is an application server forum and most people here are going to more experienced with iAS.
    David

  • Using jar file in other pc

    can the jar file being used in a pc that not installed with jdk?what i need to do to make the jar file to work in a pc that not installed with jdk?

    if so, that means that i have to provide the JRE file
    and my jar file at the same time to the pc i wanted to
    use the jar?
    Only if the pc does not already have a java runtime.
    Similarly, if the pc does not have a web browser you couldn't use web sites on that pc.
    if there any other way that i can just use
    the jar file without the JRE?
    No.
    or do i need to make it
    into a exe file rather than a jar file then the
    problem will be solved?
    I'd not recommend that, but the question of making native executables comes up every week so I suggest using the search features on this site.

  • When to use JAR files

    We are having a discussion at work about the proper usage of jar files. I am fairly opinionated and need to get some good feedback on when jar files make sense.
    Network:
    We have a unix based network as well as a windows based network. We can share samba mounted drives and allow windows access to the class files on the unix network. Most of our internal webservers are on the unix platform.
    We use java in applications, servlets, and JSP's. We have also designed an electronic technical manual that will be deployed via internet and cd rom.
    My first contention that jar files are not needed in the Servlet environment. The class files are virtually local and file storage is not an issue.
    My second contention is that applications running on windows machines would have better performance from local jar files, but the benefits are outweighed by the need to rebuild and reinstall the jar files to ensure the applications behaved the same on both systems.
    My third contention is that the technical manual on cd is a very good candidate for use of jars. We have a limited amount of space to store the files on a cd. We would probably use the jars to serve the information to ensure the behavior of the manual is the same whether the application was access via the CD or the internet.
    What am I missing? Is my understanding of JAR files out of whack with reality?

    Jar files (and their siblings i.e. Wars, Ears) make a
    good unit of deployment. It is much easier to keep
    track of a few jars than a bunch or classes.We have classes which are used in several applications. Ie, A bean queries our bill of material. It is used in an engineering, a manufacturing and a planning application. It can also be used in a jsp. If that bean changes, we would have to deploy three new jar files. If we run from one directory structure, a simple compile fixes all three applications.
    With the samba mounts, we can get to the directory from windows and most flavors of unix.
    We actually have two directory structures. One for production and one for test. Developers usually have another copy stashed somewhere for development purposes.
    I don't know where you get better performance. The
    jar needs to be unzipped which can only slow
    performance. Rebuilding a jar is easy (get Ant) and
    reinstalling a jar is easier than installing a buch of
    class files and resources (see above.) In addition,
    you can seal jars which gives you some level of
    protection (though superficial) and you can set up the
    jar so that it knows the main class.For the most part, these are internal applications, so security is not the top priority. Jars would be nice as they should generate less network traffic due to their smaller size.
    A jar is really just a zip file with a special
    structure. This is really a question of whether you
    need compression. If you can't fit everything onto a
    single CD then compression can help. A plain old zip
    file would work just as well.The compression is the main reason for the techpub application using the jar files. Space on the CD is a concern. Also, for internet access, bandwidth is also a concern. IE, less bits to shove down the wire.
    Like I said before jars are a convienient way to keep
    things organized. You can send out a program in a
    single unit that has everything it needs to run.I have an aversion to anything which requires an install on the users box. This probably comes from working with a bunch of unix hacks that have our system tuned to the nth degree. Much easier to deploy to one central location. No worries about whether or not someone turned their machine off before the nightly push, who has admin rights, etc. Map to the drive and you are off and running. One big performance hit is running the jvm from a shared drive. The JVM should be installed locally.

  • Using ditaval files with XML Author

    I've been evaluating XML Author and am trying to determine how to use ditaval files with it. If I want to save a ditamap as a book for PDF creation, the Prompt for DitaVal File check box is greyed out. Does anyone know why this might be the case? Is the use of ditavals limited to a full implementation of FrameMaker?
    I tried adding PromptForDitaval=1 to the [General] section of the ditafm.ini file to no avail.

    Make sure you are using the latest hotfix for Director (11.5.8) - it is the first to support AS# in Flash. Your SWF members will probably need to be linked to their external files instead of fully imported.
    Or perhaps you're saying that you've met both these conditions and are still seeing problems?

  • Creating & Using .jar files and manifests

    I've read through hundreds of online tutorials on creating and using .jar's, but it's surprising how unhelpful they really are.
    I've been trying to make a java program of mine standalone, so I can distribute it to others and allow them to run it without use of a compiler, etc (ideally just a .exe or .bat that they double click on). Everything I've found says I need to create a .jar of my program in order to do this. I was finally able to create a .jar but I got different errors relating to "main-class" and "manifest" issues...I tried running it with javaw.exe and had the same problem.
    Some tutorials briefly discuss "meta manifest's", other's skip the concept all together in creating .jar's. I created a jar with:
    jar cf A2.jar c:\jarTester.java
    after changing my command prompt path to
    C:\Program Files\Java\jdk1.6.0_01\bin
    It created the .jar, but nothing worked. As above, it gave me errors relating to the "Main-Class" and "Manifest". So here's my question:
    What involvement does a "manifest" play in .jar's, and how do I create/use one to create a .jar? Why is it necessary to specify the "Main-Class" when I have already done so in my .java file?
    I believe that once I can get this "Main-Class" and "Manifest" problem straightened out, I will be able to create a batch file with the line:
    java -jar A2.jar
    is this correct? THANKS.

    I've read through hundreds of online tutorials on
    creating and using .jar's, but it's surprising how
    unhelpful they really are.really, hundreds?
    I've been trying to make a java program of mine
    standalone, so I can distribute it to others and
    allow them to run it without use of a compiler, etc
    (ideally just a .exe or .bat that they double click
    on). Everything I've found says I need to create a
    .jar of my program in order to do this. Make up your mind, do you want to make a jar or an exe?
    I was
    finally able to create a .jar but I got different
    errors relating to "main-class" and "manifest"
    issues...I tried running it with javaw.exe and had
    the same problem.
    Some tutorials briefly discuss "meta manifest's",
    other's skip the concept all togetherthat's because the manifest isn't usually necessary
    in creating
    .jar's. I created a jar with:
    jar cf A2.jar c:\jarTester.javaugh, that won't work. you need to put the class file in there, not the source. or you can put the source in as well if you want, but the class is necessary
    i'm ignoring the rest of this post for now
    go back to Google and type in jar manifest and read more

Maybe you are looking for

  • Transferring pictures sent via sms to PC

    My Daughter has over the past two years sent pictures of my Granddaughter via sms to me and now they are getting to be too many when I scroll down the list.  I have an ip5 and would either like to transfer them into my itunes library or onto a sepera

  • Codec Overrun

    I got this problem when downloaded standalone installer for any updater with ext .dmg It says "codec overrun" does anyone has have idea of this problem. Recently, i did download security update for my 10.4.6 but it won't run and keep pop up the same

  • Message may be sent more than once

    Hi, When I use mailq, I can read the following error in many emails: 008B354E529F 7265 Tue Jun 30 10:08:19 [email protected] (delivery temporarily suspended: conversation with server.domain[/var/imap/socket/lmtp] timed out while sending end of data -

  • Application in CAF

    Hi Experts,          I am new to this CAF. I have a requirement of using CAF in my project. What  is the CAF how we can use. In my project i have a requirement that to split the form in to diffrent parts. How i can do it and how the data should be ma

  • Timesheet Application And PDF Printing

    Hi, I demo'd the time sheet application from the apex server and the management team here really liked it so I moved to our machine here and when i try the pdf printing i get the following error Not Found The requested URL /dev/apex/f was not found o