More Java installer crap



  • Well, I guess I should be pleased that we're not being forced to install the ask.com crapware.

    Now we get the opportunity to slow our machines to a crawl by installing Mcafee crapware;

    (by the way, that magnificent job of overlaying white background labels on top of a grey dialog is Oracle's all the way - it's not an artefact of the screen-grab)

    And just when you thought you were out of the woods by unticking the "No, I don't want shitty Mcafee, when I install Java" box, the installer helpfully points out that you must close the following zero applications;

    How much money does Oracle make? Why do they have to be sponsored by the likes of ask.com and Mcafee? Why do they need to prostitute themselves? Why do they need to employ chimpanzees as installer developers?



  •  they likely haven't touched the installer since 1.1 or something



  • @skotl said:

    (by the way, that magnificent job of overlaying white background labels on top of a grey dialog is Oracle's all the way - it's not an artefact of the screen-grab)

    It looks like you have your DPI set larger than normal. It's amazing how many companies don't bother testing for that. Or do it in a half-assed way (like Chrome's "we only do 100% or 200% DPI, so if you set it to 150% we'll make it fucking huge!"*) Or go out of their way to break it entirely, like Steam used to do. (You still can't fucking change the font size in Steam IM windows!!!!! It's been a DECADE NOW!)

    😉 To be fair to Chrome, they did fix it in a reasonable amount of time once 13" 1080p laptops like mine hit the market. It still brings out the, "you mean you didn't have DPI scaling at all from fucking version ONE!?!?!" shock and surprise, though. Do people writing software even USE computers? How could you be a web browser programmer and not know that the DPI can change? Fuck, CSS pretty much RELIES on that! /rant

    @skotl said:

    Why do they need to prostitute themselves?

    The only people who would possibly take a job at Oracle are people interested only in money. That's true for me, you, and everybody you know, right? If Oracle wanted to hire me, it'd require at least a 33% raise over what I'm currently making. At least.

    So take that to its logical conclusion: why does Oracle need to prostitute themselves? Because they're nothing but prostitutes. It's what they do.



  • Rule one with java, always get the installer from this page <a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html>get the installer from this page.

    (by the way, that magnificent job of overlaying white background labels on top of a grey dialog is Oracle's all the way - it's not an artefact of the screen-grab) It looks like you have your DPI set larger than normal. It's amazing how many companies don't bother testing for that. Or do it in a half-assed way (like Chrome's "we only do 100% or 200% DPI, so if you set it to 150% we'll make it fucking huge!"*) Or go out of their way to break it entirely, like Steam used to do. (You still can't fucking change the font size in Steam IM windows!!!!! It's been a DECADE NOW!) 😉 To be fair to Chrome, they did fix it in a reasonable amount of time once 13" 1080p laptops like mine hit the market. It still brings out the, "you mean you didn't have DPI scaling at all from fucking version ONE!?!?!" shock and surprise, though. Do people writing software even USE computers? How could you be a web browser programmer and not know that the DPI can change? Fuck, CSS pretty much RELIES on that! /rant

    I cannot agree more with this rant with the addition of buttons and options getting cut off because my DPI is at 125%.



  •  There is a registry setting (that I got from here, BTW) that eliminates the crapware installs for Java (there is not, so far as I can tell, one for Flash).

    Far more annoying is that since upate 51, they've changed the default security settings such that Oracle's own "verify Java" page on java.com doesn't work right any more.

    It's like they're deliberately trying to kill Java or something. I wish them well in that. 



  • What I find annoying is the silent install option pretty much looks for any excuse to fail. As part of our software deployment we need Java installed, so the Management program has it added as a program entry. Fair enough. It installs it silently- and it has to pass a capitalized /S rather than the lowercase /s that every other installer in the database takes so yay special case logic. Then... the Java installer fails for whatever reason it decides.

     A corrupted installation actually prevents a silent install, since the installer exits with exit code 1602, and working around it required finding and deleting specific registry keys for the version trying to be installed.

     Naturally they could have done something sane and just- I don't know, just installed and allowed people trying to deploy Java to install it silently to fix corrupted installations.

     Another favourite is  that their 32-bit stub executable apparently fails if run silently on 64-bit systems, so if you want to hae that work you need to actually dig into the Temp directory and find the extracted MSI (because thankfully the stub executable decides not to delete it when it exits for no reason) and run it manually, including a seemingly arbitrary set of arguments... and this time make sure to include a lowercase /s switch...

     

     


  • Discourse touched me in a no-no place

    @blakeyrat said:

    DPI scaling
    Lots of apps are still completely fucked on that front. What's more fun is when they get it almost right, except the font metrics are not proportionate at the different scaling factors; what works on one display fails on another. I still have no idea how that could end up wrong like that. (Indeed, if I drag the app instance from one display to another it recalculates and you can see all the letters shift subtly. “Lovely.”)

    Hit that the other day when it got so bad that it caused the last letter of a label to get chopped off, changing the meaning substantially (and amusingly at the time, in a way that was very app specific).



  • @BC_Programmer said:

    What I find annoying is the silent install option pretty much looks for any excuse to fail. As part of our software deployment we need Java installed, so the Management program has it added as a program entry. Fair enough. It installs it silently- and it has to pass a capitalized /S rather than the lowercase /s that every other installer in the database takes so yay special case logic. Then... the Java installer fails for whatever reason it decides.

     A corrupted installation actually prevents a silent install, since the installer exits with exit code 1602, and working around it required finding and deleting specific registry keys for the version trying to be installed.

     Naturally they could have done something sane and just- I don't know, just installed and allowed people trying to deploy Java to install it silently to fix corrupted installations.

     Another favourite is  that their 32-bit stub executable apparently fails if run silently on 64-bit systems, so if you want to hae that work you need to actually dig into the Temp directory and find the extracted MSI (because thankfully the stub executable decides not to delete it when it exits for no reason) and run it manually, including a seemingly arbitrary set of arguments... and this time make sure to include a lowercase /s switch...

     

     

    Previously.

    I've since improved the forced Java uninstallation routine I was using when I posted that. My current snippet for that goes:

    title Uninstalling Java runtime environment %jreMin%...
    net stop "Java Quick Starter"
    taskkill /f /im jusched.exe
    if %jreMin%==6 set filter="^Java\(TM\) 6 |^J2SE Runtime "
    if %jreMin%==7 set filter="^Java 7 "
    for /f "tokens=2" %%G in ('%msiinfo% %filter%') do %msiexec% /x %%G
    for /f "tokens=1-3* delims=	" %%F in ('%msiinfo% %filter%') do @(
    	echo %%I
    	reg delete "HKCR\Installer\Products\%%F" /f
    	reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Installer\UserData\S-1-5-18\Products\%%F" /f
    	reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\%%G" /f
    	reg delete "HKLM\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\%%G" /f
    	%del% "%%H"
    )
    %rmdir% "%bin32%\Java\jre1.*" "%bin32%\Java\jre%jreMin%" "%bin%\Java\jre1.*" "%bin%\Java\jre%jreMin%"

    Before reaching that, you need to have a few environment variables set up:

    set bin=%ProgramFiles%
    if "%PROCESSOR_ARCHITECTURE%" == "AMD64" (
    	set "bin32=%ProgramFiles(x86)%"
    ) else (
    	set "bin32=%bin%"
    )
    set return=goto :eof
    set rmdir=@call :rmdir
    set run=start "Waiting..." /wait
    set msiexec=%run% msiexec /passive /norestart
    set msiinfo=cscript /nologo "%bin%\flabdablet\msi-info.js"
    set jreMin=7 or 6 (6 also kills 1.5, if that's still hanging about)

    Somewhere in the same batch script there needs to be a :rmdir subroutine:

    :rmdir
    @for /D %%D in (%*) do if exist "%%~D" rmdir /s /q "%%~D"
    @%return%

    And you also need to have msi-info.js available. If you don't want to stick that under %ProgramFiles% you might want to package it together with the Java removal script as a polyglot.



  • @delta534 said:

    Rule one with java, always get the installer from this page get the installer from this page.

    (by the way, that magnificent job of overlaying white background labels on top of a grey dialog is Oracle's all the way - it's not an artefact of the screen-grab) It looks like you have your DPI set larger than normal. It's amazing how many companies don't bother testing for that. Or do it in a half-assed way (like Chrome's "we only do 100% or 200% DPI, so if you set it to 150% we'll make it fucking huge!"*) Or go out of their way to break it entirely, like Steam used to do. (You still can't fucking change the font size in Steam IM windows!!!!! It's been a DECADE NOW!) 😉 To be fair to Chrome, they did fix it in a reasonable amount of time once 13" 1080p laptops like mine hit the market. It still brings out the, "you mean you didn't have DPI scaling at all from fucking version ONE!?!?!" shock and surprise, though. Do people writing software even USE computers? How could you be a web browser programmer and not know that the DPI can change? Fuck, CSS pretty much RELIES on that! /rant

    I cannot agree more with this rant with the addition of buttons and options getting cut off because my DPI is at 125%.

    I see what you did there. (I wonder what that says about my own DPI settings...)



  •  As well as the horriffic use of labels, we also have two different kinds of font rasterization in the same paragraph:

    Red text is anti-aliased and the black text is pixelated.

    It almost looks like the installer itself is written using an ancient version of AWT.



  • @LoremIpsumDolorSitAmet said:

     As well as the horriffic use of labels, we also have two different kinds of font rasterization in the same paragraph:


    It almost looks like the installer itself is written using an ancient version of AWT.

    it couldn't have been AWT because that needs java to run...

     



  • @ratchet freak said:

    @LoremIpsumDolorSitAmet said:

     As well as the horriffic use of labels, we also have two different kinds of font rasterization in the same paragraph:

    It almost looks like the installer itself is written using an ancient version of AWT.

    it couldn't have been AWT because that needs java to run...
    Ah, but the installer executable might spin up a JVM. Anyway, I doubt that's what's really happening, but just saying it's possible, and would explain why the GUI looks like Windows 95. You have to make a deliberate effort, or use a really rubbish library, to end up with 'classic' buttons on Windows XP and higher.

     



  • @LoremIpsumDolorSitAmet said:

    You have to make a deliberate effort, or use a really rubbish library, to end up with 'classic' buttons on Windows XP and higher.

     

    Classic buttons are the default, even in Windows 7. You have to add a special linker flag or #pragma if you want XP+-style buttons. If you believe Microsoft, it's because some applications were relying on the exact pixel colours of classic buttons.



  • @immibis said:

    @LoremIpsumDolorSitAmet said:
    You have to make a deliberate effort, or use a really rubbish library, to end up with 'classic' buttons on Windows XP and higher.

    Classic buttons are the default, even in Windows 7. You have to add a special linker flag or #pragma if you want XP+-style buttons. If you believe Microsoft, it's because some applications were relying on the exact pixel colours of classic buttons.

    Really? That sucks... and also if that's what MS are claiming, I don't believe them for a moment, since Windows Me had a different default background color for dialogs and buttons. They really should just default to the real native style, and revert back if the user chooses compatibility mode.

     



  • @LoremIpsumDolorSitAmet said:

    @immibis said:
    @LoremIpsumDolorSitAmet said:
    You have to make a deliberate effort, or use a really rubbish library, to end up with 'classic' buttons on Windows XP and higher.

    Classic buttons are the default, even in Windows 7. You have to add a special linker flag or #pragma if you want XP+-style buttons. If you believe Microsoft, it's because some applications were relying on the exact pixel colours of classic buttons.
    Really? That sucks... and also if that's what MS are claiming, I don't believe them for a moment, since Windows Me had a different default background color for dialogs and buttons. They really should just default to the real native style, and revert back if the user chooses compatibility mode.

    The way I've seen it done is that in order to get the classic style controls, you don't include a manifest, which can sit alongside your executable or be included inside it. You have to specify that you're using at least version 6 of the common controls library. I assume that MS's IDE automatically does that sort of thing for you (especially for .NET stuff), so for most people it just happens.



  •  @boomzilla said:

    The way I've seen it done is that in order to get the classic style controls, you don't include a manifest, which can sit alongside your executable or be included inside it. You have to specify that you're using at least version 6 of the common controls library. I assume that MS's IDE automatically does that sort of thing for you (especially for .NET stuff), so for most people it just happens.
    I guess that's simple enough... probably too complicated for Oracle, though. At least Java itself can use Windows visual effects just fine in Swing, with just one line of code (and to hell with you if you don't because we all know what the default Java GUI theme looks like...)

     


  • Discourse touched me in a no-no place

    @LoremIpsumDolorSitAmet said:

    At least Java itself can use Windows visual effects just fine in Swing, with just one line of code (and to hell with you if you don't because we all know what the default Java GUI theme looks like...)
    plz2share. I'm not a Java developer anymore, but I'd like to add this one-liner to my in-memory repository-of-stuff-to-condescend-to-crappy-Java-developers.



  • @Weng said:

    @LoremIpsumDolorSitAmet said:

    At least Java itself can use Windows visual effects just fine in Swing, with just one line of code (and to hell with you if you don't because we all know what the default Java GUI theme looks like...)
    plz2share. I'm not a Java developer anymore, but I'd like to add this one-liner to my in-memory repository-of-stuff-to-condescend-to-crappy-Java-developers.
    <font face="courier new,courier">UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); </font>

    Do this in the start of your main() method or in the UI thread before any windows or components are made, and you should be good to go. The added benefit is that it's cross-platform, provided your OS is well-known, but if not, you can just wrap it in a try/catch and carry on with the default look and feel. I haven't made a Java Swing app since Windows XP, but I assume it still works nicely. Even back then, it worked correctly with non-standard Windows themes such as Zune.

    Why doesn't Swing try to do this by default? Good question... guess they prefer consistency over aesthetics!



  • @flabdablet said:

    set bin=%ProgramFiles% if "%PROCESSOR_ARCHITECTURE%" == "AMD64" ( set "bin32=%ProgramFiles(x86)%" ) else ( set "bin32=%bin%" )

     

    Careful with this. %PROCESSOR_ARCHITECTURE% doesn't work as you might expect if you're in the 32 bit version of cmd.exe, which you might be if you're say, deploying this via SCCM.

    I think you're ok in this one, as the folder redirection would put everything into the (x86) directory anyway.

    We use an Oracle account to download the MSI with Autoupdate disabled, the hard coded expiration date turned off, and no extra crap. Someone then edits it to fix some stupid typos where some extra backslashes are added that causes it to fail a passive install, and plugs it into our default wrapper that does stupid stuff like uninstall all old versions (because Oracle doesn't know how to use the upgrade table in an MSI properly) and delete a few letover registry entries from old versions, shortcuts, etc.

     We then still have the issue that, because Oracle doesn't know how to use the file table of an MSI properly, it drops an archive on the machine and then extracts the archive to provide the files. This causes any repair to fail pretty badly, of course. Honestly, we should probably start rewriting the MSI itself from scratch (and perhaps, putting it up on the webs in case other places want to use it- Then again, I wouldn't trust someone elses to a good job, so why would anyone trust me?)

    tl;dr Fuck you Oracle.

     

     



  • @LoremIpsumDolorSitAmet said:

    @Weng said:

    @LoremIpsumDolorSitAmet said:

    At least Java itself can use Windows visual effects just fine in Swing, with just one line of code (and to hell with you if you don't because we all know what the default Java GUI theme looks like...)
    plz2share. I'm not a Java developer anymore, but I'd like to add this one-liner to my in-memory repository-of-stuff-to-condescend-to-crappy-Java-developers.
    <font face="courier new,courier">UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); </font>

    Do this in the start of your main() method or in the UI thread before any windows or components are made, and you should be good to go. The added benefit is that it's cross-platform, provided your OS is well-known, but if not, you can just wrap it in a try/catch and carry on with the default look and feel. I haven't made a Java Swing app since Windows XP, but I assume it still works nicely. Even back then, it worked correctly with non-standard Windows themes such as Zune.

    Why doesn't Swing try to do this by default? Good question... guess they prefer consistency over aesthetics!

    That's just a Swing lookalike of the Windows theme... and the version of Windows it tries to look like depends on the Java version: Java 7 will always try to look like Windows 7 regardless of which version of Windows you're running it on, for instance.  Unfortunately, it's quirky and doesn't act exactly like Windows does.

    To actually use Windows widgets in Java GUIs, the application needs to be written against SWT instead of Swing.

     


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.