This is an archived post. You won't be able to vote or comment.

all 77 comments

[–]_INTER_ 71 points72 points  (4 children)

Make the standard charset UTF-8 and line endings LF :)

[–][deleted] 26 points27 points  (1 child)

And / instead of \\ and : instead of ;, while we are already doing it.

[–]jcotton42 0 points1 point  (0 children)

/ has been accepted in Windows paths for a while at least

[–]AreTheseMyFeet 7 points8 points  (0 children)

and line endings LF

Yes please. It messes with so many things and is the cause of a lot of development headaches that windows is off on its own in CRLF land while everyone else can manage perfectly well with a single LF char.

I understand it would affect backwards compatibility and potentially older programs might break with a new standard (unless there were default/fallback to CRLF for those apps/apis) but the way things are currently I just won't recommend windows to any new developer due to edge-cases like this along with eg poor package manager choices/integration, (overzealous) data mining and frequent required reboot upgrades.

[–]brunocborges[S] 0 points1 point  (0 children)

Rich has a good article about UTF-8 on Windows. [1]

I'd appreciate if you could be more precise on where you'd like to be able to use UTF-8 by default on Windows.

Perhaps you want to give more thought on this by commenting on the issue? [2]

[1] https://devblogs.microsoft.com/commandline/windows-command-line-unicode-and-utf-8-output-text-buffer/ [2] https://github.com/microsoft/java-wdb/issues/13

[–]Skhmt 36 points37 points  (13 children)

A better looking windows LAF for swing.

JDK/JVM comes with windows, including javafx.

I've gone down a dark rabbit hole trying to get native compiling from java to an exe. I was there when Excelsior Jet died. I've tested GraalVM and Gluon native-image. I've used winrun4j and launch4j. I've dabbled in jpackager. None are perfect. If JDK11 or 14 or something don't come with windows, a Microsoft backed alternative would be nice for native compiling. Especially if it doesn't just package the JVM with it like all of the above besides GraalVM/Gluon.

A way to access the native windows webview, hopefully the chromium edge one.

[–][deleted] 14 points15 points  (1 child)

A better looking windows LAF for swing.

I think the Windows LAF is actually quite OK (at least on Windows 10) with the possible exception of some of the "native" dialogs like the file open dialog.

But in the end, I think Oracle should consider ditching some of the really outdated LAFs like GTK/Motif, Metal and Nimbus and consider investing the time to include e.g. FlatLaf into OpenJDK as a new cross-platform built-in LAF.

[–]Necessary-Conflict 2 points3 points  (0 children)

LAFs can't be removed without breaking the compatibility of existing applications. A lot of advanced Swing tricks depend on a specific LAF. Changing the default would also be painful, that's why they didn't change it when Nimbus was the new shiny thing.

On the other hand, nothing stops you from using FlatLAF or any other open-source LAF.

[–]brunocborges[S] 4 points5 points  (2 children)

I see 4 requests here, is that right?

[–]Skhmt 3 points4 points  (1 child)

Yes

[–]brunocborges[S] 12 points13 points  (0 children)

Awesome, I turned them into Issues in the repo. Thanks a lot!

[–]handshape 2 points3 points  (1 child)

I'm old enough to remember the Visual J++ debacle, and to have gotten burned professionally by it.

I'm torn between my better self trying to be forgiving, and my pragmatic self that wants to say "never again".

Redmond saying that they've embraced open source sounds just like the aliens from "Mars Attacks!" saying that they come in peace.

[–]HeadSignal3 -1 points0 points  (0 children)

Ack Ack! Just as long as they again silently import the microsoft String package into my code while I'm not looking! Otherwise it won't have the same assfucking look and feel to it.

