Coming from C#, is Java a cure to some of my ills?
I mostly use C#, but I'm looking to maybe give Java a spin. I use all three major platforms (Windows, MacOS X, and Linux) on a daily basis, and create a lot of tools to help me with various tasks. Some examples would be a specialized version of grep that has extra features. A webcam monitor to keep an eye on some of my snake enclosures. A web scraper that pulls information for my job from several pages and displays a summary. Many others as well; some cli and some gui. Some I share with other people and some I don't, the people use various OS.
Sometimes things just don't work like they're supposed to. My OSX machine won't, no matter how hard I try, run .Net directly via mono. I end up setting up bash scripts. On Linux I run into issues with the trust store throwing a tantrum at https sites, or having issues with library .dlls that I use regularly. On my Windows machine everything works more or less properly, which it should. When it comes to UI it's a total crap shoot if Winforms will run on any platform that isn't Windows. Mono sometimes work fine, sometimes creates new bugs out of thing air, sometimes doesn't work at all. Same for WPF. I don't really want to use a fallback like GTK#, as that's more and more crap I have to install (and expect my users to install).
Would Java be a better choice for my situation? I keep hearing that Java is king of multiplatform development. I'm a little biased against it because it stumped me when I was first learning, and thus left a bad taste in my mouth, but I'm thinking about giving it another try. Managing .net/mono versions is a pain and it'd be nice if I could just install Java and be done on each platform.
Does Java make bundling extra libraries easy for distribution? Is the UI system decent over platforms?
Edit: After looking it over I think I'm going to give Java a pass. It may make some aspects easier, but there's just so much missing that I'm used to in .Net that I'm not going to bother. I'm not going to list them off because I don't want to turn this in a Java bash any more than this edit already has, but it just doesn't seem worth the hassle.
Posted Mar 1, 2016, 9:20 PM UTC · edited
Java will seem like the cure to some ills and will create all new problems for you to scream about.
Finally there is no language that is truly cross-platform. there is always some details that need to be handled for on just this OS or just that OS. However if cross platform is your primary goal I would say Java is a bit further along there. Just don't expect plug and play for anything but the most simple applications.
What are common points of pain for Java hobbyists? My job isn't programming, I just program for fun and to create tools that make my life and the lives of my coworkers easier, so enterprise-level things don't concern me, just day-to-day pain.
For desktop applications UI I would say, WPF sucks but it is not nearly as difficult to work with as the options under Java. You will also find some fundamental differences between how projects are organized and deployed as well as how configuration is managed. None of these are bad more than they have their own unique pains like C#'s features do.
Aside from that once you get past the front end things get very similar in many ways though Java devs tend to prefer different patterns than you often see in .NET land. You might not use enterprise code but if you adopt a 3rd party lib expect factory and builder to the popular patterns unless it is a newer framework.