Too new



  • A new colleague of mine just spent several days getting a simpleish Android application to build on his computer. It builds just fine on everbody else's.

    Turned out the problem was he had too new JDK (1.7) while the Android toolchain only works with 1.6. Despite them saying it needs "1.6 or newer" everywhere.

    The symptoms are that the build spits two warnings (nobody notices warning, especially when moved out of view by lot of useless other chatter that follows in the build):

    [javac] Compiling 3 source files to C:\dev\build\android_ndk-r8b_sdk-r21\project\android\whatever\bin\classes
        [javac] warning: com\company\whatever\Something.class(com\company\whatever:Something.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    
    and a bit later
    [dx] trouble processing:
           [dx] bad class file magic (cafebabe) or version (0033.0000)
           [dx] ...while parsing com/company/whatever/Something.class
           [dx] ...while processing com/company/whatever/Something.class
    

    To be honest the class is compiled to a .jar included in the android project, not by the android build itself. But they don't seem to warn about having to compile for 1.6 and they make something that will certainly be fatal at runtime a warning.



  • Android's SDK has been TRWTF since 1.0 and each new version only made shit worse.



  • @Bulb said:

    The symptoms are that the build spits two warnings
     

    So it informed you....

    @Bulb said:

    (nobody notices warning, especially when moved out of view by lot of useless other chatter that follows in the build):

    .. but rather than capture this information and use it for diagnosis, it was overlooked because of the sheer volume of other information that.. well, could have been useful.

    "why didn't you tell me?"

    "I did tell you!"

    "yes, but since you were telling me loads of other things I didn't listen!"

    Snarkasm aside, I know what you mean about the value of useful information being camouflaged by debris. Is there some way to tune down verbosity? Either way, that message should have been of higher severity.

    And Java isn't in my good books at the moment. The Updater informed me of a newer version available, so I let it download and update... except it updated the JRE and ignored the JDK, so I had two different versions of the JRE: one that is installed into C:\Program Files\Java\jre and one that's installed into C:\Program Files\Java\JDK\jre [1].

    TRWTF? Both JREs were installed by the JDK originally:

    • The JDK comes with its own JRE that it puts in java\jdk\jre
    • the JDK, part-way through, insists that the JRE is a dependency that it'd like to install, and delegates this task out to the JRE installer - which installs to java\jre 
    • Some applications ask JAVA_HOME and see the JDK version, others have a registry entry or config setting that ignores environment variables[2] and points to the location determined by the JRE installer
    • The JRE installer somehow modifies these reg settings when upgrading the JRE, leaving some applications unaware that there's a newer version.
    • The updater pretty much does an install of the newer JRE then overwrites the registry entries to reflect the version number. It leaves the older JRE behind, warts and all - no offer to uninstall this cruft, no offer to overwrite older files with newer to perform a delta-update[3]. But then complains when you try to delete the older directory.
    [1] So Java can cope with spaces in file paths. Are you listening, Oracle?

    [2] SQL Developer, I'm looking at you. Are you listening, ORACLE?

    [3] A complete uninstall followed by CCleaner to decrapify the registry then scrub the folder structure clean of Java taint is the only surefire way of nuking any contamination of Java before a clean install of the JDK can proceed. ARE YOU LISTENING, ORACLE?



  • @Cassidy said:

    decrapify
    I have been writing a proposal to cleanse our production database of assorted test data that's been dumped there over the years. This is exactly the word I need...

    Thank you!

     


  • Discourse touched me in a no-no place

    @Bulb said:

    A new colleague of mine just spent several days getting a simpleish Android application to build on his computer. It builds just fine on everbody else's.

    Turned out the problem was he had too new JDK (1.7) while the Android toolchain only works with 1.6. Despite them saying it needs "1.6 or newer" everywhere.

    The symptoms are that the build spits two warnings (nobody notices warning, especially when moved out of view by lot of useless other chatter that follows in the build):

    [javac] Compiling 3 source files to C:\dev\build\android_ndk-r8b_sdk-r21\project\android\whatever\bin\classes
        [javac] warning: com\company\whatever\Something.class(com\company\whatever:Something.class): major version 51 is newer than 50, the highest major version supported by this compiler.
    

    That's the nice thing about turning on all errors and warnings, and also setting the "treat warnings as errors" flag. (For example, in VC++, /W4 /Wall /WX.  I'm not sure if you can actually do that in Java).  Sometimes this leads to the kind of silliness you used to see with programs that have been linted, like "(void) printf(...);" but it would have caused you to notice the warning.  Of course it would help if that particular warning's text was changed to "Find me an older compiler!" because you'd see it easier.

     

    ETA:  javac -Werror and maybe -Xlint:{all} if you're feeling masochistic.



  • I just have ask:

    Why are you using javac instead of the eclipse android development environment? The ability to auto complete on all properties in .xml files alone are worth it :}

     



  • I think cruft would be perfectly cromulent, as well.



  • @mt@ilovefactory.com said:

    Why are you using javac instead of the eclipse android development environment?
     

    Doesn't that - ultimately - invoke javac anyway?



  • @MiffTheFox said:

    Android's SDK has been TRWTF since 1.0 and each new version only made shit worse.

    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c: \Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."



  • @Cassidy said:

    Are you listening, Oracle?
    @Cassidy said:
    Are you listening, ORACLE?
    @Cassidy said:
    ARE YOU LISTENING, ORACLE?

    Oracle gives just as much a shit as Sun did before them.

    That is, none. None shit.



  • @Cassidy said:

    @mt@ilovefactory.com said:

    Why are you using javac instead of the eclipse android development environment?
     

    Doesn't that - ultimately - invoke javac anyway?

     

    Nope. Eclipse got its own compiler.

    And just as important: The Android plugin for eclipse, know that it's an error to generate code for the java 1.7 format, so it will reject doing it even if you try to set the output format explicit. 

     



  • @bridget99 said:

    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c:\Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    Even in c:\misc\android, I get stuff like a blank VM in the emulator having apps like the launcher FC. Not to mention it runs as slow as fuck on a quad core machine with 10 GB ram.



  • @blakeyrat said:

    Oracle gives just as much a shit as Sun did before them.
     

    I know.... I can but fantasise.

    Buncha nose-candy mile-highing smug cunts. The lot of them.



  • @mt@ilovefactory.com said:

    Nope. Eclipse got its own compiler.
     

    Ain't Eclipse written in Java anyway? Very meta.@mt@ilovefactory.com said:

    And just as important: The Android plugin for eclipse, know that it's an error to generate code for the java 1.7 format

    So what does Eclipse know that the official docs ("1.6 or newer") doesn't?

     



  • @snoofle said:

    This is exactly the word I need...

    If you were previously unaware of "decrapify", does that mean you were also previously unware of PC Decrapifier?

    Great tool and friend of new laptop owners everywhere.



  • @flabdablet said:

    Decrapifier
     

    Surely that's pronounced in French?

     

    Oui, c'est le decrapifier



  • @MiffTheFox said:

    @bridget99 said:
    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c:\Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    Even in c:\misc\android, I get stuff like a blank VM in the emulator having apps like the launcher FC. Not to mention it runs as slow as fuck on a quad core machine with 10 GB ram.

    Yeah, the emulator is slow as hell and you do have to figure out the interplay between it and the IDE. It behaves predictably, in my experience, once you've accepted the fact that it really will take 90+ seconds to do certain things, particularly when you first open it. Sometimes you'll need to swipe the emulator screen to unlock it (no different from a real Android device). I figured this crap out on day one, which is more than I can say about a lot of other technologies. If you do connect a real Android device, the Eclipse development and debugging experience is faster and much more seamless.

    Once you throw "C" into the mix, the experience gets a bit more disjointed (you have to run a little compile step in a Command Prompt window). But at that point, such things don't surprise me. We're not exactly talking about Lego Mindstorm here.

    I did a lot of Eclipse / Android stuff at one time, mostly just for my own amusement; I think that says something about the usability of this development platform. No one was making me use it. 

    Before I rage-quit CodeProject.com, I actually won an award for one of my Android programs... I think it was "Best Mobile Article of May 2012," though I could be wrong on the month.



  • @MiffTheFox said:

    @bridget99 said:
    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c:\Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    Even in c:\misc\android, I get stuff like a blank VM in the emulator having apps like the launcher FC. Not to mention it runs as slow as fuck on a quad core machine with 10 GB ram.

     

    The speed problem is easy to fix: Use the atom android image instead of the arm image when creating the emulator. Then you can boot from "no emulator started", to running app in 13 seconds (Unless you need to test arm native code). Tested on my Intel Core i5-2500K(3.30GHz)

     



  • @Cassidy said:

    @mt@ilovefactory.com said:

    Nope. Eclipse got its own compiler.
     

    Ain't Eclipse written in Java anyway? Very meta.@mt@ilovefactory.com said:

    And just as important: The Android plugin for eclipse, know that it's an error to generate code for the java 1.7 format

    So what does Eclipse know that the official docs ("1.6 or newer") doesn't?

     

     

    What docs would that be? The android emulator and development environment runs on "1.6 or newer" But when generating code for use on android devices, only java up to 1.6 is supported. 

     


  • Discourse touched me in a no-no place

    @Cassidy said:

    Ain't Eclipse written in Java anyway?
    Mostly. A minority of parts (the GUI components) are in C++ instead just to add whole extra layers of “fun”. The compiler engine is in the pure Java majority.



  • @mt@ilovefactory.com said:

    But when generating code for use on android devices, only java up to 1.6 is supported. 
     

    Meh. I interpreted Bulb's post wrongly. I got the impression the compiled code would run on 1.7.



  • @flabdablet said:

    If you were previously unaware of "decrapify", does that mean you were also previously unware of PC Decrapifier?

    Great tool and friend of new laptop owners everywhere.

    Should take a note of that for next time I need to clean up a OEM Windows installation. Since it still has crap in the name, I'd assume that it actually works, unlike crap cleaner.



  • @MiffTheFox said:

    Should take a note of that for next time I need to clean up a OEM Windows installation.
     

    I've used it in the past, amongst other utilities. I also run CCleaner.



  • @Cassidy said:

    I've used it in the past, amongst other utilities. I also run CCleaner.

    That's what I was implying earlier that it was better when it was called Crap Cleaner, though I never used it when it was called such. The first time I used it I thought I had downloaded scamware by mistake, since it was billing itself as a registry cleaner.


  • Discourse touched me in a no-no place

    @bridget99 said:

    @MiffTheFox said:

    Android's SDK has been TRWTF since 1.0 and each new version only made shit worse.

    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c: \Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    If only Unix filesystems supported spaces in file names since the 80s. Oh, wait!


  • Discourse touched me in a no-no place

    @blakeyrat said:

    @Cassidy said:
    Are you listening, Oracle?
    @Cassidy said:
    Are you listening, ORACLE?
    @Cassidy said:
    ARE YOU LISTENING, ORACLE?

    Oracle gives just as much a shit as Sun did before them.

    That is, none. None shit.

    Not true--they managed to shit their own logo all over the installer. By installing Java, you will be able to experience the power of Java! Java Java Java Java Java Java Java Java Java Java Java Java!!!1!!two (Say in the voice of that dog from the Beggin' Strips commercial: http://www.youtube.com/watch?feature=player_detailpage&v=CErapf79rqM#t=8s)



  • @mt@ilovefactory.com said:

    "1.6 or newer"
    You see this all the time with software. "Runs on version X or later", which seems to be based on the bizaare assumption that future versions will never introduce new bugs changes that are incompatible with previous versions.



  • @FrostCat said:

    @bridget99 said:
    @MiffTheFox said:

    Android's SDK has been TRWTF since 1.0 and each new version only made shit worse.

    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c: \Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    If only Unix filesystems supported spaces in file names since the 80s. Oh, wait!

    It's not the OS I'm worried about... it's all the other programs, scripts, etc. written around it by people who gravitate toward three-letter lowercase names. But you're probably right. If you want to bastardize your *nix, FOSS programs by shoving them into C:\Program Files, everything should work. Personally, though, it sounds pretty dubious to me.



  • @FrostCat said:

    @bridget99 said:
    @MiffTheFox said:

    Android's SDK has been TRWTF since 1.0 and each new version only made shit worse.

    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c: \Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    If only Unix filesystems supported spaces in file names since the 80s. Oh, wait!

    If only Unix shells made random guesses about which spaces were word separators and which spaces were part of paths like cmd.exe and CreateProcess.  Oh, wait!



  • Discourse touched me in a no-no place

    @DaveK said:

    @FrostCat said:

    @bridget99 said:
    @MiffTheFox said:

    Android's SDK has been TRWTF since 1.0 and each new version only made shit worse.

    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c: \Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    If only Unix filesystems supported spaces in file names since the 80s. Oh, wait!

    If only Unix shells made random guesses about which spaces were word separators and which spaces were part of paths like cmd.exe and CreateProcess.  Oh, wait!


    If only...oh, wait, now you're just trolling.

    Unix has always[1] had a way to tell the shell spaces aren't argument separators; it's called quoting. Windows has supported the same thing since it allowed spaces in filenames. Guess what, CreateProcess at all have ways to do the same thing, as you would know if you spent three seconds searching: http://stackoverflow.com/questions/4053241/windows-api-createprocess-path-with-space



  • @FrostCat said:

    @DaveK said:

    @FrostCat said:

    @bridget99 said:
    @MiffTheFox said:

    Android's SDK has been TRWTF since 1.0 and each new version only made shit worse.

    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c: \Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    If only Unix filesystems supported spaces in file names since the 80s. Oh, wait!

    If only Unix shells made random guesses about which spaces were word separators and which spaces were part of paths like cmd.exe and CreateProcess.  Oh, wait!


    If only...oh, wait, now you're just trolling.

    Unix has always[1] had a way to tell the shell spaces aren't argument separators; it's called quoting. Windows has supported the same thing since it allowed spaces in filenames. Guess what, CreateProcess at all have ways to do the same thing, as you would know if you spent three seconds searching: http://stackoverflow.com/questions/4053241/windows-api-createprocess-path-with-space


    I think he meant that CMD.EXE makes guesses about space significance. That's been my observation as well, e.g. "cd Program Files" looks like it needs quotes, but CMD.EXE will actually guess its way to the correct outcome if you type that in.


  • Considered Harmful

    @bridget99 said:

    @FrostCat said:
    @DaveK said:

    @FrostCat said:

    @bridget99 said:
    @MiffTheFox said:

    Android's SDK has been TRWTF since 1.0 and each new version only made shit worse.

    I've never had much trouble getting it to do what I want. Then again, I'm not the sort of person who has to have the latest version of everything, nor do I attempt stubborn, pointless crap like trying to install open source shit under "c: \Program Files." A lot of that stuff doesn't work too well if you're not willing to "go with the flow."

    If only Unix filesystems supported spaces in file names since the 80s. Oh, wait!

    If only Unix shells made random guesses about which spaces were word separators and which spaces were part of paths like cmd.exe and CreateProcess.  Oh, wait!


    If only...oh, wait, now you're just trolling.

    Unix has always[1] had a way to tell the shell spaces aren't argument separators; it's called quoting. Windows has supported the same thing since it allowed spaces in filenames. Guess what, CreateProcess at all have ways to do the same thing, as you would know if you spent three seconds searching: http://stackoverflow.com/questions/4053241/windows-api-createprocess-path-with-space


    I think he meant that CMD.EXE makes guesses about space significance. That's been my observation as well, e.g. "cd Program Files" looks like it needs quotes, but CMD.EXE will actually guess its way to the correct outcome if you type that in.

    Apparently having a file C:\Program.exe causes all kinds of trouble. This raises the question to me, why does it guess from left to right instead of from right to left? I would expect "C:\Program Files\Foo Bar\Baz.exe" to have precedence over "C:\Program Files\Foo.exe" and "C:\Program.exe", but the opposite is true in practice.



  • @mt@ilovefactory.com said:

    Why are you using javac instead of the eclipse android development environment?

    Since when can the eclipse android development environment build on a continuous integration server?

    The project is a C++ one and the .jar in question is a generic Java binding used on multiple platforms. So it has absolutely nothing android-specific about it and consequently isn't built by the android toolchain. The test application is finally put together by the Android ant-based build since as mentioned above it has to run on continuous integration server. @mt@ilovefactory.com said:

    @Cassidy said:

    Doesn't that - ultimately - invoke javac anyway?

     

    Nope. Eclipse got its own compiler.

    Indeed. Eclipse can compile even without having JDK installed at all! And it's a WTF if you ask me, because it generally means that the developers build differently than the continuous integration server. @mt@ilovefactory.com said:

    And just as important: The Android plugin for eclipse, know that it's an error to generate code for the java 1.7 format, so it will reject doing it even if you try to set the output format explicit.
    Yes, it does. I did mention it, didn't I? That does not help with general libraries linked to the project.


  • @El_Heffe said:

    @mt@ilovefactory.com said:
    "1.6 or newer"
    You see this all the time with software. "Runs on version X or later", which seems to be based on the bizaare assumption that future versions will never introduce new bugs changes that are incompatible with previous versions.
    On the other hand, you have things like Firefox plugins that "break" every time FF is updated - despite the fact that they would run just fine, and it's just the new version number that now falls out of the range that the plugin author specified in the plugin's RDF file (no, that's not redundant, the F stands for "Framework", not "File")

     


  • Discourse touched me in a no-no place

    @Anonymouse said:

    On the other hand, you have things like Firefox plugins that "break" every time FF is updated - despite the fact that they would run just fine, and it's just the new version number that now falls out of the range that the plugin author specified in the plugin's RDF file
    Running 22.0 here - and the only plugin I ever had any problems with was Unplug - all the others I use run fine.



  • @Anonymouse said:

    Firefox plugins that "break" every time FF is updated
     

    When was the last time this happened to you?



  • @PJH said:

    Running 22.0 here
     

    Howcome you're three versions into the future?


  • Discourse touched me in a no-no place

    @dhromed said:

    @PJH said:

    Running 22.0 here
     

    Howcome you're three versions into the future?

    Because I'm running Nightly.



  • @PJH said:

    Because I'm running Nightly.
     

    Jogging at dusk?

    I've heard about people like you.



  • @PJH said:

    Because I'm running Nightly.

    That explains it, Nightly overrides the plugin version check.


  • Discourse touched me in a no-no place

    @MiffTheFox said:

    @PJH said:
    Because I'm running Nightly.

    That explains it, Nightly overrides the plugin version check.

    Really? Sure I stopped using Unplug because of version number issues... Was a while ago though.

  • Discourse touched me in a no-no place

    @joe.edwards said:

    Apparently having a file C:\Program.exe causes all kinds of trouble. This raises the question to me, why does it guess from left to right instead of from right to left? I would expect "C:\Program Files\Foo Bar\Baz.exe" to have precedence over "C:\Program Files\Foo.exe" and "C:\Program.exe", but the opposite is true in practice.

    Ok, point taken, but why would anyone put a a file in c:\ anyway?



  • @FrostCat said:

    @joe.edwards said:

    Apparently having a file C:\Program.exe causes all kinds of trouble. This raises the question to me, why does it guess from left to right instead of from right to left? I would expect "C:\Program Files\Foo Bar\Baz.exe" to have precedence over "C:\Program Files\Foo.exe" and "C:\Program.exe", but the opposite is true in practice.

    Ok, point taken, but why would anyone put a a file in c:\ anyway?

     

    Because of old programs that don't really understand this whole "directories" thing.  The reason for why it goes left to right is that it allows old programs and bat files written from before spaces were common in file/folder names to keep working. 

     



  • @dhromed said:

    @Anonymouse said:
    Firefox plugins that "break" every time FF is updated
    When was the last time this happened to you?
    Had it happen all the time with the GWT Dev Mode plugin. It's gotten better, but I don't know if that's because they changed their deployment descriptors to take into account future versions, or because the GWT team at Google has gotten quicker in following Mozillas update cycle...

     


  • Discourse touched me in a no-no place

    @DescentJS said:

    @FrostCat said:

    @joe.edwards said:

    Apparently having a file C:\Program.exe causes all kinds of trouble. This raises the question to me, why does it guess from left to right instead of from right to left? I would expect "C:\Program Files\Foo Bar\Baz.exe" to have precedence over "C:\Program Files\Foo.exe" and "C:\Program.exe", but the opposite is true in practice.

    Ok, point taken, but why would anyone put a a file in c:\ anyway?

     

    Because of old programs that don't really understand this whole "directories" thing.  The reason for why it goes left to right is that it allows old programs and bat files written from before spaces were common in file/folder names to keep working. 

     

     

    No, I understand why it happens, but I am asserting that in this day and age it shouldn't be happening.  Don't put programs in c:--that's DOS behavior.

     Even if you want to say "but some programs don't understand spaces in directories" then fine, use subdirectories, where were added in DOS 2.  If you absolutely have to have this behavior, then use some kind of VM, even if it's Dosbox.



  • @FrostCat said:

    No, I understand why it happens, but I am asserting that in this day and age it shouldn't be happening.

    Of course it shouldn't be happening. Fucking duh.

    The problem is that it *does* happen regardless, and when it does Microsoft looks a bit smarter if things still work than they do if things break unexpectedly for the user.



  • @DescentJS said:

    The reason for why it goes left to right is that it allows old programs and bat files written from before spaces were common in file/folder names to keep working. 
    That makes sense -- if it was still 1995.  Spaces in file and directory names have been common (in Windows) for 18 years.  If you are using software older than that, or even worse, writing software today that can't handle spaces, you are TRWTF Moron Of The Day.



  • @blakeyrat said:

    @FrostCat said:
    No, I understand why it happens, but I am asserting that in this day and age it shouldn't be happening.

    Of course it shouldn't be happening. Fucking duh.

    The problem is that it *does* happen regardless, and when it does Microsoft looks a bit smarter if things still work than they do if things break unexpectedly for the user.

    Micorosft shouldn't have to fix other people's broken shit.  I'm pretty sure even you have said that at least once.

     



  • @El_Heffe said:

    Micorosft shouldn't have to fix other people's broken shit. I'm pretty sure even you have said that at least once.

    Well derp. Of course they shouldn't have to. But they still have to.

    ... do you guys not know what the word "should" actually means or...?


  • Trolleybus Mechanic

    @blakeyrat said:

    @El_Heffe said:
    Micorosft shouldn't have to fix other people's broken shit. I'm pretty sure even you have said that at least once.

    Well derp. Of course they shouldn't have to. But they still have to.

    ... do you guys not know what the word "should" actually means or...?

     

     Last one for today. I promise:

    [IMG]http://i.imgur.com/gRE6YB1.png[/IMG]

     


Log in to reply