Making Code Backward Compatible (SDK 1.4 - 1.3)?

In SDK there is a method added in Toolkit class: "public void setDynamicLayout(boolean dynamic)".
Is it possible to generate code which is compatible no matter if the bytecode runs on a 1.3 VM or a 1.4 VM?
I would like to do something like (pseudocode):
if(sdkVers > 1.4)
    Toolkit.getDefaultToolkit().setDynamicLayout(true);I didn't try it, but I think it wouldn't work. Or am I wrong? If I'm right, is there a way to do what I want (make code compatible on different VM versions)?

Actually, I think it is a very good question. One that I have been wondering about for some time myself. The question is: when will the JVM actually try to lookup the method? Is it when the class is loaded or resolved? Or is it when it has to call the method the very first time? Or is this not specified at all?
if(sdkVers > 1.4)
Toolkit.getDefaultToolkit().setDynamicLayout(true);If the JVM waits until the actualy method invocation, then the above code would actually work on a 1.3 JVM since it will never try to invoke the non-existing method.
Our programs need to be able to run on Java 1.3 because we have to support MacOS X. But it annoys me that I cannot take advantage of 1.4 features when the program runs on Windows. I don't like the use of reflection because it destroys compile-time checking. So until now I have stayed away from using 1.4 features completely.

Similar Messages

  • Making AS3 code backward compatible to Flash 8?

    So I made a slideshow swf in AS3 only to later find out it needs to be compatible with Flash 8...and in my estimation AS3 cannot publish back to a Flash 8 swf without it being AS2...is there anyway I can do this without rewriting the code? I'm fairly new to AS, starting with 3 - so I really don't have any AS2 knowledge.  Any help is always greatly appreciated.

    If the file needs to be compatible with Flash 8, then you need to first do the conversion to AS2, then you need to save the file as a Flash 8 file, which you'll need Flash CS3 to do. So if you're working with CS4, first you need to save the file as a CS3 file, then you need to have CS3 to be able to save it to Flash 8.

  • CC Apps NOT Backward compatible with Master Collection 6.0...WHY NOT?!!!!

    This is just horse doodoo. Adobe, you've already got us hooked and paying out the nose, so WHY do I have to save all of my files in an OLDER version (InDesign, for instance) when I'm working on them in Creative Cloud just so I can be able to open them with my MasterCollection6 I paid $3000+ for?
    I should NEVER see the message: "Cannot save because file was created with a newer version Creative Cloud..." when I am working with your latest NON-MONTHLY CS6 Master Collection Apps. It is a pain in the a$$ and slows down our workflow.
    PLEASE, either give your loyal Master Collection 6 customers updates that make our Apps compatible with Creative Cloud, or start making Creative Cloud Apps backward compatible with our 6.xx version!
    Stop trying to hold us hostage with your plans to monthly-revenue everything we already paid thousands for, please!
    Sincerely pisT,
    Small Business Owner

    New features in new software does sometimes mean that new files do not open in old software
    Microsoft also does this... the new DOCX documents will not open in the old Word 97 (and, in fact, I had to buy MS Office 2003 because MS Office 97 would not even install and run on Windows 7)

  • Can Framemaker 12 save files down in Framemaker 11 and 10 ? Is it backward compatible?

    Can Framemaker 12 save files down in Framemaker 11 and 10 ? Is it backward compatible?
    Thanks,

    > Times New Roman ... you’re probably using the Unicode version of it ...
    Port a legacy font from the FM7 machine to the FM12 machine, such as Type1 Times, and convert the document to that on the FM12 machine.
    This may not completely solve the problem, as FM8 and later, when opening a pre-FM8 document, appears to convert some things to Unicode code points (even to the point of synthesizing a Unicode encoding of a legacy font, see Re: Adding the Trademark symbol to a document). Saving back to MIF7 probably does not convert the code points back, and FM7 may well complain, or crash, or something.
    If the problem is limited to certain special characters, like ™, there may be work-arounds, like invoking them only as Variables.
    This Unicode border between FM7.2 and FM8 may prove to be one-way for many documents, rather like the spikes at the exit of rental car lots. Do not back up. Extreme document damage may result.

  • Vector shapes not backwards compatible?

    Hello,
    I work in an office where some people are on differnt versions of Photoshop while I am using CC. When I create vector objects and save them in a file they sometimes show up as all black in older versions of photoshop. Is there a process that I can use that will get around this issue? These files are passed back and forth and I understand that I may loose the ability to use some of the newer features with CC in order to avoid issues. But I need to use the vector options on a daily basis.
    I see another issue that people are running into that I also deal with alot and that is the crop tool adjustments. When you use the crop tool it sometimes makes the vectors all out of wack.
    Any help is apreciated!
    Thank you,
    Andrew H

    You have your compatibilities backwards. Older versions are not forward compatible for newer features are not in older versions of Photoshop so compatibility is not possible.   Newer versions of Photoshop for the most part are backwards compatible with older versions of Photoshop. However Adobe drops the ball at times. Since CS4 Photoshop is not fully backwards compatible in fact Photoshop CS4 and newer are not fully compatible with themselves.  There are bugs and compatibility issues with options in the adjustment panels fly-out menu.  Option in it can change Photoshop default operation which not only makes it not backwards compatible they make some feature  in the current version work in an inconsistent manner.  The code implementing these options  are not without their bug. Photoshop does not always operate the way the options are set.

  • Backwards Compatible

    I hired a foreign company to build an iPhone application for me. They sent me the completed project, and I did the build for distribution. I just found out that my app is not backwards compatible. Is this something I can change when I do the build. If so, what do I have to change? I'm worried that changing anything will throw off the rest of the project. Please advise.

    The company that you hired has an obligation to answer this question for you. Briefly, the project can be built for a lower OS version by selecting another SDK from the drop down list in the upper left corner of any Xcode window, or by selecting Project->Set Active SDK from the top menu. However this won't work if the project uses any features that were upgraded or added since the lower OS, and you won't necessarily know if that's the case without a full test cycle. This should have been discussed with the programmers, and they're the only ones who can give you a definitive answer.

  • Is AIR2.0 backwards compatible?

    Hi,
    Is AIR2.0 backwards compatible? Can it run AIR1.5 applications without having to repackage them using the 2.0 SDK?
    I can only find information in the beta release-notes where it states that "most backward compatibility bugs have been fixed", which of course doesn't help me much.
    Greets,
    Jeroen

    Hi Jeroen,
    AIR 2.0 should be compatible with applications built with previous releases.  The exception to this is applications built with beta releases of AIR 2 will not run with the AIR 2.0 GM runtime.  If you run into compatibility problems, please let us know.
    Thanks,
    Chris

  • The Bluetooth low energy protocol is not backward compatible with classic Bluetooth protocol. My iPhone 4s can not find my sonny in-dash player. However my iPhone 3GS does it. Very disappointed with this. Any idea how it can be fixed???

    The Bluetooth low energy protocol is not backward compatible with classic Bluetooth protocol.
    My iPhone 4s can not find my sonny in-dash player. However my iPhone 3GS does it. Very disappointed with this.
    Any idea how it can be fixed??????

    Hello,
    You are correct, Blue tooth low engergy, BTLE.(only) devices are not backward compatible with Classic bluetooth and cannot connect.
    However the Apple 4S and above have Bluetooth 4.0 support.. Hardware wise it has bothClassic Bluetooth, like the 3GS, as well as Bluetooth Low Energy.  There is no good reason why your 4s cannot communicate to your Sony in-dash player using the Classic bluetooth that resides in the 4S.
    I know that this does not answer the why it does not work, but it should work. Do you have to somehow re-pair the new phone up to the player?  Not  knowing the model of the Sony it is hard to investigate.
    And I hate to ask but are you sure that the Bluetooth radio is on in the phone?
    JT

  • I am making code to try to make a game and my problem is that my code......

    I am making code to try to make a game and my problem is that my code
    will not let it change the hit everytime so im getting the first guy to hit 1 then next hits 8 and so on and always repeats.
    Another problem is that I would like it to attack with out me telling it how much times to attack. I am using Object oriented programming.
    Here is the code for my objects:
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class rockCrab {
         //Wounding formula
         double sL = 70;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 50;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         rockCrab() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              double done = rint(fH - fA);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("Rockcrab hit" +done);
    import java.lang.*;
    import java.io.*;
    import java.net.*;
    import java.util.*;
    import java.util.Random;
    import static java.lang.Math.*;
    import java.awt.*;
    import java.awt.color.*;
    class self {
         //Wounding formula
         double sL = 1;                                   // my Strength Level
         double bP = 1;                                   // bonus for prayer (is 1 times prayer bonus)
         double aB = 0;                                 // equipment stats
         double eS = (sL * bP) + 3;                         // effective strength
         double bD = floor(1.3 + (eS/10) + (aB/80) + ((eS*aB)/640));     // my base damage
         //Attack formula
         double aL = 1;                                   // my Attack Level
         double eD = 1;                                   // enemy's Defence
         double eA = aL / eD;                              // effective Attack
         double eB = 0;                                   // equipment bonus'
         double bA = ((eA/10) * (eB/10));                    // base attack
         //The hit formula
         double fA = random() * bA;
         double fH = random() * bD;
         double done = rint(fH - fA);
         //health formula
         double health = floor(10 + sL/10 * aL/10);
         self() {
         void attack() {
              health = floor(10 + sL/10 * aL/10);
              fA = random() * bA;
              fH = random() * bD;
              done = rint(fH - fA);
              System.out.println("You hit" +done);
    }Here is the main code that writes what the objects do:
    class fight {
         public static void main(String[] args) {
              self instance1 = new self();
              rockCrab instance2 = new rockCrab();
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
              instance2.health = instance2.health - instance1.done;
              System.out.println("You hit: " +instance1.done);
              System.out.println("rockCrabs health: " + instance2.health);
              instance1.health = instance1.health - instance2.done;
              System.out.println("RockCrab hit: " +instance2.done);
              System.out.println("rockCrabs health: " + instance1.health);
    }when the code is run it says something like this:
    you hit 1
    RockCrabs health is 9
    RockCrab hit 7
    your health is 38
    you hit 1
    RockCrabs health is 8
    RockCrab hit 7
    your health is 31
    you hit 1
    RockCrabs health is 7
    RockCrab hit 7
    your health is 24
    you hit 1
    RockCrabs health is 6
    RockCrab hit 7
    your health is 17
    my point is whatever some one hits it always repeats that
    my expected output would have to be something like
    you hit 1
    RockCrabs health is 9
    RockCrab hit 9
    your health is 37
    you hit 3
    RockCrabs health is 6
    RockCrab hit 4
    your health is 33
    you hit 2
    RockCrabs health is 4
    RockCrab hit 7
    your health is 26
    you hit 3
    RockCrabs health is 1
    RockCrab hit 6
    your health is 20
    Edited by: rade134 on Jun 4, 2009 10:58 AM

    [_Crosspost_|http://forums.sun.com/thread.jspa?threadID=5390217] I'm locking.

  • XCelsius 2008 is not backward compatible with ver 4.5

    Post Author: Joseph
    CA Forum: Xcelsius and Live Office
    I tried opening a project that was done with ver 4.5 but it just said that "Crystal Xcelsius is unable to load this file. This file may be corrupt or may have features that cannot be supported by this version of Crystal Xcelsius." So i guess I probably have to recreate the project in the 2008 version to take advantage of the new features available. So I imported the excel datasheet used in the old project to a new project in Xcelsius 2008 and tried recreating the objects from scratch. I had started with an accordion menu and two list boxes and then I decided to export to swf to test. However, the result was disappointing. I could only see the two list boxes but not the accordion menu. There was a message saying "Initializing..." that stayed. Does this mean I have to recreate the excel data from scratch as well?

    Post Author: abrat
    CA Forum: Xcelsius and Live Office
    X2008 is backward compatible with CX4.5.  But Jim is correct. There is a bug in X2008 which prevents it from opening some 4.5 models by double-clicking on the filename.  They can be opened from the File > Open menu.  This only affects opening the model.Due to the many changes between CX4.5 and X2008, the migration of old CX4.5 models is not clean.  Differences will be seen.  Most are cosmetic affecting only the look of the model.  But some tidy up, color changes and re-alignment work must be done.   There was no way to gain the benefits of X2008 and still keep CX4.5 models unchanged.Andy  

  • Thunderbolt/Firewire adapter backwards compatible?

    So I just bought a new 4TB G-Raid w/ Thunderbolt. Additionally, I bought a Thunderbolt to FireWire adapter, so I can connect my Firewire 800 equipped mac to the hard drive. IT DOESN'T WORK . I've read that they only work with a Thunderbolt equipped mac, to a female fw 800 cable. However, the deeper I've dug, I've heard that they are indeed backwards compatible (specifically with the G-tech drives), or that there can be software drivers that can make them backwards compatible. Anyone have any ideas??
    Speccs: 2010 mbp 17 inch. 2.53 ghz i5. 8gb RAM.

    Yes, I know that my mbp doesn't have a TB port, but I was hoping that the adapter would solve this problem, as it would change the connectivity to FW 800. I realize that is bottlenecking it, but I didn't have much choice because of the harddrive I had to buy. As for the eSata connections, I've never used that method. So I guess I wouldn't really know where to begin in considering that. However, the current drive I have now is:
    http://www.macmall.com/p/G-Technology-Racks-Enclosures-And-Arrays/product~DPNo~9 222671~pdp.hfejbdi?source=mwbgoogleshop&adtype=pla&kw=%7Bkeyword%7D&gclid=CNCE47 L67rgCFU5xQgodYSoArg
    Thank you for your help! If all else fails, I'm just going to have to travel a bit further to buy a 4tb drive with FW, and return the one I just bought. Hopefully that's not the case....:/

  • Is The iPod Touch Backward Compatible With USB 1.1 Connections?

    Hi. I intend to get the iPod Touch soon. But, before I make the leap, I'd like to know whether the iPod Touch is backward compatible with my older USB 1.1 connections. Any help will be appreciated here. Thank you.

    Hello Castlegard,
    As mentioned, the Minimum System Requirements for the iPod Touch does specify USB 2.0, see the requirements here:
    http://support.apple.com/kb/TS1323
    While it is theoretically possible to sync over a USB 1.1 connection, your mileage may vary. Consider that USB 1.1 has a transfer rate of 12Mbit/sec, where USB 2.0 is 480Mbit/sec, so USB 2.0 is basically 40x faster. Transferring small files may succeed, but when you try to get iTunes to update or restore an iPod Touch, it will be trying to push a 300MB file (approximately) through a 12Mbit pipe. Trying to do updates or restore via USB 1.1 will often result in iTunes timing out before the process is complete.
    If I were to try to sync a 1.5GB movie over a USB 1.1 connection, I could probably go to downtown Sydney and have a nice dinner and attend a concert at the Sydney Opera House and still get back before the sync was complete. BTW, I live in California...
    If your computer is a desktop tower, upgrading to USB 2.0 is a relatively inexpensive proposition. If you are not a handy person with a phillips screwdriver or electical devices, most computer dealers or resellers will install for a nominal fee.
    Charles H.

  • Weblogic 8.1 backward compatible

    Hi all,
    I created an application using Weblogic8.1 workshop. I want to deploy the same
    on Weblogic 6.1 but I am getting lot of errors.
    Is Weblogic 8.1 backward compatible?
    Thanks in advance.
    -Jaya

    Jaya wrote:
    Hi all,
    I created an application using Weblogic8.1 workshop. I want to deploy the same
    on Weblogic 6.1 but I am getting lot of errors.
    Is Weblogic 8.1 backward compatible?No.
    Robert

  • Is Compressor 4.1.2 backwards compatible with FCP7?

    Last year I transferred FCP7 to my 2013 MBP from my 2008 MBP and for whatever reason Compressor did not migrate over. I tried copying it and moving it but it will not work. So I figured I would buy the new Compressor but I want to check first to see if it's backwards compatible.

    Is there any interoperability? No. Can you export self-contained movies from FCP 7 and import them into Compressor/  Of course.
    Many experienced FCP editors advise against "transferring" or migrating any of the FCS applications. If you were the purchaser of the Final Cut Studio suite yourself, you should still have the install disks, from which you can easily install C 3.5. That's the recommendation for most reliable performance,
    Russ

  • Backward compatible from CC to CS6

    To save backward compatible doesn't work in CC. I can't open the file in CS6. Why?

    Berna,
    It sounds as if we are looking at some strange malfunction.
    This is a general list of things you may try when something goes rather wrong; in your case, 1), 2), and 5), would seem less likely; if you like your settings, you may prefer 4) to 3):
    It seems that something is seriously wrong.  You may try the following (you may have tried/done some of them already) and see whether it helps (the following is a general list of things you may try when it is not in a specific file; 3) and 4) are specifically aimed at possibly corrupt preferences):
    1) Close down Illy and open again;
    2) Restart the computer;
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool, and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

