Bring your karma
Join the waitlist today
HUMBLECAT.ORG

Blind and Visually Impaired Community

Full History - 2021 - 08 - 23 - ID#p9ujte
5
Do someone use Java for the professional work with VSCode? (self.Blind)
submitted by Temporary-Hair-5325
I use VSCode for coding in PHP, Rust etc and now I'm learning Java. Since I'm blind developer, my concern is about IDEs, accessibility and compatibility. I've noticed there is Java support in VSCode, but as far as I know, Java devs use IntelliJ most of the time. But since IntelliJ is not really good at accessibility (it is possible to improve it at some point by writing scripts for my screen reader, but that is not always as easy as get accessibility out of box), I want to stick with VSCode if it's possible. Eclipse is looks like usable, but VSCode has some features that are really important to me, including, but not limited to discarding unstaged version of staged file, accessible debugger, posibility of developing in remote Dockerized container, selection markers, autocompletion, GIT etc. Neither Eclipse nor IntelliJ have a features for remote development. What I mean is that I usually have a virtual machine as my main development machine (source code lies there). I do that because I can not efficiently use Linux as my main machine (screen readers in there are not that good as Windows counterparts) so I write my code with my IDE on Windows. Since VSCode has remote extension, it is not a problem and I can behave with my projects on Linux as they're local (connection happens via SSH) and all the commands to control Linux I enter in the terminal. In some rare cases I use Linux screen reader called Orca to get to UI stuff, but mainly I work on Windows for projects that are on Linux. I guess I can use something like Mutagen (which is really good at two way syncing files across systems), but I can not give a path for an Eclipse or IntelliJ (which is on Windows) to my JDK (which is on Linux). More bad stuff happens if company would decide to Dockerize the Java project. Only terminal here is a saviour, but debugging on IDE is actually really important + without given JDK IDE can not function normaly. Main question is this: Do you use VSCode for Java development in your job? If you do, are you facing any big issues with project compatibility? I mean frameworks, Maven / Gradle, some libraries, older Java versions / projects etc. If you don't, you think that can be done in this particular case?
Fridux 3 points 1y ago
Disclaimer: I don't develop in Java, but what I'm going to say applies to pretty much every development environment I've used except for iOS development, which requires Xcode, and now the World of Warcraft add-on that I'm developing, which requires the World of Warcraft client.

I think your setup is unnecessarily complex. There's no need for a Linux virtual machine when you already have the Windows Subsystem for Linux which can be used with Docker, and from what I've $1, Docker is supported by the Visual Studio Code Remote Development Extension Pack, so that's all you need in addition to the language support extensions.

Personally I'm on MacOS, and use TextMate 2 instead of Visual Studio Code because I can't find a comfortable way to interact with the latter using VoiceOver. Every project I work on, except for the aforementioned cases, has all the tools and dependencies installed inside throw-away development Alpine Linux Docker containers with which I interact through the terminal, but in any case Docker shouldn't be an obstacle to using all the features of Visual Studio Code, much in the same way that a virtual machine isn't an obstacle.
Temporary-Hair-5325 [OP] 3 points 1y ago
In case of VSCode the setup I have is fine. First of all, I get system CTL (systemD) which is unavailable in Windows subsystem for Linux and I guess will not be. Secondly, if I have behaviour driven tests, then I can open them directly on Linux in the browser by utilizing Orca. Also if I have some issues with the system (Ubuntu itself), I can Google stuff out and sollution will be there for me as for everyone else.
VSCode can even connect to remote Docker containers (from Windows to Dockerized container on Ubuntu virtual machine). What do I need to do is just set DOCKER\_HOST on Windows to be directed to my VM and set up Docker daemon on VM to allow ssh connection from Windows or via TCP socket if needed. Then VSCode can connect directly to that container and do things like localy.
So actually VSCode looks promissing for Java development, but I'm worried if I'll face something that requires some framework, libraries or whatever that will not be compatible with VSCode.
Fridux 3 points 1y ago
Oh, sorry, I misunderstood your question. In any case I stand by what I said regarding the complexity of your setup.
MostlyBlindGamer 2 points 1y ago
VS Code remote development supports port forwarding. You can open your web app in Windows at localhost.

