Results 1 to 2 of 2
  1. #1
    zaniwhoop is offline Member
    Join Date
    Mar 2012
    Posts
    1
    Rep Power
    0

    Default Difference between java v1.5 and v1.6

    Hi

    I'm not really a java programmer, but I am responsible for some code that essentially does some monte carlo analysis. In order to obtain repeatability the random seed is set. Up until now this has worked fine. However, the code has recently been moved to a new server running Java v1.7 and I have found that the repeatability has disappeared. It was previously run on a server using Java v1.5.

    To test what was going on I have compiled and run the code on a PC laptop. If Java v1.5 is installed and the code compiled under that then the results are consistent with the results on the old server. If Java v1.6 is installed on the laptop then the results are consistent with the new server.

    I have checked and the random number sequence is the same on all 3 machines and for v1.5, v1.6 and v1.7.

    My only conclusion so far is that there has been a change in number rounding between v1.5 and v1.6. Either that or there is something in the code that is affected by the changes in garbage collection.

    Does anyone have any ideas what is going on and whether there is a way of fixing this?

    Thanks

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,450
    Rep Power
    19

    Default Re: Difference between java v1.5 and v1.6

    So the randomisation hasn't changed, which is as expected as that is the contract of a seeded Random.
    I doubt garbage collection will have anything to do with it, unless you have timings involved somewhere, but then it would never have been repeatable in the first place.
    You might need to look at the version of 1.5 you have and then work forward through the release notes for versions and patches to see if anything obvious has been changed. It's quite possible the version of 1.5 you are using had a bug in it that was since fixed.

    The other thing is to Debug big time to see if you can trace where the first difference occurs during an execution.
    Please do not ask for code as refusal often offends.

Similar Threads

  1. what is difference between core java and advanced java?
    By haribabu1111 in forum New To Java
    Replies: 1
    Last Post: 12-13-2011, 05:07 AM
  2. Replies: 1
    Last Post: 11-07-2011, 07:55 PM
  3. Difference between Java...
    By AWPtic in forum New To Java
    Replies: 6
    Last Post: 05-06-2009, 04:22 AM
  4. Difference betwen Core Java And J2se?
    By makpandian in forum New To Java
    Replies: 6
    Last Post: 02-28-2009, 06:55 PM
  5. whats the difference between Java core,J2EE......
    By prince24 in forum New To Java
    Replies: 2
    Last Post: 07-11-2007, 06:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •