File comparaison works on win32 JVM, not on 64bit solaris JVM

Hi all!
I have the following code comparing 2 files. It works on win2000 but doesnt work on unix solaris. (same JVM version)
win32 JVM is 32 bit, solaris JVM 64 bit
private boolean fichierIdentiqueBytePourByte( InputStream in1, InputStream in2 ) throws IOException{
          int a = 0, b = 0;
          while(true){
            // read next byte from both stream
            a = in1.read();
            b = in2.read();
            // if its different then files are different and we are done
            if (a!=b) return false;
            // if both are at eof then all checked must be the same
            if (a==-1&&b==-1) return true;
            // if either are at eof then they are different sizes
            if (a==-1||b==-1) return false;
     }any ideas of what the problem might be?
Thanks

Presumably when you say it didn't work you mean that in one case it returned true and in the other it returned false.
If something else then you need to explain what it is.
Naturally one obvious source of the problem is that in fact the files are not the same on the 64 bit machine. For example they were transferred using ftp and one was transferred using ftp text and other via ftp binary. Then the lengths would be different.
Another possibility is that you are not running the code that you think you are.
If the files are very large then it is possible there is some difference there.

Similar Messages

  • File comparaison works on win32, not on unix solaris

    Hi all!
    I have the following code comparing 2 files. It works on win2000 but doesnt work on unix solaris.
         private boolean fichierIdentiqueBytePourByte( InputStream in1, InputStream in2 ) throws IOException{
              int a = 0, b = 0;
              while(true){
                // read next byte from both stream
                a = in1.read();
                b = in2.read();
                // if its different then files are different and we are done
                if (a!=b) return false;
                // if both are at eof then all checked must be the same
                if (a==-1&&b==-1) return true;
                // if either are at eof then they are different sizes
                if (a==-1||b==-1) return false;
         }any ideas of what the problem might be?
    Thanks

    418nic wrote:
    Hi all!
    I have the following code comparing 2 files. It works on win2000 but doesnt work on unix solaris.
         private boolean fichierIdentiqueBytePourByte( InputStream in1, InputStream in2 ) throws IOException{
              int a = 0, b = 0;
              while(true){
    // read next byte from both stream
    a = in1.read();
    b = in2.read();
    // if its different then files are different and we are done
    if (a!=b) return false;
    // if both are at eof then all checked must be the same
    if (a==-1&&b==-1) return true;
    // if either are at eof then they are different sizes
    if (a==-1||b==-1) return false;
         }any ideas of what the problem might be?
    ThanksWell, from your code, you only have two traits that this depends on to work--comparing int's and EOF. You have hard coded a -1 for EOF into this, I am not completely familiar with EOF condition on different platforms, but I know int's compare without error on every platform. Do a debug and a breakpoint set to stop just before you think you're going to get an EOF and I think you'll see, that the EOF you are using is the actual problem.

  • File download works in Firefox but not IE

    Hi All,
    I have the code below,
    fds = new FileDataSource(fileName);
    response.setContentType("text/html;charset=UNICODE");
    response.setHeader("Cache-Control","public");
    response.setHeader("Content-Disposition", "attachment; filename=\"" + fds.getName() + "\"");
    is = fds.getInputStream();
    in firefox its asking the path where to download the csv format file.
    But in IE one pop-up is opened and it says "To help protect your security, Internet Explorer blocked this site from downloading files to your computer. Click here for options.." after clicking the download options its not downloading...
    Any inputs highly appreciate..
    Thanks

    Majeed.H wrote:
    Hi,
    even I changed the content type to csv also its not working
    below is my code.
    response.setContentType("application/csv;charset=UNICODE");
    //response.setHeader("Pragma","public");
    response.setHeader("Cache-Control","public");
    response.setHeader("Cache-Control", "must-revalidate");
    response.setHeader("Content-Disposition", "attachment; filename=\"" + fds.getName() + "\"");I'm having trouble understanding where you are at this point.
    Can you get the file to download in IE under any circumstances? If not, are you sure it's not the browser's security settings stopping you? Have you tried explicitly allowing downloads from your site in the client browser? What exactly happens when you try to download in IE?

  • Jvm not terminating in Solaris 8

    We are running Weblogic 7.0 sp1 on Solaris 8.
    When we attempt to shutdown managed servers or admin server with a graceful
    shutdown the java process is still in the process table?? We didnt
    notice this
    with Weblogic 7.0.
    Also if you do a force shutdown then the jave process terminates
    Any ideas

    This is a known issue. Contact [email protected] and reference CR087180.
    For now use kill -9 or weblogic.Admin SHUTDOWN to shutdown the managed
    server.
    Larry Presswood wrote:
    As a note this happens only in the following situation
    We have an admin server and two managed servers.
    When we shutdown the manged server but not the admin server their jvms
    ie managed server jvms dont terminate nor do their scripts. We are not
    using
    node manager. Now if you shutdown the admin server then all jvms will
    terminate
    So it appears as though the jvms in the managed servers are waiting on
    something
    from the admin server prior to terminating??
    Larry Presswood wrote:
    We are running Weblogic 7.0 sp1 on Solaris 8.
    When we attempt to shutdown managed servers or admin server with a
    graceful
    shutdown the java process is still in the process table?? We didnt
    notice this
    with Weblogic 7.0.
    Also if you do a force shutdown then the jave process terminates
    Any ideas
    Rajesh Mirchandani
    Developer Relations Engineer
    BEA Support

  • I had all of my video files that I work on in iMovie saved to an external hard drive exclusively to save space on my Macbook.  I had just finalized a project, went to work on another one and files couldn't be found, were not deleted how do I find them?

    I had all of my video files that I work on in iMovie saved to an external hard drive exclusively to save space on my Macbook.  The other day I had just finalized a project and went to work on another one and when I opened the project I could see what should have been there, but scrolling over the entire clip I would only see black and that the file was missing.  I did not drag anything on the hard drive to the trash or move anything.  How can I get those files?  These are videos of my kids and I am devastated and willing to try anything!

    Control click does not work - no option to find files.  I have no idea what to do.  When I look at the usage of the external drive the space is being used, but I cannot find the files.  I am going to try MacKeeper's Undelete and see if I can make any progress with it. 

  • .oam file of html5 video trigger code not working in Muse

    I simply want to have a video play on page load. I have done the code for a trigger on one <div> to automatically play a video in Edge. The video plays perfectly in browser preview, even with transparency intact! Just the way I want it. The problem is when I insert .oam file in Muse it doesn't work. Other animations of simple objects and key frames work fine in Muse. But, I can make much more beautiful animations for certain elements in After Effects, with transparency and integrate them with elements in Muse. The video, its transparency and other objects work great from Edge to browser preview but not when .oam file is exported and placed into Muse. I know, I wouldn't build an entire site like this, I just want one or two animations to play automatically, with out controls (which I've been able to do), when the page is loaded.
    I publish with business catalyst to a my own domain, with Creative Cloud.
    Attached is a video where I'm at.
    What is the code or method to get to work?

    HI,
    Ok. I know that mov is not supported in Firefox nor Chrome, now.
    When I put the trigger in Edge to play the .mov file, it works when I preview from Edge to Safari, and not in any of the other browsers. This leads me to think that Safari supports .mov files, with and without transparency.
    However, when I try to put the .oam file generated by Edge into Muse and run the page in Safari the video doesn't work. Is this a .mov support with Muse? Does the video need to be uploaded to the Adobe Business Catalyst server? Where I publish my site?
    .mov and transparency aside, I can't get any video to play in any browser from the .oam file placed in Muse. Nothing plays in preview nor when I publish in Muse. I get the previews to work from Edge for the corresponding video for each browser. And yes, when controls in put in it says wether the video is supported or not. But I would want no controls and the video to play automatically on page load. Ideally I would like transparency. But I realize that's a browser support thing.  I don't see why all browsers don't support all video types and WITH transparency. C'mon now it's almost 2014! Am I right or am I right? Ok, sorry.
    I followed everything in this Tom Green video. Pretty sure all my code is correct.
    http://layersmagazine.com/embedding-video-in-adobe-edge-animate.html
    Picture shows code for working .ogv in Edge preview but not from .oam file in Muse in preview nor publish.
    Not sure why it won't even show in preview from Muse. But thinking when I publish, the video must have to be local on the publish server right?
    Am I missing something? Do I need to insert HTML into Muse, not the .oam?

  • JInternalFrame not opening in JAR file, but works when not in JAR

    I have a folder that contains multiple .class files. I make all the class files into one jar file with this command:
    jar cmf mainClass.txt myapplication.jar *.class
    The mainClass.txt contains the following:
    Main-Class: myapplication
    class-path: myapplication.jar
    The myapplication.class opens up a JDesktopPane inside a JFrame. It also contains a start menu, which again has elements that opens up misc JInternalFrames inside the JDesktopPane. The problem is this:
    When I run the application from a .bat file, everything works fine. However, after making the JAR Executable file, everything works except 1 JInternalFrame. Now, the code for this JInternalFrame is far too much to post, so I'll have to ask as follows;
    Are there any reason why a JInternalFrame would not work from inside a JAR Executable, but work when not in the JAR file? Especially when other JInternalFrames are working? What can make 1 JInternalFrame different from the others in this regard?

    Perhaps the problem lies somewhere else.
    Obviously if other JInternalFrames are working then there is a difference in the one missing internal frame that causes it not to show up.
    My guess is that perhaps you are missing one or two classes in your JAR that are used by that JInternalFrame and that an exception is being thrown causing it not to show.
    Double check the contents of your JAR and make sure that all the classes are present and that they are the right versions.

  • Using SharePoint Open with File Exployer - works with Windows 7 but not with 8.1

    I am using a SharePoint site. There is an option to open the site in File Explorer [Open in Explorer] that I can use with Windows 7 computers with no problems.  However, when I try to use in Windows 8.1, I receive an error message telling me to add
    the SharePoint site to my trusted sites even though the site is already a trusted site. I can use this SharePoint command on multiple Windows 7 computers with no problems.  I set the Windows 7 computer next to the Windows 8.1 and used the same
    I/E 11 with the same security settings.  Works for 7 and not for 8.1.

    Hi,
    For your issue, try to do the following:
    Click Start > Run->Enter "services.msc" ->Find the WebClient service and select Restart.
    In Internet Explorer go to Tools > Internet Options > Security->Local intranet->make sure the AcitveX control is enabled.
    Enable Basic authentication on the client computer, by setting the BasicAuthLevel registry entry of the following key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
    For detailed steps, refer to the KB:http://support.microsoft.com/en-us/kb/841215
    Also, here are some troubleshooting articles, you can use as a reference:
    http://blogs.technet.com/b/asiasupp/archive/2011/06/13/error-message-quot-your-client-does-not-support-opening-this-list-with-windows-explorer-quot-when-you-try-to-quot-open-with-explorer-quot-on-a-sharepoint-document-library-in-office-365-site.aspx
    https://support.office.com/en-au/article/Fix-problems-opening-documents-in-SharePoint-libraries-31329fa1-4ad0-47fc-95d8-bb0c5b12a536
    Besides, here is a similar post, you can use as a reference:
    https://social.technet.microsoft.com/Forums/office/en-US/9f03bdb1-d087-4c8e-8cde-8a2e1471e0cf/file-explorer-not-opening?forum=sharepointadmin
    Best Regards,
    Lisa Chen
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Please help i can't share my project I did try in all of them and it doesnt work it apears like that........ The share operation Master File has failed The operation could not be completed because an error occurred when creating frame 608 (error -1). and

    I did try in all of them and it doesnt work it apears like that........
    The share operation Master File has failed
    The operation could not be completed because an error occurred when creating frame 608 (error -1).
    and i dont know what to do plese hlp me....
    Re: when i try to share my project to quicktime aroun 50% appears error -1 and i can't share it what to do please help 

    Double post…

  • How can I save Illustrator CC files onto my external hard drive - Free Agent Go Flex Drive? Nothing works, can't even drag files over. Is the drive not compatible?

    Nothing seems to work, not even dragging files over. Is the drive not compatible? Am working on a new Mac Book, its not a problem on my older IMAC?

    There are two scenarios in which GoFlex drives are supported for use with a Mac. When you connect a GoFlex drive to a Mac, you will be presented with a utility to configure the drive for use. First, if you want to use your GoFlex drive solely with a Mac, the utility will reformat the drive into the HFS+ format, which allows you to use the drive with Time Machine or the included Memeo Premium backup software for Mac. If you would like to be able to "shuttle" data back and forth between a Mac and a PC, a special driver needs to be installed onto the Mac that allows it to access a Windows-formatted drive (i.e. NTFS). Time Machine will not work in this case, nor will Memeo Premium software for Mac. However, if you want your GoFlex solution to also work with TimeMachine, the drive will need to be reformatted to HFS+ journaled.
    source: GoFlex Frequently Asked Questions

  • I just used stellar phoenix mac data recovery and it seemed to work but now my files won't open.  Even though they are "jpeg, mov" files the error message is  could not be opened. The movie's file format isn't recognized. "  Any help or are they corrupted

    I just used stellar phoenix mac data recovery and it seemed to work but now my files won't open.  Even though they are "jpeg, mov" files, the error message is  "could not be opened". The movie's file format isn't recognized. "  Any help or are they corrupted?

    Sounds to me like the file is probably corrupt. If you had hard drive corruption or damage, that could easily result in recovered files not being fully intact. If you were trying to recover accidentally deleted files, it's possible they might have been partially overwritten before recovering. There are never any guarantees with file recovery.
    Without more information on the circumstances that led you to try recovery, it's hard to give advice on what to try from here. You could always try another file recovery tool, like Data Rescue 3. Just be sure you're taking appropriate precautions when doing recovery. See Recovering deleted files.

  • Opening my Photoshop Elements 11 does not work. I always get following message: "Could not open a volume of work, because the file is locked or you do not have the required permissions. Undo the protection of the file on using the command 'Properties' in

    Opening my Photoshop Elements 11 does not work. I always get following message: "Could not open a volume of work, because the file is locked or you do not have the required permissions. Undo the protection of the file on using the command 'Properties' in Windows Explorer." What is wrong? I cannot unterstand what I have to do!

    Could not open a scratch file because the file is locked or you do not have the necessary access privileges. (…) | Mylen…
    Mylenium

  • Can firefox support "file:///" format to access local files (note 3 fw slashes) this works for IE but not firefox and is the format used in the "afghan war diary" from wikileaks

    can firefox support "file:///" format to access local files (note 3 fw slashes) this works for IE but not firefox and is the format used in the "afghan war diary" from wikileaks

    See http://kb.mozillazine.org/Links_to_local_pages_do_not_work

  • I have Photoshop Elements 9. I downloaded the plug in 6.0 and it works on the RAW files from Canon EOS 60D, but not with Canon EOS 70D. I cannot download higher versions of plug in, because I have Windows Vista and it is not supported.

    I have Photoshop Elements 9. I downloaded the plug in 6.0 and it works on the RAW files from Canon EOS 60D, but not with Canon EOS 70D. I cannot download higher versions of plug in, because I have Windows Vista and it is not supported.

    You could try using the DNG converter 8.7 on Windows vista:
    <Adobe - Adobe Camera Raw and DNG Converter : For Windows : Adobe DNG Converter 8.7>
    <Adobe - Adobe Camera Raw and DNG Converter : For Macintosh : Adobe DNG Converter 8.7>
    You then need to watch this video to get hang of it:
    <Camera Raw: How to use Adobe DNG Converter - YouTube>
    Hope this helps.

  • [Photoshop CS5] Optimize to File Size working not correctly.

    ******BUG******
    Concise problem statement: Optimize to File Size working not correctly.
    Steps to reproduce bug:
    1. Open any photo.
    2. Draw a slice
    3. Save For Web, choose Optimize to File Size, type 10KB (Current Slice).
    4. Save "selected slices" only
    Results: File result larger than expect (over 10KB)
    Expected results: <=10KB filesize.
    I uninstalled whole Adobe CS5 Master Collection (Trial) & tried to reproduce the bug in Photoshop CS4, but it was not happened, it's ok on CS4.
    Finally, Windows 7 is not reason, it's a bug of Photoshop CS5. Please fix, I don't want to buy a bugged software.
    I really need the feature "Optimize to File Size" in my works.
    P.S: I tested on 4 PCs, and the results is the same.

    In the SFW dialog change the Metadata dropdown to None

Maybe you are looking for