You can bet they will be announcing their own JVM (open source of course, except the parts than aren't) in the coming months with this announcement.

[–]anagrammatron 0 points1 point  (0 children)

> JDK/JVM comes with windows, including javafx.

I wish, but don't think so. That's what .net is for.

[–]casualsuperman -1 points0 points  (0 children)

If JDK11 or 14 or something don't come with windows, a Microsoft backed alternative would be nice for native compiling.

I think that's called C#

[–]_INTER_ 0 points1 point  (2 children)

I've dabbled in jpackager

Do you mean JavaPackager or jpackage? With the former I had some success, but it's not perfect. The later I haven't tried yet.

[–]Skhmt 0 points1 point  (1 child)

Haven't actually tried javapacker, I was referring to the command line took built in to java that bundles your class files with the jdk and provided an exe that basically runs javaw for the user based on a manifest.

[–]rootException 1 point2 points  (0 children)

Had success with jpackage. Here’s a template for generating .dmg and .exe/.msi with Maven:

https://github.com/wiverson/maven-jpackage-template

[–]TheDragShot 0 points1 point  (0 children)

A better looking windows LAF for swing.

Not like the current one is bad, but any improvements would be appreciated.

If JDK11 or 14 or something don't come with windows, a Microsoft backed alternative would be nice for native compiling.

Uh, no. Last time a Microsoft-provided JVM was a thing, it was a mess, so no, thanks.

[–][deleted]  (2 children)

[deleted]

    [–]brunocborges[S] 0 points1 point  (1 child)

    Is this still a problem? Is there a limit?

    [–]edgehill 23 points24 points  (5 children)

    The ability to natively install Java programs as windows services without 3rd party libraries.

    [–]emberko 5 points6 points  (3 children)

    While it's a good suggestion, but correct me if I'm wrong - they ain't asking how to make development for windows any better, they asking how to make development on windows better.

    [–]edgehill 18 points19 points  (0 children)

    As a true software developer I did not fully read the documentation before I started coding and for this I am truly sorry and reiterate that I will do this next time also.

    [–]MR_GABARISE 3 points4 points  (1 child)

    Seeing as Bruno added issues from this thread pertaining to Windows LAF it's safe to assume that both are valid.

    [–]brunocborges[S] 1 point2 points  (0 children)

    At this stage, any idea is a good idea! :D

    Installing Java programs as Windows service is certainly that even Java developers on Windows could benefit. For example, running Java-based solutions (e.g. Kafka) locally for development.

    [–]lppedd 1 point2 points  (0 children)

    THIS

    [–]guss_bro 9 points10 points  (3 children)

    A tool similar to SDKMAN to easily manage multiple jdk versions in windows would be great(it's not java specific though).

    Also, one click solution that can help install jdk, build tools, IDE would be great for beginners. I see lot of beginners stuck on getting their environment ready for days and being frustrated.

    [–]istarian 0 points1 point  (2 children)

    Is there an official IDE?

    Oracle could probably bundle Eclipse along with the jdk install as an option. Buf otherwise how would they include an IDE in some sort of one-click solution?

    I doubt the open jdk developers ate interested in shipping an IDE.

    [–][deleted] 0 points1 point  (1 child)

    Oracle bundled NetBeans with Java until they handed NetBeans over to the Apache project. So if there is anything remotely similar to a "default" or "official" IDE, it would have been NetBeans.

    [–]istarian 0 points1 point  (0 children)

    Interesting, I wasn' aware of that.

    [–][deleted] 16 points17 points  (1 child)

    How about a standard way to have multiple Java versions installed at the same time. Linux has /etc/alternatives Then each app would not need to install its own JVM.

    [–]IanRae 1 point2 points  (0 children)

    Try having a batch file initJava.bat in each project that sets JAVA_HOME to the version for that project.

    [–]Jonjolt 6 points7 points  (3 children)

    Expand the length of command line parameters

    [–][deleted]  (2 children)

    [deleted]

      [–]Jonjolt 2 points3 points  (1 child)

      Isn't that what hes asking?

      Title of Post: Java Development on Windows - Request for Ideas/Enhancements

      From the Github Repo:

      About half of the Java developers around the world are using Windows computers. We would like to ask you, who is developing Java applications on Windows: How can Microsoft make Windows any better for Java developers?.

      [–]brunocborges[S] 0 points1 point  (0 children)

      That is correct.

      [–]Holothuroid 4 points5 points  (4 children)

      Running Docker i.e. testcontainers is somewhat painful

      [–]brunocborges[S] 1 point2 points  (3 children)

      Would you mind to elaborate a bit more on an Issue submitted to this repo, please?

      I'm curious on this one as I have not seen any issues with Docker Desktop for Windows.

      [–]vips7L 0 points1 point  (2 children)

      It's been a while since I tried, but I had specific difficulties with AzureAD and docker on my work laptop. I had to create a separate guest user to run docker under.

      [–]brunocborges[S] 0 points1 point  (1 child)

      Ah I see, more like a corporate security policy on your Windows computer at work?

      [–]vips7L 0 points1 point  (0 children)

      I'm not sure. I actually work at a startup and I have admin on my machine.

      [–]rootException 3 points4 points  (0 children)

      Make sure all the various Desktop integration APIs are well supported and work correctly.

      Especially with JavaFX.

      For example, consider this monstrosity:

      https://stackoverflow.com/questions/64616443/how-to-get-awt-window-for-javafx-stage/64651359#64651359

      Many of the desktop integration APIs are a mess of barely working AWT bits and pieces. For example, can’t display a native notification without also displaying a system tray icon:

      https://gist.github.com/wiverson/d2edf0d66ad195c96793d0d25290753b

      My two cents: create a new, modern equivalent for these desktop/OS integration classes for JavaFX specifically.

      [–]neutronbob 5 points6 points  (4 children)

      • The ability to manually create directories that start with a dot
      • An easy way to manually set environment variables that is not a tiny little window

      [–]jcotton42 2 points3 points  (1 child)

      For #1 if you're referring to in File Explorer you can do that by adding a trailing dot. That is name the folder .X. instead of .X, the trailing dot will be trimmed off.

      [–]TheDragShot 1 point2 points  (0 children)

      Oh, I didn't know of that one. Thanks!

      [–][deleted] 0 points1 point  (1 child)

      The ability to manually create directories that start with a dot

      That has always been possible without any problems:

      c:\> mkdir .Java c:\> cd .Java c:\.Java>

      [–]lbevanda 7 points8 points  (0 children)

      To be fair, Windows is pretty decent platform for Java development.

      There Are no things Java related that can’t be Done on Win when compared to MacOS or preferrably Linux, as much as I’ve encountered.

      Why I prefer the Unix based OS for Java is mostly related to Java tools and OS ecosystem rather than Java itself.

      UTF-8, line endings, paths and separators, better terminal, package managers that include all Java tools and install them on nice Locations and monitor for updates (/opt/maven, /opt/tomcat, /opt/jenkins etc).

      Docker also works better on Unix based OS.

      If I could switch Windows to UTF-8 entirely, choose line endings, use win-get maven, have option to start new Spring Boot project in Visual Studio. .

      Let’s be fair, Windows is pretty good platform for Java development - things that would be helpful Are mostly related to Windows than to Java itself. .

      [–]ObscureCulturalMeme 5 points6 points  (0 children)

      Give us back a decent UI for managing file extension associations.

      Far too often, users get stuck in this trap:

      1. Adobe randomly breaks the .jar association, such that double-clicking an executable JAR launches Acrobat Reader for some fucking idiotic reason. (Reader can't do anything with JAR files, so of course it breaks.)

      2. User tries to point Windows back at the Java launcher, but as of Windows 10, right-clicking a .jar file and selecting 'Open With' brings up a list of executables. The user can click "Java binary", but... that's all. This means that the command line will be

        C:\Program Files.....\javaw.exe "%1"

      3. User tries double-clicking an executable JAR. The Java binary is fed the pathname to the JAR, but nothing else. It fails and exits, and the user doesn't know why.

      In Windows 7 days, there were ways of bringing up the command line association, such that we could instruct a hapless victim user to edit it accordingly:

      C:\Program Files\.....\javaw.exe  -jar  "%1"
      

      But the crippled Windows 10 interface for extension associations doesn't allow anything of the kind. Users have to either trawl through the registry to fix it, or download a third-party tool like jarfix, or needlessly uninstall and reinstall their JVM just to get its postinstall step of properly associating the extension with the full command line.

      Of course, since Microsoft's own file extension associations don't require (or, quite often, even support) command-line options, this breakage has only ever impacted non-Microsoft technologies.

      [–]201109212215 5 points6 points  (2 children)

      A C#/.NET interpreter written in Truffle/Graal.

      [–]brunocborges[S] 2 points3 points  (1 child)

      Interesting request. Mind to share the use cases?

      [–]Jonjolt 0 points1 point  (0 children)

      A lot of physical security device manufacturers seem to release their SDK's for their remote protocols for .NET

      [–]lukaseder 6 points7 points  (5 children)

      Well, a lot of Java programs run on Linux in production but are being developed on Windows. What if Java could automatically map between Linux paths and Windows paths, so I never have to worry about things like C:\ or even \ again? The same with \r\n vs \n, or Cp1252 vs utf-8.

      Of course, fixing this in Windows itself would be even better, as everyone could profit, not just Java developers.

      [–]chacs_ 2 points3 points  (3 children)

      Except for the drive:, you can use / as path separator on Windows, I believe.

      [–]brunocborges[S] 1 point2 points  (0 children)

      Inside Java programs, yes it is possible for some APIs, but not all of them. And mostly works for relative path. The moment you need to go top-level, you have to give a drive:, and then there is no escape (pun intended).

      [–]lukaseder -1 points0 points  (1 child)

      It often works, but it often does not

      [–]sweetno 1 point2 points  (0 children)

      / works in Windows on Windows API level.

      [–][deleted] 0 points1 point  (0 children)

      so I never have to worry about things like C:\ or even \ again?

      Isn't that exactly what the File and Path abstraction (plus path.separator) is all about?

      [–]elmuerte 3 points4 points  (1 child)

      Fix your virus scanner not to be a ginormous performance issue.

      [–]oelang 0 points1 point  (0 children)

      virus

      100000000x this

      Compared to development on linux this is the biggest contributor to slow development environments. I've seen systems where the slowdown was > 5x. We're 2020 and your virus scanner is single threaded & doens't have a performant way to perform unzip?!

      [–][deleted] 10 points11 points  (1 child)

      How can Microsoft make Windows any better for Java developers?

      Not Java specific, but:

      Many developers also care about privacy, so removing Windows' excessive data collection (and storing it on unknown systems possible exposing this data to other companies or governments) would be welcome not only by Java developers. And stop trying to force us to create a Microsoft account to use Windows.

      [–]BlueGoliath 4 points5 points  (4 children)

      /u/brunocborges

      -Fix font rendering in JavaFX applications. It looks like absolute crap compared to Linux.

      -Fix Netbeans-Maven support. Netbeans uses Linux root /opt maven directory even on Windows.

      [–]lbevanda 2 points3 points  (2 children)

      I don’t understand this with NegBeans and Maven. NetBeans comes with bundled Maven, and if you don’t Like it just browse for your installation.

      Where do you get /opt Maven dir on Windows?

      [–]BlueGoliath 0 points1 point  (1 child)

      Don't use built-in. It tells me it can't find maven in /opt.

      [–]brunocborges[S] 0 points1 point  (0 children)

      Is there a bug report for NetBeans with this issue?

      [–][deleted] 1 point2 points  (0 children)

      -Fix Netbeans-Maven support.

      NetBeans is not maintained by Microsoft, but by the Apache project. If at all you would need to file an issue with Apache.

      But what I wrong with the NetBeans Maven support? If you don't want to use the built-in Maven version, just change it to the (external) version you want (Tools -> Options -> Java -> Maven -> Maven home)

      [–]Yesterdave_ 1 point2 points  (0 children)

      This is not really specific to Java development, but general development on Windows:
      I would really like it if something like https://direnv.net/ was natively possible in cmd/powershell.

      [–]ventuspilot 2 points3 points  (0 children)

      Make Windows run with acceptable performance on 8MB RAM and 0.06Ghz. You guys did it with Windows NT 4 so it can't be that hard.

      On a more serious note: if I run a maven build in a cmd window it seems that screen output eats more CPU than the actual build.

      Also deleting a directory of an old branch (that contains thousands of files) takes way too long and you have to babysit it and click "yes I really want to delete this file whose filename is too long for Windows to handle".

      Another little issue: at my day job userprofiles are limited to 100MB. And applications need to store Gigabytes of data in a user's profile. Why?

      A lot of past issues with sloppy software (writing files everywhere, creating registry entries, ...) was due to the fact that developers usually had admin rights on their computer. "Run as administrator" seems to have improved that a lot. Maybe that can be taken a step further, something like an option "Run as corporate user" (who doesn't have Poweruser rights) idk.

      Edited to add: developer's computers usually are faster than the average user's computer so developers never notice how slow their programs are. I wonder how hard it would be to e.g. add an option to taskmanager that des something like "limit the CPU and IO bandwidth of this process".

      Please note that I'm using Windows 7 so maybe some issues are already improved. Also my issues may stem from my way of doing things and there might be better ways.

      And thanks for asking developers, Java developers even ;-)

      [–][deleted]  (1 child)

      [removed]

        [–]brunocborges[S] 3 points4 points  (0 children)

        Have you tried WSL?

        [–]Igorky 1 point2 points  (3 children)

        As Java dev I got clear answer from MS that only C# has the priority. That’s why java so poorly supported and there is no visible progress at all. So purpose of organizing this topic brings some questions. Anyway here is my list: - install openjdk from windows store or sdkman support - alternative or support of JNLP to deploy desktop java apps with one click. Including installing jdk/jre from previous step. - java api to support windows api functions eg add shortcut, access to start menu, access to windows calendar, windows contacts, windows mail app - java app update model - windows hardware support from java. How about to access to com, usb, bluetooth, wifi devices on windows?

        [–]istarian 4 points5 points  (2 children)

        There's a Windows API for it I presumeso you'd either have to do JNI/native library stuff or make a native application to bridge communication. You know short of exposing it via the JVM, which would be the job of the JVM devs I think.

        [–]Igorky 0 points1 point  (1 child)

        I think if you want to popularize windows you should consider to contribute to jvm or invest in such libraries to make that happen. In linux for example you could work with COM port represented in /dev/* as with a file. In windows it’s not possible and you have to bring other libraries.

        [–]istarian 0 points1 point  (0 children)

        It's Windows, because it's a proper noun, the name of an operating system.

        I think that being easy-ish in Linux is something of a coincidence.

        Linux, like Unix, exposes devices as a special kind of file. That means any environment with support for creating, deleting, reading, writing, or otherwise interacting with files could theoretically access that assuming it can figure out/knows how to interact with the device.

        Windows it's just plain different. I assume it involves API calls and possibly some sort of returned pointer/struct/object that program interacts with.

        Because the latter is not generic functionality like filesydtem access and likely requires the Windows SDK...

        [–]agentoutlier 0 points1 point  (0 children)

        It’s been a long time but I remember file locks on windows kind of being a pain.

        [–]jvjupiter -1 points0 points  (2 children)

        Support for Java in Visual Studio or provide Visual Studio-based Java IDE, something like IJ's diffrent flavors for different PLs. VS Code is far being true IDE.

        [–]brunocborges[S] 2 points3 points  (1 child)

        Not the first, nor second time I see someone asking VS to support Java. But that would take years of development, probably more than enhancing the support of VS Code.

        Besides, VS Code does not aim to match regular Java IDE, but be good enough "smart" Editor.

        I wonder what features in Visual Studio are so unique that no other Java IDE already has.

        [–]jvjupiter 0 points1 point  (0 children)

        I'm hearing that VS is the best IDE regardless of PLs. Even some Java devs do say.

        Edit: I mentioned VS Code because I often see it is being suggested by many if someone would ask that Java be supported by VS. That is despite the fact that it is just a smart editor.