Using image from defalttheme.jar in CSS file

Hello All,
In JSF page we can access an image from the defaulttheme.jar, something like :
background-image: ContextPath/theme/com/sun/rave/web/ui/defaulttheme/images/table/table_titlebar_gradient.jpgI want to move this from JSF file to my CSS file. can anyone tell me how can i do this?

norsez, did you had a look at the Java Tutorial:
Using the APPLET Tag
http://java.sun.com/docs/books/tutorial/applet/appletsonly/html.html
It says: 'You specify JAR files using the ARCHIVE attribute of the <APPLET> tag. You can specify multiple archive files by separating them with commas [...]'. I assume all listed JAR files are in the classpath then and you should have access to their classes.
Let us know if it works!
HTH, Markus

Similar Messages

  • Issues with Loading Images from a Jar File

    This code snippet basically loops through a jar of gifs and loads them into a hashmap to be used later. The images all load into the HashMap just fine, I tested and made sure their widths and heights were changing as well as the buffer size from gif to gif. The problem comes in when some of the images are loaded to be painted they are incomplete it looks as though part of the image came through but not all of it, while other images look just fine. The old way in which we loaded the graphics didn't involve getting them from a jar file. My question is, is this a common problem with loading images from a jar from an applet? For a while I had tried to approach the problem by getting the URL of the image in a jar and passing that into the toolkit and creating the image that way, I was unsuccessful in getting that to work.
    //app is the Japplet
    MediaTracker tracker = new MediaTracker(app);
    //jf represents the jar file obj, enum for looping through jar entries
    Enumeration e = jf.entries();
    Toolkit toolkit = Toolkit.getDefaultToolkit();
    //buffer for reading image stream
    byte buffer [];
    while(e.hasMoreElements())
    fileName = e.nextElement().toString();
    InputStream inputstream = jf.getInputStream(jf.getEntry(fileName));
    buffer = new byte[inputstream.available()];
    inputstream.read(buffer);
    currentIm = toolkit.createImage(buffer);
    tracker.addImage(currentIm, 0);
    tracker.waitForAll();
    images.put(fileName.substring(0, fileName.indexOf(".")), currentIm);
    } //while
    }//try
    catch(Exception e)
    e.printStackTrace();
    }

    compressed files are not the problem. It is just the problem of the read not returning all the bytes. Here is a working implementation:
    InputStream is = jar.getInputStream(entry);
    ByteArrayOutputStream os = new ByteArrayOutputStream(1024);
    try{
    byte[] buf = new byte[1024];
    int read;
    while((read = is.read(buf)) > 0) {
    os.write(buf, 0, read);
    catch(Exception e){
         e.printStackTrace();
         return null;
    image = Toolkit.getDefaultToolkit().createImage(os.toByteArray());
    This works but I think you end up opening the jar a second time and downloading it from the server again. Another way of getting the images is using the class loader:
    InputStream is = MyApplet.class.getResourceAsStream(strImageName);
    In this case, the image file needs to be at the same level than MyApplet.class but you don't get the benefit of enumerating of the images available in the jar.

  • How to use image from a file in signature appearance.

    Hi,
    I am creating a Plugin for acrobat 9, using PubSec using DocSign sample as basis. I have created the appearance using text objects and the logos data that came with the DocSign sample. But I want to use image from a file (like, jpg) in the signature appearance creation. So far the documentation doesnt tell how to achieve this.
    Can you please tell me in a  "How-to" kinda way to achieve this?
    Thanks in advance.

    Thanks for ur prompt reply.
    There are so many samples in the sdk. which one is the "sample for adding images."?

  • Read images from a jar file?

    Hello, I'm converting a 6i app to 10g. This app does a ton of read_image_file() calls to
    change GIF images on the screen based on user actions. In 6i the images are all stored on the local hard drive. The images are not icons for buttons, but images that appear in different locations on the screen.
    For 10g, is it possible to leave the images in a jar file and effectively read the images from that? Otherwise, I suppose I'm looking at using webutil functionality to download the jar file and unjar it into an images directory for reading from the client?
    Any best-practice scenario for this sort of thing?
    Thanks for any info,
    Gary

    We are migrating from 6i to 10g too. And I try to not use webutil. All my pictures (icons gif files) are in a jar file.
    Just make attention of the size of your pictures. The jar file is loaded when you launch the application (the first time, and after, only if the jar file has changed).

  • Read images from external jar file (Sun's Java L&F Graphics repository)

    Hi!
    I don't know how to read images from an external jar file. Sun has a Java Look and Feel graphics repository that contains a lot of good images that can be used on buttons and so on. This repository is delivered as a jar file, containing only images, and I want to read the image files from that jar file directly without including them inside my application jar file. The application and image jar files will be in the same directory.
    I have absolutely no clue how to solve this. Is it necessary to include the images inside my application jar file or is it possible to have them separate as I want.
    Would really appreciate some help!
    Best regards
    Lars

    Hi,
    There is two ways :
    1) Add your jarfile to the classpath.
    Use the class loader :
    URL url = ClassLoader.getSystemResource("your/package/image.gif");
    Image im = (new ImageIcon(url)).getImage();
    or
    Image im = Toolkit.getDefaultToolkit().getImage(url);2)If you don't want to add the jar to the classpath you can use this (under jdk 1.4):
    import java.util.*;
    import java.util.jar.*;
    import java.awt.*;
    import java.io.*;
    import java.awt.image.*;
    import javax.imageio.*;
    public class ImageUtilities {
         public static Image getImage(String jarFileName, String fileName) {
              BufferedImage image = null;
              try {
                   JarFile jar = new JarFile(new File(jarFileName), false, JarFile.OPEN_READ);
                   JarEntry entry = jar.getJarEntry(fileName);
                   BufferedInputStream stream = new BufferedInputStream(jar.getInputStream(entry));
                   image = ImageIO.read(stream) ;
              catch (Exception ex) {
                   System.out.println(ex);
              return(image);
    }I hope this helps,
    Denis

  • How to use images from ADFLib

    Hello OTN,
    My application is devided into several ADFLibs, one of them is CommonUI. It includes common skin and it is imported into every application part.
    There are some images which should be available in different parts, so I decided to put them in CommonUI.
    After deploying adflibCommonUI adn refreshing Resource Palette, somehow I expected to see this image there, but it isn't.
    Could someone, please, explain me, how to use images contained in imported ADFLib, for example, as imageLink icon?
    Thanks.
    ADF 11.1.2.1

    Hi,
    images need to be saved in a specific file structure in the JAR file to be accessible. See:
    http://www.oracle.com/technetwork/developer-tools/adf/learnmore/86-images-from-jar-427953.pdf
    Frank

  • Photos 1.0 not showing all images from Photos Library.photoslibrary folder/file after update install

    I installed the update that changed my iPhoto to Photos 1.0, and the new Photos program is not showing all images from Photos Library.photoslibrary file/folder (not sure to call it file or folder since it is actually a folder with all my pics but it acts more like a file) after update install.  The Photos Library.photoslibrary file/folder shows to be 55 gb in size, and it shows to be loaded into the photos program, but there are maybe a few weeks of pictures showing instead of a few years.  Lots of pictures in the 55 gb are not showing for some reason. 

    No - iPhotos has not replaced anything - it is new and an addition - iPhoto is still on your system in the applications folder and still works just fine
    Outlook is not supported by Photos - not sure if the support must come form Apple or MS as Photos uses a different interface to external packages than iphoto did
    LN

  • Error #2148 when loading image from ByteArray (not network or file)

    Hi!
    When I try to access bitmap data of Image loaded from ByteArray, I receive the following error:
    Error #2148: SWF file file:///C|/blablabla..../MyFlash.swf cannot access local resource file:///C|/blablabla..../MyFlash.swf/[[DYNAMIC]]/2. Only local-with-filesystem and trusted local SWF files may access local resources.
    I'm on Flash, not on AIR. And ByteArray contains PNG data which I prepare myself
    I tried to do it with Image.load and loader.loadBytes - the error is the same. I tried to use Flex SDK 3.4, 3.5 & 3.6 - nothing helps.
    When I add this image to my stage, it is displayed absolutely OK, but I still can't access bitmapData of this image - always got the same error.
    Flash Player 10
    Here are the samples of my code:
              public function onLoadComplete(event:Event):void
                var loader:LoaderInfo = event.target as LoaderInfo;
                var bmp:Bitmap = loader.loader.content as Bitmap; <-- here I received the error
                var bmpDat:BitmapData = bmp.bitmapData;
                this.bitmapData.copyPixels(bmpDat,new Rectangle(0,0,width,height), new Point(0,0));
                var loader:Loader = new Loader();
                loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadComplete);
                loader.loadBytes(byteArray);
    And another try
           var image: Image = new Image()
           this.addChild(image);
           image.addEventListener(FlexEvent.UPDATE_COMPLETE, onCompleteLoad2 );
          image.load(byteArray);
          public function onCompleteLoad2 (e:flash.events.Event):void
                     var image:Image=e.target as Image;
                     var bitmapData:BitmapData;
                     bitmapData=new BitmapData(image.width,image.height,true,0);             
                     bitmapData.draw(image); <-- here I received the error, while image is correctly added to the stage and displayed
    What's wrong? It seems, the image loaded from byteArray is treated as local resource. How can I overcome it inside the code? Because this .swf is
    run on different computers and I can't just add a flash security exception on every of them....
    Please, help I spent, maybe 20 hours and still can't find the solution

    I had the same problem, except I was reading in the image from the local disk using FileReference.  Anyway, my issue was resolved by using the
    -use-network=false option on the command line of my compiler (I do all my development in the shell using 'vi' to edit and mxmlc to compile).
    Ttry "-use-network=false" and see if that helps...
    ...bob...

  • How can I create an iBook using iBooks Author using images from a PDF?

    I have a complex book with custom fonts and lots of images, and the client wants it on the iPad. So my most reasonable option seems to be to take images from a PDF and use them for the pages. However, images in iBook Author don't get "laid out" as expected in Portrait mode. How can I  create a layout that is essentially one image per page in portrait mode, and then convert that to landscape mode? Or is there an easier way to go about this?

    tk0us wrote:
    Make sure you have disabled portrait in the Inspector.
    I don't understand why portrait mode defaults images and other "widgets" to thumbnails. The original format of the book (and of 99% of all books I'm guessing) is in portrait format. By forcing the book to work only in landscape mode it's forcing the page image to be half the size, and that makes using this book particularly difficult. Is there no way to force the pages to be full-size in portrait mode?

  • Changing Images from CMYK to RGB and file size

    Hello and Thank You in advance...
    I'm new to Keynote and I created a slideshow with CMYK image and it is a certain size. When I resaved the images (same name, same location) and resaved the Keynote document, there is no change in file size. Is there a way to update the images in the slideshow?

    Keynote puts the images INSIDE the .key file.
    The best way to fix this is Control-click on a copy of your .key file and choose Show Package Contents.
    Then select your NEW images in the finder and choose COPY (I know, it sounds weird, but the finder in OS X can use the Copy option to actually copy files).
    Then click into the open .key folder and PASTE. You should get a notice that the images inside the folder already exist and do you want to replace them. Choose yes.
    Close the folder and open the .key file and see if it worked okay.

  • Stop motion animation help using images from a digital camera...how tricky is this?

    I'm teaching a media arts course for the first time, and I'm trying to figure out how to use images taken with a digital camera, import them to Premiere Elements 7, and put them in the timeline without having to shorten the length of them.  As soon as I drag an image from the project bin onto the timeline, it automatically plays for 5 seconds, and I have to try to shorten it to one frame length.  If that's what it takes, this process is going to take a lot of time, because the students are going to be taking several hundred photos.  If I edit them in the preview, it's still just as difficult.  Is there any way to change the settings before I import the images so that they automatically are one or two frames in length on my timeline?  Your help would be GREATLY appreciated. 

    Welcome to the forum.
    As Steve points out, setting the Edit>Preferences>Still Duration BEFORE Importing, will get what you want.
    When doing Stop-Motion, I find that a Duration = 3 to 5 Frames, works best, but that will depend on the images, how far apart, they were shot, and the exact effect that I want. It might take a little experimenting, to get things correct to both your eye, and to the images from the camera.
    Also, Scaling the Still Images, prior to Import is a very, very good idea, and especially so, with Stop-Motion, as you will have lots of them.
    Good luck,
    Hunt
    PS - if you are using Transitions, between the Still Images, you will want to alter the Duration of those too, prior to applying them.

  • Use image from Aperture in Xcode image well

    Is it possible to extract an image from Aperture and display this image in an Xcode image well?
    I have a script that searches for and extracts a required image in the format:
    image version id B4bCHCfeR969OQ7SEcUsOQ of library id LibraryFolder
    I now want to display the image in an ApplescriptObjC project, how do I build a path to the image well?
    Hope this makes sense, as usual, any help gratefully received.

    Frinton Fogey wrote:
    I have been trying to use that same script but changing selcting an image to searching for an image but it won't work, please show me the error of my ways!
    set theImage to "Image 1"
    tell application "Aperture"
              set ims to every image version
              set names to {}
              repeat with i from 1 to count of ims
                        set n to get the name of item i of ims
                        set names to names & n
              end repeat
              set imageSel to first image version whose name is theImage
              export imageSel using export setting "JPEG - Original Size" to (path to desktop)
    end tell
    Giving this a closer look you could condense the script down to
    set theImage to "IMG_08067"
    tell application "Aperture"
              try
                        set imageSel to first image version whose name is theImage
              on error errTxt number errNum
                        display dialog "Error: " & errNum & return & errTxt
                        tell me to quit
              end try
           export imageSel using export setting "JPEG - Original Size" to (path to desktop)
    end tell
    You don't appear to be doing anything with the repeat loop or variables and you're always taking the first image you find with the name.
    So here we look in the whole library for an image with the name and if we find it we export it. The try/error block is to catch times that the name you are looking for isn't in the library.
    regards

  • Remove images from library without deleting referenced files

    Hi,
    I cannot find solution: how do I remove images from Aperture library completely (all versions, etc), but keep the referenced master files? (all my images are kept outside aperture lib, as referenced masters).
    If I delete all versions and projects, they go to Trash, and attempting to empty the Trash brings only two options: delete permanently and move to system Trash. But I do not want to touch the referenced masters in any way. Is there a way to keep them safe, while emptying Aperture of all references to those files?
    Thanks.

    If the originals are referenced when you empty the Aperture trash the confirm box will have a checkbox asking yf you also want to move the referenced originals to the system trash.
    If you do not select this option the referenced originals are left where they are. If you of not see this option in the confirmation box then the originals in the Trash are not referenced.

  • JSF: Using own custom styles in skin css file?

    I have created custom skin by defining custom css file and implementing predefined ADF style definitions (aliases).
    Also, I need some other styles for use on specific parts i application, and my idea was to put these styles in same css file which is used in skin definition.
    For example:
    .footer_txt     {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; color: #FFFFFF}
    My intention was to use this styles in styleClass attribute of various
    adf faces components
    But after starting application, I can't find my additional styles in generated css file (pfmskin-desktop-10_1_3_1_0-ie).
    Looks like that css generator is ignoring any styles which are not ADF predefined styles?
    I was thinking that this is possible, because at the end of srdemo.css file (in SRDemo application) there is one part like this
    /* custom styles that I made up and set on the styleClass attribute of various
    adf faces components */
    .adfFacesDemoSearchPanelGroup
    width:100%;
    padding:6px 6px 6px 26px;
    background-color: #0099CC;
    I can put my styles in separate css file, but then I have to include this file in every application page...
    Is it possible to have custom defined styles in skin css file, and use them in styleClass attribute?

    Hi,
    skinning only works with the ADF faces skin selectors. There are plans to support custom selectors in a future version
    Frank

  • Erasing unused, (never-to-be-used) images from the Library. How, please?

    Is there a way to Globally-Delete a subset of, or all of, the images in the Library? I want to erase all images that are NOT being used in a Album, Slideshow, or Book.
    I take many near-duplicate shots and later select only one or two for use. The accumulated never-to-be used images are becoming overwhelming. doing it manually will take many hours and there is no way to be sure that a Library image is not used in a Album, Slideshow or Book...at least that I am aware of.
    I really do not need to keep 8445+ images in the Library
    Many thanks,
    Fred

    Make a smart album - album is not any
    and delete from there in groups of 100 or so emptying the iPhoto trash for each group - command-option-delete deletes photos from the library while you are in an album -- or you can flag 100 or so and control-option-delete deletes flagged photos
    LN

Maybe you are looking for