Images are not coming out when application running through jar file.

I have written an application program using j2sdk1.4.1 that needs your help.
My application folder's contents.....................
     C:\Examination\Examination.class <-----This is the main class and application's entry point.
     C:\Examination\ExamBox.class
     C:\Examination\PaperSetterBox.class
     C:\Examination\pspBox.class
     C:\Examination\epBox.class
     C:\Examination\TimerBox.class
     C:\Examination\ReportCardBox.class
     C:\Examination\HelpBox.class
     C:\Examination\AboutBox.class
     C:\Examination\Images\(some jpg & gif files)
     C:\Examination\Sounds\(some au files)
Compilation Report:     There was no error.
Execution Report :     Was working properly using the command:- java Examination
Now, I created a jar file for my application in the following steps.................................
          STEP-1:          Firstly, I created a text file(mainclassInfo.txt) that contains
          the line:--     Main-Class: Examination
          This line would be automatically added to the default manifest file when I would include the                name of that text file with the command to create the jar file.
          Location of the text file I created:     C:\mainClassInfo.txt
          STEP-2:          Then I went to C:\Examination and executed the following command(by using                'Command prompt'):--------------------------------------------------------------------
jar cmf C:\mainClassInfo.txt Examination.jar Examination.class ExamBox.class PaperSetterBox.class pspBox.class epBox.class TimerBox.class ReportCardBox.class HelpBox.class AboutBox.class Images Sounds
Finally, I got the jar file:-     Examination.jar
Double clicking on it application ran as it was expected.
Then, I thought, that as all the files & folders the application needed to run properly were packaged in the jar file; I should delete all the contents of the folder 'Examination', so that no one could see or use anything of the resources easily. I did that.
So, then it became only:-- C:\Examination\Examination.jar
Thereafter, I tried to run the application again and there a problem occurred! The application was running, but the images, those were to be used and shown by the application were missing somehow!!
Moreover, when I kept a copy of those 2 folders('Images' and 'Sounds') into the C:\Examination and ran the application again all the images came out normally!
I just can't understand why it's happening so mysterious?
I don't want to leave anything of the resources in an open place; I mean, outside of the jar file. The images should be used and shown by the application.
Help me please!

double post http://forum.java.sun.com/thread.jspa?threadID=582311

