Page 1 of 5 1 2 3 ... LastLast
Results 1 to 10 of 47

Thread: regarding Java 7

  1. #1
    Developer roippi's Avatar
    Join Date
    Aug 2010
    Posts
    2,663

    Default regarding Java 7

    A number of users are starting to upgrade to Java 7, as it's the highest version offered by Oracle, and higher numbers always mean better, right? Unfortunately, not in this case.

    As of this writing, the official recommendation from the developers of KoLMafia is to use Java 6. Users who wish to use Java 7 should do so at their own risk, with the full understanding that Mafia is not developed under Java 7. Think of it as running an "experimental" branch of code - if you are not a technically savvy enough person to be doing that, you should be using the far less buggy Java 6. In fact, I consider myself fairly technically savvy, and I use Java 6. 7 is just not ready for widespread use right now. And if you're worried about losing any cool features by downgrading - I can promise that you won't.

    The most important point to take home: before reporting bugs in this forum, confirm that the bug exists under Java 5 or 6.* If it doesn't, well, it's a Java bug!

    *in rare cases, java 7 may uncover buggy behavior that was escaping notice under java 6; but again, you need to be a sufficiently technically savvy person to know when this applies.

  2. #2

    Default

    There are quite a few Java 7-only bugs that have yet to be fixed, some of them specific to the new OS X port Oracle is maintaining. For example: If you run KoLmafia with Java 7 and navigate to the Daily Deeds panel, you may find truncated buttons. This one's already been reported here and found to be a Java bug, not a KoLmafia bug. Another example is the DnD (Drag and Drop) regression/bug in Java 7. The key takeaway: Users beware!

  3. #3

    Default

    Good news: the truncated buttons bug and drag/drop bug mentioned in my previous post have both been fixed in 7u6 (7u7 has been released since then to fix a security flaw).

  4. #4
    Developer
    Join Date
    Aug 2009
    Posts
    2,709

    Default

    Are there any other outstanding issues with (mafia and) Java 7, or can we go ahead and declare that it's now safe to upgrade? I've been mainly using Java 7 for now, and aside from window manager patches (to get Swing and focus to work properly with a non-reparenting window manager under Java 7), I haven't really run into anything else.

  5. #5

    Default

    Unfortunately, this is NOT yet the case. See this bug: http://kolmafia.us/showthread.php?11...-not-be-loaded

    This is caused by a problem within Java, specific to Java 7 (tested in Java 6, doesn't occur there). The good news is that the most annoying of the bugs in Java 7 HAVE been fixed now.

  6. #6
    Senior Member AlbinoRhino's Avatar
    Join Date
    May 2008
    Posts
    707

    Default

    I had been using Java 7 without any mafia issues for quite some time. The other day I updated to Java 7 update 7 (from Java 7 update 6). I started experiencing a strange issue where mafia would just stop for up to about 30 seconds and then continue. I couldn't figure out any definite pattern to the pauses. Sometimes it would happen when my afteradventure script was running, sometimes mid-fight, sometimes during restoration. Other than these strange delays everything worked fine. Just strange pauses and then mafia would continue as normal. Since I had finally run into an issue with Java 7, I downgraded to Java 6 update 35 (rather than back to 7u6) and the issue disappeared. This was with Windows 7 x64 and 32 bit Java.

  7. #7
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,738

    Default

    Are there any other outstanding issues with (mafia and) Java 7, or can we go ahead and declare that it's now safe to upgrade? I've been mainly using Java 7 for now, and aside from window manager patches (to get Swing and focus to work properly with a non-reparenting window manager under Java 7), I haven't really run into anything else.
    Originally Posted by heeheehee View Post
    Since mafia is coded to work with Java 1.5, not Java 1.7, the time when it's safe to tell people to update to Java 1.7 and not have any issues is when mafia is coded to work with Java 1.7... right? I mean, we're dealing with two mafia iterations of changes... really 3, since mafia was coded for Java 1.4 and while awesome work has been done in the process of breaking 1.4 compatibility, not everything has been changed to 1.5 best practice.

    Yet.

  8. #8
    Developer
    Join Date
    Aug 2009
    Posts
    2,709

    Default

    Unfortunately, this is NOT yet the case. See this bug: http://kolmafia.us/showthread.php?11...-not-be-loaded

    This is caused by a problem within Java, specific to Java 7 (tested in Java 6, doesn't occur there). The good news is that the most annoying of the bugs in Java 7 HAVE been fixed now.
    Originally Posted by wrldwzrd89 View Post
    Ah right, I forgot about that thread. I can't seem to reproduce, though, but it could be OpenJDK (java version "1.7.0_b147-icedtea") not having this particular bug.

    Since mafia is coded to work with Java 1.5, not Java 1.7, the time when it's safe to tell people to update to Java 1.7 and not have any issues is when mafia is coded to work with Java 1.7... right? I mean, we're dealing with two mafia iterations of changes... really 3, since mafia was coded for Java 1.4 and while awesome work has been done in the process of breaking 1.4 compatibility, not everything has been changed to 1.5 best practice.

    Yet.
    Originally Posted by Theraze View Post
    If that were the case, then we wouldn't be telling people to use Java 6, no?

  9. #9
    Senior Member
    Join Date
    Jul 2007
    Posts
    1,193

    Default

    If that were the case, then we wouldn't be telling people to use Java 6, no?
    Originally Posted by heeheehee View Post
    Java is supposed to be somewhat backwards compatible, if you compile with your javac target set to 1.5 it should be compiling 1.5 compatible class files, even if you use Java 7. This is what "1.5 compliant" means when we talk about KoLmafia. When we're programming KoLmafia we should be referring to components in the 1.5 API, not 6 or 7. I am actually really looking forward to moving to Java 6 compatibility because there's a few new libraries in the API we can use to get rid of some really yucky legacy code lying around, but until then we can't use libraries that are not available in earlier versions of Java.

    Some of the problems people see when using Java 7 are related to new exceptions that are only being thrown now whereas earlier versions of the JRE would ignore them. Other problems are just plain bugs with Java 7.

    There's a lot of bad flak Java 7 is getting, certainly some of the earlier versions were severely buggy and dangerous to be using (security flaws everywhere), but a lot of it is simply related to unexpected behaviours occurring due to the use of old or deprecated elements of the API.

    Java 6 has been around for 6 years now and they're still finding bugs with it, but a lot of them have been ironed out over the years and it's pretty stable for use in running classes targeting 1.5.

    Java 7 is only a little over a year old, a lot of issues still persist but it's actually pretty good for the most part.

    What people need to remember is that a lot of stuff in KoLmafia is fairly legacy code, it was originally written for 1.4 which is now 10 years old. A chunk of stuff has been migrated to 1.5 best practices, but the efforts are still ongoing. 1.5 is 8 years old and it's no surprise that JRE 6, having been maintained for over 6 years, runs 1.5 classes pretty well.

    I guess what Theraze is trying to say is that given KoLmafia is a bit behind the curve when it comes to the latest Java revisions, people shouldn't expect full compatibility with Java 7 in too much of a hurry.
    Last edited by Catch-22; 09-13-2012 at 03:57 AM.
    Procrastination
    Leaves many things unfinished

    Originally Posted by /haiku

  10. #10
    Senior Member Theraze's Avatar
    Join Date
    Mar 2010
    Posts
    8,738

    Default

    Yeah... don't expect Java 1.7 to do as well as Java 1.6's current backwards compat level for four years or so.

    If you want the most solid mafia experience, yes... by all means, use Java 1.5. You might notice some web-blips from things that aren't coded to your level anymore.
    If you want a good mafia experience while not noticing anything missing in the web, use Java 1.6.
    If you want an exciting mafia experience while noticing weird issues with the web you've never seen before, and love searching for other people you've never talked to who have your same exact issue in something else despite it not happening on any other computer you've tried or for anyone else you've seen IRL, use Java 1.7.

Similar Threads

  1. Bug - Fixed java.lang.Integer cannot be cast to java.lang.String during Uneffect
    By fronobulax in forum Bug Reports
    Replies: 3
    Last Post: 03-05-2015, 02:11 PM
  2. Replies: 0
    Last Post: 01-05-2015, 04:41 PM
  3. Replies: 0
    Last Post: 11-14-2013, 10:21 PM
  4. Replies: 0
    Last Post: 11-02-2012, 01:00 AM
  5. Kol mafia and java jdk
    By Paragon in forum Community Support
    Replies: 1
    Last Post: 11-20-2011, 11:43 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
  •