Maybe you are looking for

  • Sorting problem in BEx/Portal

    Hi all, I am facing a problem while sorting an Infoobject in BEx or in portal. For e.g I am having a PO Status Report  in which I have PO, Trasaction description and calday.Now when I am executing that report in BEx and on right clicking -> Sort PO w

  • Validation on settlement rule percentage

    Hi folks, We have a requirement to set up a validation on the settlement rule percentage for an IO/WBS which settles to a final asset to restrict it to 1% or greater. In other words the settlement rule to final asset below 1% should not be permitted.

  • Pesky pesky reoccuring "iTunes Setup assitant".

    what I have: -iTunes v. 7.6.0.29 -Windows vista -iPod touch I have the most recent iTunes build version 7.6.0.29 on my Vista Machine. No hacks, nothing unusual. Everything has worked fine until recently. I did not do anything that I can think in rega

  • SQL or PL/SQL : dynamically insert table name in a SQL Statement

    Hi, We have a strange requirement - we need to dynamically use the table names in a SQL Query. E.g: select * from :table_name The table_name will be chosen from a list. I have tried this in SQL as well as PL SQL - but, I have been unsuccessul so far.

  • Study material

    Hi, What are pre-requisites to learn ESOA? Can anyone please provide study material for the same . Regards, Abhishek