Works fine in JDK 6.0 but not in jdk 1.5.???????

Hi all,
This code converts english date to japanese date but it is working fine in english only. can any body answer why it is so.
Note : No Comiplation problem in jdk 1.5
This code works fine in JDK 6.0 but not in JDK 1.5, Why.....?
SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");
        Locale locale = new Locale("ja", "JP", "JP");//locale for Japanese
        Calendar cal = Calendar.getInstance(locale);  //japanese calender object
        DateFormat df = DateFormat.getDateInstance(DateFormat.LONG,locale);
        try{
        Date date = sdf.parse("1930/09/27");
            System.out.println(df.format(date));
        }catch(Exception e){
            System.out.println(e.getMessage());
        }

Hi,
If I give the Input date 1930/10/27 (in english), then program must display the date as S5.10.27 (it's japanese date with 'S' indicating ERA)
But this will happpen only when i run the program in JDK 6.0.
In JDK 1.5, for the above input, the output is 1930/10/27 (which is wrong)
Still I don't have compilation and running problems in both. Can anybody expalin why it is so?
I think i tried my best to restate the question.
Thanx
Aris

Similar Messages

  • Code is working fine with OIM9102 BP14 patch but not in OIM9102 BP20.

    Using OIM API calls, I am able to fetch usr_key and ugp_key succesfully when utilityFactory is initialized with system admin login.
    When utilityFactory is intialized with non system admin ID, usr_key and ugp_key is returning as "0".
    This code is working fine with OIM9102 BP14 patch but not in OIM9102 BP20. Do user need any access right to invoke API calls ? Any thing related to this is changed in this patch?
    Environment details:
    OIM 9102BP20
    Websphere 6.1

    No, no more rights are needed. If it is working fine into BP older than this one, raise a SR and ask support guys to file a bug. But you have to show them step-by-step working into the older one and not working on newer. It is quite difficult happen, but maybe this feature broken on new business patch 20.
    I hope this helps,
    THiago Leoncio.

  • Home sharing is working fine for musics and videos but not for apps. What is wrong?

    Home sharing is working fine for musics and videos but not for apps. What is wrong?

    i had the same issue as everyone here after upgrading to itunes 10.x.  vista could see xp home share.  ipod touch could see xp home share.
    neither could see vista home share.
    after several hours of authorizing de-authorizing, rebooting router etc, i knew it had to be a firewall thingy with vista as xp was working fine
    i went to this article http://support.apple.com/kb/ht2553 and followed the instructions.  itunes was already in my vista exception list.  on a hunch i deleted the itunes exception and followed the steps to add it again and boom it worked!! i could now see my vista machine from my ipod touch immediately.
    something must have screwed up the firewall exception on the upgrade to itunes 10.x
    it worked for me, i hope this helps others

  • Recently, I can't get any sound from my game applications.  Sound works fine with video, streaming, etc, but not my game applications.  I've tried powering down and re-booting, but the sound does not return.  Can anyone help me?

    Recently, I can't get any sound from my game applications.  Sound works fine with video, streaming, etc, but not my game applications.  I've tried powering down and re-booting, but the sound does not return.  Can anyone help me?

    Have you got notifications muted ? Only notifications (including games) get muted, so the Music and Videos apps, and headphones, still get sound.
    Depending on what you've got Settings > General > Use Side Switch To set to (mute or rotation lock), then you can mute notifications by the switch on the right hand side of the iPad above the volume switch, or via control centre : swipe up from the bottom edge of the screen and it's the right-most of the 5 icons in the middle of it (if the icon is white then it's 'on', tap it to turn it grey and 'off'). The function that isn't on the side switch is set via control centre instead : http://support.apple.com/kb/HT4085

  • Hello i have a problem with onfocus function on ipad. i am trying to bring my cursor on a text box on a button click. It works fine with safari web browser but not on ipad. Need a solution.

    Hello i have a problem with onfocus function on ipad. I am trying to bring my cursor on a text box on a button click. It works fine with safari web browser but not on ipad. Need a solution.

    I don't think that a software update from Apple will solve the issues that you are having. You have a rogue installation. After you posted I have just done the following:
    Disk Utility can verify  my partitioned Volume (including my boot disk) AND REPAIR the non-boot disks on the same Volume without a glitch. It repairs the non-boot disks containing data smoothly.
    I have used Mail to send some mails from some Yahoo and Hotmail accounts to my Thunderbird client containing GMail accounts - absolutely normal.
    I have iLife '09 but my iMovie '09 and iPhoto '09 open in a jiffy and I see no issues here. I have 6GB RAM (Maximum) on an early 2008 Macbook Pro with a 750GB hard drive partitioned with 120GB reserved for the Boot Drive.
    I am sorry that I cannot help further but I am sure there must be a way to reinstall the software without having to revert to restoring your ML backup. I have two clones and if you have such I would attempt to do that through that rather than through Time Machine - that is of course if you have a cloned drive.
    Good luck!

  • BI Publisher 10.1.3.4.1 works fine in IE 6 & 8 but not 7

    When performing operations such as test database connections or install schema on scheduler configuration, the customer gets an error occurs on the page in IE 7.0.5730.11, but it works fine in 7.0.6001.18000. My customer is pushing on reproducing this even though they have resolved it. I cannot update/downgrade to this version to test on my own instance.
    Would this be considered an IE problem or a Publisher problem?
    I suppose I could just write a note on it, but I could find no other issues to confirm this.
    Customer also indicates that IE 7.0.5 use Java 1.4.2 and the Explorer 7.0.6 use Java 1.6. I'm not sure where to check this verison information, I would think that there would also be a problem with IE6 if this was the case.
    I checked IE 6 and it uses JRE 1.6.0
    The install manual indicates that Java Runtime or JDK 1.4 or later is supported.
    Thanks.

    I guess, it has nothing to do with Browsers.
    if at all , it has, it might be with the configuration or JDK installed.

  • Applet works fine with JNLP... but not on my web page

    I can create a seperate JNLP for my applet, and it works fine. However, when I try to insert it into a web page, it does not work. I was wondering if this was a common newbie issue, and how I would go about fixing it. I compiled it using the newest J2EE JDK and the newest JSE (downloaded and installed a couple of weeks ago).
    Any help would be greatly appreciated... thank you.

    If you want to insert an applet in a web page you use java plug-in, not java web start. You can use Java Web Start to deploy an applet outside of a browser, but plug-in is still the primary applet deployment method, and the only one that can show an applet in a web page.
    /Andy

  • Code works fine when stepping through debug, but not without debug

    I have the following code that works fine when I step through with the debugger, but when I run it with out the debugger it never gets the objects in the "moveObjects" method. I would appreciate any help. Thank you
    import com.crystaldecisions.sdk.exception.SDKException;
    import com.crystaldecisions.sdk.framework.IEnterpriseSession;
    import com.crystaldecisions.sdk.framework.IEnterpriseSession;
    import com.crystaldecisions.sdk.plugin.desktop.program.IProgramBase;
    import com.crystaldecisions.sdk.plugin.desktop.common.*;
    import com.crystaldecisions.sdk.framework.*; //cesession
    import com.crystaldecisions.sdk.plugin.desktop.program.*; //ceplugins
    import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
    import com.crystaldecisions.sdk.occa.infostore.*;
    import com.crystaldecisions.sdk.properties.IProperties;
    import com.crystaldecisions.sdk.plugin.destination.managed.*;
    import java.sql.SQLException;
    import java.sql.Statement;
    import java.sql.DriverManager;
    import java.sql.Connection;
    import java.util.*;
    import java.sql.ResultSet;
    import java.sql.Connection;
    import java.sql.Statement;
    import java.sql.ResultSet;
    import java.sql.DriverManager;
    * @author ag0310m
    public class MoveRptInstance implements IProgramBase {
        public void run(IEnterpriseSession enterpriseSession, IInfoStore iStore, java.lang.String[] args) {
            try {
                IInfoObjects objects = null;
                IInfoObjects objs = null;
                IProperties props = null;
                try {
                    getObjectsToSend(objects, iStore);
                    moveObjects(iStore);
                } catch (SDKException e) {
                    //ExamplesUtil.WriteError(request, response, e, "RETRIEVE_ERROR", errorpagerfile);
                    System.out.println(e.toString());
                    //out.clear();
                    return;
            } catch (Exception ex) {
                ex.printStackTrace();
        private void getObjectsToSend(IInfoObjects objects, IInfoStore iStore) throws SDKException {
                        objects = null;
                        objects = iStore.query("Select * from CI_INFOOBJECTS where si_name = 'ReportBurstingTest' and si_instance = 1 and si_recurring = 0");
                        try {
                              sendObjects(objects, iStore);
                         } catch (Exception e) {
                             System.out.println(e.getLocalizedMessage().toString());
                             e.printStackTrace();
                         } finally {
        private void moveObjects(IInfoStore iStore) throws SDKException {
                        IInfoObjects iObjects = null;
                        iObjects = iStore.query("Select * from CI_INFOOBJECTS where si_parentid = 716");
                            int x = iObjects.size();
                            System.out.println("value of x = "+x);
                            for (int ii = 0; ii < x; ii++) {
                                IInfoObject obj = (IInfoObject) iObjects.get(ii);
                                obj.setParentID(868003);
                           iStore.commit(iObjects);                   
        private void sendObjects(IInfoObjects oInfoObjects, IInfoStore infoStore) throws SDKException {
         //Grab the first object in the collection, this will be sent.
            int x = oInfoObjects.size();
            System.out.println("3");
            for (int i = 0; i < x; i++) {
                IInfoObject infoObject = (IInfoObject)oInfoObjects.get(i);
                ISendable obj = (ISendable)infoObject;
                IDestinationPlugin destinationPlugin = getDestinationPlugin(infoStore, infoObject.getKind(), infoObject.getTitle(), infoObject.getUpdateTimeStamp());
                IDestination destination = obj.getSendToDestination();     
                destination.setFromPlugin(destinationPlugin);
        //Send the InfoObjects.
        infoStore.sendTo(oInfoObjects);
        private IDestinationPlugin getDestinationPlugin(IInfoStore infoStore, String kind, String title, Date dte) throws SDKException {
         //Retrieve the Managed Destination plugin from the InfoStore
        //this should be cast as an IDestinationPlugin *DON'T FORGET THE get(0) AT THE END**
        IDestinationPlugin destinationPlugin = null;
        destinationPlugin = (IDestinationPlugin)infoStore.query("SELECT TOP 1 * " +                                                                               
    "FROM CI_SYSTEMOBJECTS " +
                                                                                    "WHERE SI_NAME='CrystalEnterprise.Managed'").get(0);
        //Retrieve the Scheduling Options.
        //This interface is the one which allows us to add the file location for the scheduling.
        IManagedOptions managedOptions = (IManagedOptions) destinationPlugin.getScheduleOptions();
        managedOptions.setDestinationOption(IManagedOptions.CeDestinationOption.ceInbox);
        managedOptions.setIncludeInstance(true);
        managedOptions.setTargetObjectName(title+" - "+dte.toString());
        managedOptions.setSendOption(IManagedOptions.CeManagedSendOption.ceCopy);
        //Set of users that will receive the instance. 
        Set userSet = managedOptions.getDestinations();
        //Query for the id of a particular user that will receive the instance.
        IInfoObjects users = null;
            users = infoStore.query("SELECT TOP 1 SI_ID " +
                                 "FROM CI_SYSTEMOBJECTS " +
                                 "WHERE SI_NAME='Administrator' AND SI_PROGID='CrystalEnterprise.User'");
            if (users.size() > 0) {
             IInfoObject user = (IInfoObject)users.get(0);     
             int id = user.getID();
             userSet.add(new Integer(id));
         return destinationPlugin;

    I'm assuming SI_ID=716 is the Inbox where you're sending the objects.
    The issue is that you're not clicking the "Step Over" button fast enough when debugging.  If you click really fast, then you'll get the same issue.
    Workaround for the non-debug case is to count the number of objects you're sending, then when moving, loop till the InfoStore query retrieves the correct number of objects.
    You're not giving enough time for the Destination Job Server to send the objects to the Inbox - they're not there yet.
    Sincerely,
    Ted Ueda
    Edit:  I see you've identified the issue as well - note that the CMS job scheduling thread triggering interval isn't under programmatic control, so I'd still recommend loop-count-wait workflow.
    Edited by: Ted Ueda on Oct 22, 2009 11:59 AM

  • Photosmart 7960 worked fine with old computer (XP), but not with new computer (W7)

    Recently replaced my HP Pavilion a650Y running XP with custom-built running Win 7-64.  7960 printer worked fine w/ XP and worked (test page) once with Win 7-64.  Now when I try to print, job shows up in print que, bur printer goes off-line and gives me "printer error" message.  I can print test page from printer front panel, so I know printer is working, but can't print anything from computer.

    Hi there,
    Try downloading and running the print and scan doctor located here:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03275041&cc=us&dlc=en&lc=en
    It can fix a lot on its own and if not give a better idea of what is going on.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Video out works fine on my 3GS phone but not on my iphone 4. What could be the issue?

    I have a 3GS phone and Apple component video cable that I have connected to HDMI capable TV. Everything works fine on 3GS. I try to do the same with my iphone 4 (hoping for better HD picture), and nothing happens. I am using iOS 4.2. on the 3GS and 4.3 on the iphone 4. Not sure if there is a bug somewhere. On the  iphone 3GS, i get a message that says something like video redirected to TV as soon as I connect the component video cable to the iphone. No such thing on the iphone 4.
    Can someone help?

    All parties do have the IOS 7.1. I really don't know what's going on I was using it last week &amp; and I noticed updates one being ft so I updated and now when I go onto ft it looks like its face-timing, but no sound, then it says lost connection. but works on I phone? I don't like using I phone to ft as screen too small.

  • My site working fine on chrome in Mobile but not on firefox

    My site http://ccl5<i></i>.com/ working fine on chrome/opera in Mobile but its slider doesn't come up working fine on firefox mobile.
    Can anyone take a look ?

    Its working fine for me.. Firefox 34.0 for Android... Which version you are using? try to update if using older one.. :-)
    cheers..

  • A video clip that works fine in windows media player but not in Premiere

    I have an AVI video clip file that I recorded from an old VHS tape many years back. The file plays just fine in Windows Media Player but when I import it into the latest version of Premiere Pro CS6 the video portion shows nothing but a green screen. The audio track plays fine. I've tried using Adobe Media Encoder to change it into a variety of different formats. Some don't even produce a file and some do but don't work any differently than the original within Premiere. Any suggestions?
    thanx a bunch,
    mike

    Report back with the codec details of your file, use the programs below... A screen shot works well to SHOW people what you are doing
    http://forums.adobe.com/thread/592070?tstart=30
    For PC http://mediainfo.sourceforge.net/en or http://www.headbands.com/gspot/

  • Will work fine with USB 1.1 but not with USB 2.0? Help!

    Hi, I have installed my ipod on windows XP PC and it works fine with my USB 1.1 ports, however when i try to use my usb 2.0 ports all i get is
    (a) the noise suggesting someting has been plugged in
    (b) in device manager it says USB mass storage device wiht a yellow exclamation mark beside it. (it is enabled by the way)
    (c) on the ipod screen it says 'ok to disconnect'
    please i can't cope with usb 1 transfer rates and i dont have any spare slots to fit a firewire card before someone suggests it.
    thanks in advance!

    Did you add the USB 2.0 devices after installing iTunes and the iPod? If so uninstall and reinstall. If you are in a position to disable the USB 1.1 device (just while you reinstall) that might be worth trying.

  • Why does my javascript code work fine in all other browsers, but not Safari

    Previously, I have asked how Safari handles javascript trying to resolve a problem with a slide menu, (http://www.designoutput.com/testslide.html) being directed to validator. I have corrected as many things as possible and still have code work in other browsers. Why will my code work in all other browsers (IE 5.2, Firfox, Netscape, and Opera) and not Safari. It appears that Apple would address some of the problems that people are listing. Possibly, my problem is not with Safari, but my code, if so why does it work in all other browsers. Having more knowledge of how Safari accepts code or handles code differently than other browsers would be helpful. It would be nice if I could debug my code in Safari step by step to know where the problem is at. I'm just frustrated with Safari after working on my problem for over a month. Would be very greatful to anyone that could just being to get my code to appear in Safari (only a blank page in Safari, menu appears in all other browsers)
    G4 AGP 400, Powerbook G4, G4 Siver 733   Mac OS X (10.4.7)  

    you seem to have deleted even more end tags. elements (<a>, <div>, <td>, etc.) need to be closed (</a>, </div>, </td>, etc.) to structure the code properly.
    incorrect:
    document.write(<font ...><b>example)
    correct:
    document.write(<font...><b>example</b></font>)
    check out w3schools for html and javascript help.
    the ilayer tag should only be in your NS (i.e. not NS6) code, but it too needs to be closed.
    i don't use IE, but with these fixes i've gotten your page to display fine in safari, firefox and opera.
    iBook g4     OS X.4.x

  • Huawei e180 not working with Lion!!... working fine on Windows PC's but not on new macbook pro. new user to apple

    Any suggestions on why mobile broadband dongle will not work with 10.7. Mac see dongle, opens folder, but returns error message when try to launch.. NEW USER TO MAC

    This thread is a couple of years old but it may answer your question?
    https://discussions.apple.com/message/8978867#8978867

Maybe you are looking for