Need to run a prog on 1.4 which is running on 1.5. .....using two hashtable

hello,
I've developed a program which is prefectly working on java 1.5.0 version.
but when run on java1.4.0. it gives run time error in this code.
first i'm getting error in second hashtable. put function where i'm using key as an integer.this is running on 1.5 version but have to change key as string on 1.4. but after that it is still not working properly.
I want that when i clicked on open then it must show both file
1. that have hdr extension
2. that have same name as the corrseponding .hdr file but without extension.
this program show desired result on 1.5 but on 1.4 it display only .hdr file.
pls. help me regarding this .
// class hdr file filter
import java.io.File;
import java.util.Hashtable;
import java.util.Enumeration;
import javax.swing.*;
import javax.swing.filechooser.*;
public class hdrFileFilter extends FileFilter {
private Hashtable filters = null;
private Hashtable noextensionfilter = null;
private String noextensionname=null;
private String extensionname = null;
private String description = null;
private String fullDescription = null;
private boolean useExtensionsInDescription = true;
private String fname = null;
public File noextensionarray[];
int count=0;
int counthdr=0;
int i=0;     
     //all files are accepted.
public hdrFileFilter()
     this.filters = new Hashtable();
     //Creates a file filter that accepts files with the given extension.
public hdrFileFilter(String extension)
     this(extension,null);
     //Creates a file filter that accepts the given file type.
public hdrFileFilter(String extension, String description)
     this();
     if(extension!=null)
     addExtension(extension);
     if(description!=null) setDescription(description);
     //Return true if this file should be shown in the directory pane,false if it shouldn't.
public boolean accept(File f) {
     if(f != null) {
     if(f.isDirectory()) {
          return true;
     String extension = getExtension(f);
     if(extension != null && filters.get(getExtension(f)) != null)
          fname=f.getName();
          extensionname=fname.substring(0,fname.lastIndexOf('.'));
          counthdr+=1;
          return true;
     if(extension == null)
          noextensionfilter=new Hashtable(20);
          noextensionname=f.getName();          
          noextensionfilter.put(count,noextensionname);
          count=count + 1;
          if(noextensionfilter.get(count) == extensionname)
               noextensionarray=new File[20];
               noextensionarray=f
               System.out.println("file:" +noextensionarray[i]);
               i++;
               return true;               
     return false;
     //Return the extension portion of the file's name .
public String getExtension(File f)
          if(f != null)
               String filename = f.getName();
               int i = filename.lastIndexOf('.');
               if(i>0 && i<filename.length()-1)
                    return filename.substring(i+1).toLowerCase();
          return null;
     //Adds a filetype "dot" extension to filter against.
public void addExtension(String extension)
     if(filters == null)
     filters = new Hashtable(20);
     filters.put(extension.toLowerCase(), this);
     fullDescription = null;
public String getDescription()
          if(fullDescription == null)
               if(description == null || isExtensionListInDescription())
                    fullDescription = description==null ? "(" : description + " (";
                    // build the description from the extension list
                    Enumeration extensions = filters.keys();
                    if(extensions != null)
                         Object nn=extensions.nextElement();
                         fullDescription += "." + nn;     
                         while (extensions.hasMoreElements())
                              fullDescription += ", ." + nn;
                    fullDescription += ")";
               else
                    fullDescription = description;
          return fullDescription;
public void setDescription(String description)
     this.description = description;
     fullDescription = null;
public void setExtensionListInDescription(boolean b) {
     useExtensionsInDescription = b;
     fullDescription = null;
          public boolean isExtensionListInDescription()
          return useExtensionsInDescription;

Might be fixable if you do something like
javac -target 1.4
Bytecodes are different in 1.5 and thus not backward compatible

Similar Messages

  • Help!!!!! I need to get iphoto lib off of hd which is running really slowly, and clicks rather more loudly than usual, how do i do this, im even on my iphone asking this!

    Help!!!!! I need to get iphoto lib off of hd which is running really slowly, and clicks rather more loudly than usual, how do i do this, im even on my iphone asking this! Computer also runs inly marginally faster in safe boot mode! Could the apple store help?

    It certainly sounds like your harddrive is dying.  I would Immediately backup your harddrive to an external USB or Firewire harddrive Before doing anything else.  It just may save your data in time before you lose it all.
    Hope this helps

  • Integrating Apache & 9iAS which are running on different hosts.

    Hi,
    Need to integrate apache_1.3.24 & Oracle 9iAS which are running in different hosts.
    I feel, to integrate I need to do more than just adding the proxy entries.
    Any help appreciated to sort this issue.
    Shafeen

    Hi,
    Need to integrate apache_1.3.24 & Oracle 9iAS which are running in different hosts.
    I feel, to integrate I need to do more than just adding the proxy entries.
    Any help appreciated to sort this issue.
    Shafeen Hi there.
    What kind of integration do you need? If you want to mirror a 9iAS URL on the Apache you can use the ProxyPass directive, eg (please check the documentation):
    ProxyPass /local/url/ http://remote/url/
    HTH.
    Finn

  • I have a power Mac G4 mirror front running 10.4.9. How current of an OS can I run on this machine? I want to put it back into use but need to upgrade the software so that I can run the newest version of Quickbooks amoung other things.

    I have a power Mac G4 with a mirror front running 10.4.9. How current of an OS can I run on this machine? I want to put it back into use but need to upgrade the OS so that I can run the newest version of Quickbooks amoung other things.

    I think you're out of luck...
    System Requirements:
    Minimum System Requirements
    Mac with an Intel processor
    Mac OS X v10.6
    1 GB RAM
    CD-ROM drive for installation
    120 MB of available disk space
    Printer: 100% Macintosh-compatible printer, if you plan to print invoices, checks, deposit slips, lists, purchase orders, mailing labels, reports, or graphs
    Checks: Use Intuit Checks if you plan to print checks. Canadian Image Ready Cheques are not supported.
    Integration/Compatibility Requirements
    Export report data requires Numbers '09 (included with iWork from Apple) or Microsoft Excel 2004 or 2008 for Mac.
    E-mail requires Apple Mail; Microsoft Entourage 2004 or 2008 for Mac
    Back up to MobileMe requires paid MobileMe account available separately from Apple, Inc.
    iCal, iChat, and AddressBook are included in Mac OS X. Internet access required for iChat.
    Accepting credit and debit cards directly into QuickBooks 2011 for Mac requires Intuit Merchant Service for QuickBooks for Mac (sold separately); subject to application approval and debit card transactions are processed as Signature Debit which does not require entering a PIN code. See http://payments.intuit.com/legal.jsp for details.
    Processing payroll, integrated with QuickBooks for Mac, requires paid subscription (sold separately), EIN and Internet access. QuickBooks 2011 for Mac works with Intuit QuickBooks Payroll for Mac.
    http://www.amazon.com/Intuit-413615-QuickBooks-2011-for/dp/system-requirements/B 003YJ8WFE/ref=noref?ie=UTF8&n=229534&s=software

  • I have a Power PC G4 which is running on OSX 10.5.8, it has the AirPort utility but cannot connect to the internet as my iMac can, I think I might need an AirPort Card? Is that the case or do I need something different to connect to a wireless modem?

    I have a Power PC G4 which is running on OSX 10.5.8, it has the AirPort utility but cannot connect to the internet as my iMac can, I think I might need an AirPort Card? Is that the case or do I need something different to connect to a wireless modem?

    Welcome!
    Only one variant of the PowerMac G4 could use the faster Airport Extreme Card. The rest used the original Airport card that is pretty slow.
    To get fast wireless without buying more than one thing, consider this:
    http://eshop.macsales.com/item/Edimax/EW7722IN/
    It goes in an available PCI slot
    There are USB solutions also. However, all PowerMac G4 towers had only slower USB 1.1 ports, so any USB wireless adaptor can only run at about wireless 'B" speeds (slow) unless you also install a PCI USB 2.0 adaptor card. Doing that would allow a USB wireless adaptor to run at its maximum rated speed. These items working together would accomplish that:
    USB wireless "dongle:"
    Newer Technology MAXPower 802.11n/g/b USB Adapter + Plug and play direct or with extension cradle
    USB PCI adaptor:
    http://eshop.macsales.com/Search/Search.cfm?Ntk=Primary&Ns=P_Popularity%7c1&Ne=5 000&N=7069&Ntt=USB+PCI
    Each approach has its advantages. The PCI wireless card is a one-piece solution that takes up no desk space. The USB2 card+USB2 Dongle gives you more fast ports for transferring date from other external USB devices (primarily cameras and external hard drives) at hugely faster rates than can the original ports. I have a USB 2 PCI card in my G4 tower strictly for transferring images from my digital SLR camera in a timely manner.

  • I have an old macbook which is running on OS X 10.6.8.  I want to make the switch from moblie me to icloud.  I went to download the new OS X Lion so I can connect and it is telling me I need a Core 2 duo.  I only have a Core duo on this mac.  What to do?

    I have an old macbook which is running on OS X 10.6.8.  I want to make the switch from moblie me to icloud.  I went to download the new OS X Lion so I can connect to the icloud and it is telling me I need a Core 2 duo.  I only have a Core duo on this mac.  What to do?

    Unfortunately there is little you can do, Lion will not run on your machine.
    However it is possible to access some features of iClould while staying with SL. If you go to iCloud you will see the web interface for the cloud.
    Some but not all functionality is here. Check it out and see if it meets your needs.

  • I have a MacBook Pro running Lion. I need to use Lion to run my Dragon. I would like to partition my drive to use Maverick for everything but the dictation software. I'm a new pie to apple

    I have a MacBook Pro running Lion. I need to use Lion to run my Dragon. I would like to partition my drive to use Mavericks for everything but the dictation software. I'm a newbie to apple

    To resize the drive do the following:
    1. Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    After the main menu appears select Disk Utility and click on the Continue button. Select the hard drive's main entry then click on the Partition tab in the DU main window.
    2. You should see the graphical sizing window showing the existing partitions. A portion may appear as a blue rectangle representing the used space on a partition.
    3. In the lower right corner of the sizing rectangle for each partition is a resizing gadget. Select it with the mouse and move the bottom of the rectangle upwards until you have reduced the existing partition enough to create the desired new volume's size. The space below the resized partition will appear gray. Click on the Apply button and wait until the process has completed.  (Note: You can only make a partition smaller in order to create new free space.)
    4. Click on the [+] button below the sizing window to add a new partition in the gray space you freed up. Give the new volume a name, if you wish, then click on the Apply button. Wait until the process has completed.
    You should now have a new volume on the drive.
    It would be wise to have a backup of your current system as resizing is not necessarily free of risk for data loss.  Your drive must have sufficient contiguous free space for this process to work.

  • I need to install windows on my new Macbook pro for running my flight simulator software

    Hi!
    I'm new to the Mac world and I need to install windows on my new Macbook pro for running my flight simulator software which only runs on windows. I would like to purchase and download the windows 8.1 rather than buying the CD.
    When i go to the microsoft store and click windows 8.1 it says it is only for who has windows xp or vista...
    can you tell me where and how can i purchase the full installation 8.1 for download?
    i will keep the ISO file on my flash drive.
    Thanks!
    <Re-Titled By Host>

    it's likely an upgrade you are looking for and not a full install of windows
    http://www.techrepublic.com/blog/windows-and-office/get-the-iso-you-need-to-crea te-your-own-windows-81-dvd/
    if you get it as an iso file then you need to burn the iso file to a optical disc to install it

  • HT3986 Do I need to buy a full, DVD copy of Windows to run Windows?

    Do I need to buy a full, DVD copy of Windows to run Windows?

    If you want to, but you can get Windows for less than that.

  • What do I need to display whatever I call up on my MacBook running OSX 7.5 on a TV with a USB port?

    What do I need to display whatever I call up on my MacBook running OSX 7.5 on a TV with a USB port?

    There is a VGA adapter to TV S-Video RCA Out Cable for PC Video.http://www.amazon.com/VGA-Adapter-S-Video-Cable-Video/dp/B000Y7T5UU/ref=sr_1_7?s =electronics&ie=UTF8&qid=1316369974&sr=1-7

  • Strange prob... to get correct o/p we have to run this prog twice ?????????

    hi,
    my problem is that i have created one bat file and i want to run that file in java but it is not running properly. the problem is .......
    i have created one bat file named "file1.bat" & content of this file is as follows :-
    [ ag > b.txt]
    (and content of file "ag" is "aaaaaaa" )
    now i am trying to run this bat file in java and want to read this b.txt in which i have redirected the content of file "ag".
    for that i have written the code like this:-file name is "runbf.java"
    import java.awt.*;
    import java.lang.Runtime;
    import java.io.*;
    public class DriveVol
    public static void main(String args[]) throws IOException
    int volumn;
    Runtime r = Runtime.getRuntime();
    r.exec("ss.bat");
    FileInputStream fp;
    fp = new FileInputStream("b.txt");
    flush();
    do
    volumn = fp.read();
    System.out.print((char)volumn);
    }while(volumn != -1);
    fp.close();
    when i am running this programme first it is not displaying the content of b.txt. but when u run this prog twice then only it 'll give the correct ans. what i mean is, i'll explain that stepwise.
    1. as per my prog. -- r.exec("aa.bat") -- this line 'll execute first. so content of ag 'll redirect to file "b.txt"
    2. now i am trying to read the file "b.txt" using FIleInputStream...
    3. but first time it is giving some garbbage value.when i give --c:jdk1.3\bin>java runbf
    4. but the very next moment when again i run that file - c:jdk1.3\bin>java runbf
    it 'll give the correct value.
    5. again when i change the content of file ag(suppose "bbbbbbb"). & try to run "runbf.java" like this-
    -- c:jdk1.3\bin>java runbf --
    6. then it 'll display the value "aaaaaa". now when again i run that file
    it 'll give the correct value "bbbbbb"
    7. so every time i have to run that "runbf.java" twice for printing the correct
    value of file "b.txt"
    so what i think is that, it is not refreshing the data of file "b.txt". after executing this line
    r.exec("aa.bat");
    so is there any method to refresh the data of file "b.txt"??????
    i think u 'll try to understand my problem...
    so please help me to get the ans.......
    thx.........

    Cuz r.exec is asynchronous, dummy. Read the friggin API. It starts a background process. If you wanna wait for it to finish, then call
    Process p = r.exec(...);
    p.waitFor(whatever).

  • I just bought an iMac now running OSX 10.8.4.  I have a G5 running OXS 10.5.8 - External HD connected to the G5 been using Time Machine to back up. Need to get my files, photos etc. but not applications etc. onto the iMac. How do I do it?

    I just bought an iMac now running OSX 10.8.4.  I have a G5 running OXS 10.5.8 - External HD connected to the G5 been using Time Machine to back up. Need to get my files, photos etc. but not applications etc. onto the iMac. How do I do it?

    David JHS21 wrote:
    Can I just plug the external hard drive into the iMac and copy the "Documents" and "Pictures" from the hard drive to the iMac?
    Not those whole folders, but their contents, maybe.
    If the user account now on the Mac has read rights to the user account(s) on the backups, yes.  If not, you may have to do some finagling. 
    Try the Browse Other Backup Disks option, per Time Machine - Frequently Asked Question #17.  If you find an account that can open those folders, restore what you want to an alternate location (#16 in the FAQ).
    If not try creating one or more accounts temporarily.

  • I am running Mac OS 10.10 and trying to run Illustrator CS4. CS4 says it needs Java SE 6 Run Time, but I can not load that into OS 10.10. What to do?

    I am running Mac OS 10.10 and trying to run Illustrator CS4. CS4 says it needs Java SE 6 Run Time, but I can not load that into OS 10.10. What to do?

    Jacob,
    You are genius! I search all over the net and had a long chat with Apple without success. 30 minutes after posting the Abobe Illustrator forum, I have a link that works!! Many thanks.
    Jim

  • Can I transfer files from a Mini running 10.4.11 to a new Mini running Lion? States I need to upgrade Migration Assistant, but I see no viable path I can take. OPtions to get photos over to new Mini?

    Can I transfer files from a Mini running 10.4.11 to a new Mini running Lion? States I need to upgrade Migration Assistant, but I see no viable path I can take. OPtions to get photos over to new Mini?

    Thanks Mende1; I know that PPC apps won't function on Intel machines but I can migrate the Universal apps, right? There is such a large gap between Tiger and Mountain Lion - can I still migrate files directly from one to the other taking the Universal apps as well? Sorry, I'm not very computer savvy!
    Len57

  • I need help moving my Photoshop 7 from my old laptop to my new laptop which is running Windows 7 Enterprise.  I've tried two routes unsuccessfully.  I install the CD, it does not autoplay.  I execute Autoplay.exe at the root directory, I am welcomed, I ch

    I need help moving my Photoshop 7 from my old laptop to my new laptop which is running Windows 7 Enterprise. I’ve tried two routes unsuccessfully. I install the CD, it does not autoplay. I execute Autoplay.exe at the root directory, I am welcomed, I choose English, I accept the EULA, I get the Install/Explore choices window, with the Install button already selected, I click the Photoshop button, the CD spins, and nothing happens.  In the 2nd attempt I execute Setup.exe in the Photoshop directory, and nothing happens at all.  I’m never even offered the opportunity to enter my product code. What should I do?

    There could is likely a compatibility problem between the old software and the newer operating system.

Maybe you are looking for