My dev environments are all headless. There's no need for a GUI and no GUI to break.
MostlyBlindGamer 2 points 1y ago
Have you looked into using Eclipse with Windows Subsystem for Linux?
Temporary-Hair-5325 [OP] 3 points 1y ago
I know about WSL2, but when I looked for an instructions to Eclipse support on WSL2, I was not able to find anything useful. They talk about installing Eclipse directly to WSL2 and enabling GUI support, but that is not the option I need.
I understand that I can share directories across systems via network path \\\\wsl$\\ but that will not bring a direct support, only file / directory syncing, but not the actual support as compiling, running, debugging. Paths and stuff will also be different, in Windows case it will be like \\\\wsl$\\Ubuntu-20.04\\home\\user\\project and in case of WSL2, it will be like /home/user/project.
Docker desktop now leverages Linux kernel when WSL2 is installed, but that does not make Eclipse supporting WSL2 and problems will rise one by one with such setup I guess.
For instance IntelliJ has some support over WSL2 and then it feels more local than without it, but IntelliJ accessibility is kinda pure incomparison with VSCode for example.
MostlyBlindGamer 2 points 1y ago
Just so you know where I'm coming from, I switched to macOS to have a UNIX development environment and out-of-the-box accessibility. Most devs I know get Maacs from their companies, so this might be an option for you.

I actually use VS Code to develop remotely on a Windows machine.

In your case, I think I'd set up Eclipse on Windows and a dev environment on WSL2, share a network folder with the host and configure $1.
Temporary-Hair-5325 [OP] 2 points 1y ago
Lets say I would buy a MAC and use Voiceover as my screen reader. Will it let me to work with Eclipse IDE? If it would not, then I guess there is no gain from such a setup except that MAC is Unix based, but virtual machine on my Windows computer covers that.
I can use Eclipse for Java development in general by sharing a directory from my WSL2 (it is done automatically via \\\\wsl$ path), but it will probably lack the functionality, because as far as I understand it, Eclipse requires JDK to run on the same system as the IDE itself and since IDE will run on Windows and JDK on Ubuntu based on WSL2, it will probably fail. If Voiceover reads Eclipse then it indeed can be useful, but I heard that Voiceover does not even read source code indentation?
By the way WSL is not as good as it looks (at least for now), because when I run a lot of different services (Postgress, MongoDB, Nginx, Elasticsearch, Redis etc) it actually eats a lot of resources and operates indeed slowly even on PC with 32 gigs of RAM. Such things never happen with virtual machines ran on VMWorkstation PRO even with way weaker computers.
I see that is possible to debug Java apps remotely and that's nice, but I am not so sure if I will install JDK localy on Windows and then write software for my Linux that my IDE will still give me a proper autocomplete and other features. I can run Junit tests via comand line and debug via remote debugging, but I don't know if these little hacks are worth it if I can just use VSCode with the proper setup directly on VM or WSL2 (supports both ways). But of course, I guess most devs do not use VSCode for their Java back-end and I can not get an answer if there is something ficious in that setup, for example some framework which can not be dealt with without an IDE.
MostlyBlindGamer 1 points 1y ago
OK, I think they're are several questions here and I can't confidently answer all of them.

There are options for customizing VoiceOver verbosity and word replacement to get it to read indentation to your liking. Other people who really on it entirely would be better suited to explaining those.

The easiest thing to do is probably too install Eclipse and see what happens. If it asks for the JDK, install that and test it again.

You can also test out VS Code for Java, suggest you already know that works for other projects.
This nonprofit website is run by volunteers.
Please contribute if you can. Thank you!
Our mission is to provide everyone with access to large-
scale community websites for the good of humanity.
Without ads, without tracking, without greed.
©2023 HumbleCat Inc   •   HumbleCat is a 501(c)3 nonprofit based in Michigan, USA.