Similar Messages

  • Images are not comming out when application is running through jar file.

    I have written an application program using j2sdk1.4.1 that needs your help.
    My application folder's contents.....................................................................................
         C:\Examination\Examination.class <-----This is the main class and application's entry point.
         C:\Examination\ExamBox.class
         C:\Examination\PaperSetterBox.class
         C:\Examination\pspBox.class
         C:\Examination\epBox.class
         C:\Examination\TimerBox.class
         C:\Examination\ReportCardBox.class
         C:\Examination\HelpBox.class
         C:\Examination\AboutBox.class
         C:\Examination\Images\(some jpg & gif files)
         C:\Examination\Sounds\(some au files)
    Compilation Report:     There was no error.
    Execution Report :     Was working properly using the command:- java Examination
    Now, I created a jar file for my application in the following steps.................................
              STEP-1:          Firstly, I created a text file(mainclassInfo.txt) that contains
              the line:--     Main-Class: Examination
              This line would be automatically added to the default manifest file when I would include the                name of that text file with the command to create the jar file.
              Location of the text file I created:     C:\mainClassInfo.txt
              STEP-2:          Then I went to C:\Examination and executed the following command(by using                'Command prompt'):--------------------------------------------------------------------
    jar cmf C:\mainClassInfo.txt Examination.jar Examination.class ExamBox.class PaperSetterBox.class pspBox.class epBox.class TimerBox.class ReportCardBox.class HelpBox.class AboutBox.class Images Sounds
    Finally, I got the jar file:-     Examination.jar
    Double clicking on it application ran as it was expected.
    Then, I thought, that as all the files & folders the application needed to run properly were packaged in the jar file; I should delete all the contents of the folder 'Examination', so that no one could see or use anything of the resources easily. I did that.
    So, then it became only:-- C:\Examination\Examination.jar
    Thereafter, I tried to run the application again and there a problem occurred! The application was running, but the images, those were to be used and shown by the application were missing somehow!!
    Moreover, when I kept a copy of those 2 folders('Images' and 'Sounds') into the C:\Examination and ran the application again all the images came out normally!
    I just can't understand why it's happening so mysterious?
    I don't want to leave anything of the resources in an open place; I mean, outside of the jar file. The images should be used and shown by the application.
    Help me please!

    The Image class itself does not have any methods for loading images from files so you must be using something more. Most methods for loading images from files have an overload that lets you use a URL, so you just need to use that method with a call to getResource like in the other thread. If you can't think of anything else, you can use ImageIcon to load an Image (the Image is returned by a call to ImageIcon.getImage). See also "how to use icons" from the swing tutorial:
    http://java.sun.com/docs/books/tutorial/uiswing/misc/icon.html

  • I am trying to connect a Macbook Pro to a projector for a Powerpoint presentation. When I use a VGA cable, the color of the projected images are not good. When I use a USB cable, the projected image includes the presenter notes on my computer screen?

    I am trying to connect a Macbook Pro to a projector for a Powerpoint presentation. When I use a VGA cable, the color of the projected images are not good. When I use a USB cable, the projected image includes the presenter notes on my computer screen?

    To move an iPhoto Library to a new machine:
    Link the two Macs together: there are several ways to do this: Wireless Network,Firewire Target Disk Mode, Ethernet, or even just copy the Library to an external HD and then on to the new machine...
    But however you do choose to link the two machines...
    Simply copy the iPhoto Library from the Pictures Folder on the old Machine to the Pictures Folder on the new Machine.
    Then hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Choose Library'
    and select the Library that you moved.  That's it.
    This moves photos, events, albums, books, keywords, slideshows and everything else.
    Your first option didn't work because you imported one Library to another. Every version and thumbnail is imported like a distinct photo, you lose all your Albums, Keywords etc., the link between Original and Previews is destroyed, the non-destructive editing feature is ruined and so on. In summary: it's mess.
    Your second option didn't work because you simply referenced her library on the old machine.
    Regards
    TD

  • Images are not coming  in jsp pages in linux os

    Hi,
    i done java/j2ee project in windows its working fine, when i deployed that project in linux. JSP pages images are not displaying..
    IDE--- eclipse.
    server--- tomcat.

    Doublecheck the image paths. They must either be relative to the current context or just absolute.

  • Images are not displaying in the forms run time.

    Hello All,
    I am using forms 10.1.2.3.0 and database 11g in the windows XP platform.
    I am not able to see the images in the buttons at the run time. I have done the following setup for the same but still I am not able to display images in the buttons. I have gone through all the previous threads for the same. Can any body suggest where I am doing the wrong?
    1) Created one JAR file with the below command putting all the gif files in a folder (All the GIF files are in lower case). Kept this jar file in the forms/java folder. (When I am extracting the JAR file getting all the gif files and one more folder META-INF).
    rem====
    jar cvf icon.jar *.gif
    rem=====
    2) Modified the formsweb.cfg file as follows.
    imageBase=codeBase
    archive_jini=frmall_jinit.jar,icon.jar
    3) In the buttons property Iconic = Yes and Iconicfile name = icon_print (gif file name).
    4) Modified the Registry.dat file in the path "forms\java\oracle\forms\registry\Registry.dat" as follows.
    default.icons.iconpath=forms/java
    default.icons.iconextension=gif
    Start the OC4J instance, and run the application, but still not able to see the images in the buttons. After I modified the regedit file I am able to see the images in the design time but not in the run time.
    Any thing more needed to do the same. All the suggestions are welcome.
    Thanks,
    SUN
    Edited by: User SUN@ on Nov 23, 2009 11:25 AM

    Create a virtual directory icons in your /forms/server/forms.conf file
    In the registry.dat file change
    change
    default.icons.iconpath=http://yourmachine:port/forms/icons/
    Re: icons not displaying in oracle forms.
    Re: Icon deploy issue in 10g forms
    Re: cannot show icon images
    Re: Step by step creation of iconic buttons

  • To check process mode when application running through PCUI

    Hi Experts,
    I have implemented a BADI called EVAL_SCHEDCOND_PPF to schedule actions.
    There is one action which need to trigger when the document is going to be created and not when the document is being saved.
    So, for this purpose I have used the function module CRM_INTLAY_GET_PROCESS_MODE to capture the process mode. This is working fine when I run CRMD_ORDER it is satisfying my requirement, but when I run the application from PCUI the mode that will be returned by this module will always be 'CHANGE(B)' only.
    Does any body have encountered the similar situation or If any one have any thoughts pls reply me.
    Thanks in advance.
    Regards,
    Usha.

    HI Madireddy,
    In PC-UI by default the document is opened in edit mode. Try one thing open the document in GUI in change mode and then try to open it in PC-UI.
    <b>
    Award Points if it is Useful.</b>
    Regards,
    Naveen

  • Open console when i run java jar file

    greetings all
    i have a java program that i execute through JCreater. i want if i make its JAR file then its console should be open so that i could see thats printing when i use "System.out.println". is there anyway? right now when i double click my JAR file then nothing is displayed. how can i make that happen?

    thx flounder
    you see i need to see whats printing through my System.out.println() command. I am working on JCreater at the moment. when i execute my program an output window is opened, it displays whatever i have written in System.out.println. now i want to make an executable JAR of my program and also want to see my output window. is there any way to do that?

  • Iphoto 09 slideshow, music is not coming out when i export to idvd

    hello,
    I made a slideshow with about 500 pictures in iphoto 09. I aded music- several songs using a custom playlist. The music plays when i preview the slideshow in iphoto, but when i checked it after exporting (sharing to idvd) idvd the music does not play when i preview the slideshow before burning in idvd. I tried exporting a short slideshow and the music played back. Any suggestions?
    thanks

    Is any of the music purchased from the iTunes Store?
    Regards
    TD

  • KP26 : Prices are not coming out correctly

    Hi Gurus;
    My client is having some problem with Activity Price Calculations through T.code KP26. The Client didnu2019t have this issue before the upgrade to ECC 6.0. Client actually wants to make the price uniform for all the months. Please refer below for what we need:
                                               Jan      Feb      Mar      Apr     u2026     
    What is needed:               47.96   47.96   47.96   47.96         
    What's happening now:   46.48   46.49   50.91   44.27
    Client is of the view it is because of the default value 1 in the equivalance no. column. Sap has set the default value as 1 for the column and the client is not getting the desired output. Is there any way of making this price uniform?
    Regards;
    Sumanta

    Hi,
    Equivalent # coloum will not have any impact on that. This seems to be a unique problem after Upgrade.
    Suggest to open OSS message its a program error.
    This may help
    Regards
    Shantanu

  • I have transferd music from my ipod to my new computer and some of the files are not coming over, i have noticed the m4a files come across but the mp3 do not, any ideas how i can resolve this? thanks

    I have just bought a new computer and i am transfering my music from my ipod onto my new computer, I have put the files from the music option from my ipod onto my computer. alot of the songs have come across, however there is alot of songs that havent. I have noticed that the m4a files come across but the mp3 does not. the new computer has windows 8 on it, which is very new to me. when i try and play the mp3 files, it will open them up in a different programme and will not open in itunes. does anyone know what i can do?!?!!?!?!
    THANKS

    Have you looked at the previous discussions listed on the right side of this page under the heading "More Like This"?
    BTW this is the iPod touch forum

  • Images are not loaded in KM Navigational iViews

    Hi All
    I have uploaded documents & folders in Content Management.
    Created KM navigational iViews, assigned to pages, worksets & role.
    Role has been granted to other users, and when they click on the role, images of documents types are not loaded. When I run the properties(Image) path its gives a portal exception.
    But when I login I see all the images loading perfectly.
    Please advise on this. Its an emergancy.
    Thanks to all.

    sk wrote:
    Hi,
    I'm facing problem while deploying apex listener in glassfish 3.0.1. So far I have done
    - Installed 10g XE
    - Installed APEX 4.0
    - Unlocked APEX_PUBLIC_USER account and reset the password
    - Installed Glassfish 3.0
    - Created admin and manager users
    - Deployed apex.war
    - Created "i" folder in C:\glassfishv3\glassfish\domains\domain1\docroot and copied images from APEX directory
    - Completed listener configuration http://127.0.0.1:9090/apex/listenerConfigure
    When I try to open the Apex page http://127.0.0.1:9090/apex images and css are not loaded. Already I have spent a day, went thro documentations and I couldn't figure out what I'm doing wrong. Can someone help on this please?
    SKHi,
    I have the same problem. But , under user "root" everything works fine, under user "oracle" images are not loaded. User oracle are owner folder where glassfish installed.
    And one more problem. Apex Listener doesn't understand role Admin and user adminlistener. Every time I have recieved message : access denied.
    Please, help me ((
    Sorry for my bad english,
    Egor Karmanov
    Edited by: 843328 on 10.03.2011 2:41

  • The App store, FaceTime, iTunes, Safari and Camera are all missing from my iPad.  Restrictions are not enabled and when they are those applications are grayed out.  I have tried everything but restoring my iPad to its orginal condition. What do I do?

    The App store, FaceTime, iTunes, Safari and Camera are all missing from my iPad.  Restrictions are not enabled and when they are those applications are grayed out.  I have tried everything but restoring my iPad to its orginal condition. What do I do?

    todaywillbegreat wrote:
    '''  I have tried everything but restoring my iPad to its orginal condition. What do I do?
    The Basic Troubleshooting Steps are:
    Restart... Reset... Restore from Backup...  Restore as New...
    Restart / Reset
    http://support.apple.com/kb/ht1430
    Backing up, Updating and Restoring
    http://support.apple.com/kb/HT1414
    If you try all these steps and you still have issues...
    Then a Visit to an Apple Store or AASP (Authorized Apple Service Provider) is the Next Step...
    Be sure to make an appointment first...

  • Access point are not coming up after upgrade image of WLC

    Hi,
    I have AIR-WLC4402-50-K9 WLC i that current IOS is 7.0.98.218 and i upgraded with 7.0.116.0 IOS but after upgrading and reboot the WLC from 15 access point 3 access point are not coming up and 12 are coing up and working fine (4 1142 and 11 1131 series access point) 3 which are not coimg is 1131 series access point. when i login with console to 3 access point its rebooting 2 times and coming on ap: prompt.
    In between that i reloaded the WLC one more time because from 15 acess point only 4 aceess point are came up and i also cleck the show boot on wlc its output is
    7.0.116.0 (default)
    7.0.98.218 (active)
    so i reload  the wlc and checked out of 15 acess point now 12 acess point are up and still 3 are not. And i also checked the output of show boot command its
    7.0.116.0 (default)(active)
    7.0.98.218
    So i things its because of when 2nd time i reload the wlc the remaining 3 access point are getting image from wlc but because of reload its connection should be loss and error loading flash error are coming on acess point.
    After that i recover the IOS for access point and convert into autonomus and from autonomus convert into Leightweight Access point. I also attached the procedure for recover the ios of access poing
    But my question is why this 3 access point are not coming up is this happen's after upgrading wlc can any one please send me Step by Step WLC S/W Upgrade' process and if this this happens some time please send me any doccument related to this.

    Sunil,
         When you rebooted the controller did you do it from the Web GUI, the CLI, or did you physically reboot the controller? I believe and maybe incorrect but if your getting the ap:  < prompt > that means that there is no firmware on the unit. If you have restored these to functioning autonomous unit and then re-converted them to Lightweight and it's still happening then we need to look at a debug output of what is happening when those AP's attempt to join the controller.
    The capture you attached shows that it appears to join the controller and get a config, but are you saying that when it reboots again it stops working?? the other thing I would reccomend is clear out the flash memory since your capture shows the possibility that there are several copies stored there.
    Hope this helps.

  • Work flow mails are not coming to inbox but coming to out box in quality

    Hello,
    We are working on the implementation of Work flow for Purchase orders.
    Work flow customization is completed and even work flow is triggering when ever I create Purchase Order.
    Even Agent assignment also completed for work flow tasks via T code PTFC_CHG.
    This work flow is working fine in development.
    When I moved this workflow to quality I got a problem.
    Problem here is Work flow mails are not processing out of SAP Outbox to approvers  inbox even also after executing the program RSWUWFML2.
    When I triggered the PO in development the work item is moved to SAP out box as well as inbox. In quality It is not coming to SAP inbox.
    If I check in SOST,I will not see any of the entries related to work flow mails.
    Only above I can see in my SAP Outbox.
    So how can I Process these messages to approvers SAP Inbox.
    Any body please help me where the problem is
    With regards,
    Sudhakar

    Hi SP,
    I may be wrong, but on reading ur thread, I feel u r mis interpreting SAP Outbox with Outlook.
    Is it so, because u have mentioned about RSWUWFML2 and SOST, which comes into picture only if u r using an external mail like Outlook.
    If its Outlook, then there is no doubt that ur work item would get deleted from SAP Inbox and would be present only in Outlook.
    If its SAP Outbox, then u r not supposed to get ur work item in ur Outbox unless it is processed or executed thru ur SAP Inbox.
    Hope it helps.
    Aditya
    Edited by: Aditya Varrier on May 23, 2008 1:52 PM

  • HT2506 I'm using Preview with a MacBook Pro and MacOS 10.6.8. When adjusting sharpness in the Adjust Colour tool, images are not saved. Any hint? Thanks.

    I'm using Preview with a MacBook Pro and MacOS 10.6.8. When adjusting sharpness in the Adjust Colour tool, images are not saved. Any hint? Thanks.

    I too experienced the same issue.  Here are my details:
    Recently I bought a 15” Macbook Pro and last night I tried to connect and use a Edirol FA/66 Firewire 400 connected outboard audio interface using a Firewire 400 to 800 adapter then connected to a Firewire 800 to Thunderbolt adapter since the MBP doesn’t have a native Firewire port.  What I observed is that the Edirol was not getting power from the bus nor did the MBP (running Yosemite) recognize the Edriol.  At first I thought there was a problem with the Edirol since I haven’t used it in a while but when I connected it to an older MBP that has a native Firewire port, it worked normally.  Is there a known issue with these sorts of external audio interfaces working properly with newer MBP running Yosemite?  I’m hoping that a software update will fix this issue.

Maybe you are looking for

  • Awesomebar: open URL's in current tab, searches in new tab?

    I am wondering if it is possible to customize the location bar so that entering/editing a URL opens the page in the current tab, but entering a keyword search opens the results in a new tab. Any suggestions?

  • How to drag photo to back flap in aperture book

    why can't I drag a photo to back flap in apertue when making a book?

  • Beryl-settings not working

    When I run 'beryl-settings' in a terminal I get the following error: [n00b@archlinux ~]$ beryl-settings (beryl-settings:5720): Gtk-WARNING **: Locale not supported by C library. Using the fallback 'C' locale. Traceback (most recent call last): File "

  • AMD Radeon HD 6630M Compatibility

    I would like to purchase a DELL Vostro laptop with `Core i5` and `AMD Radeon HD 6630M`. I'm not completely sure, but it will probably have the integrated `Intel Graphics HD 3000` card as well. From your experience / knowledge, will this video card wo

  • Permission denied on a file I own??

    OL 5.7 64bit What's up with this? I'm logged on as user 'oracle'. User 'oracle' owns the directory OPatch, which has full permissions for the owner. Yet, when I try to rename (mv) it, I get 'permission denied'. oracle:+ASM$ ls -ld OP* drwxr-xr-x 8 or