Chris, Replies inline:
On 7/21/2017 10:01 AM, Christopher Schultz wrote: > Roparzh, > > On 7/20/17 2:16 PM, Roparzh Hemon wrote: >> On Thu, Jul 20, 2017 at 8:03 PM, Christopher Schultz >> <ch...@christopherschultz.net> wrote: > >>> 4. Java on Windows is a nightmare. If you want to quip about >>> moving to a "real server OS," then suggest switching to a >>> UNIX-like OS, where the Real Servers run :) > >> I am quite curious and interested in what you say here, because my >> feedback and experience go the opposite direction. > > Problems I've had on Windows with Java-based programs as listed below. > Not all issues are Java-specific, however. I suspect most of these > problems are because I just "don't know Windows well enough". Fair > enough. But they are so irritating, they have made me confident I will > never use Windows for anything production-related. > > 1. Watching a log file is not easy. No "tail". No command-line tools > to look at text files, other than "TYPE". Want to see that log file? > Open in Notepad. Oh, is your log file too big? Sorry, try a different > GUI editor. Oh, does your log file have newlines instead of CRLF? > Unreadable: must use WRITE.EXE or install another tool. There are a lot of solutions for this: 1. My favorite - install cygwin 2. Eclipse has a plugin (since you use Eclipse) The Eclipse Log Viewer is a non blocking IO stream reader that can tail any number of files and eclipse consoles. It allows to syntax color the log files with either a regular expression or a word match. 3. Powershell command (have not tried this) Get-Content -Path "C:\scripts\test.txt" -Wait > > 2. Running as a service is a headache. First, you need a wrapper > program, but that wrapper program needs to fit into the Windows > Service scheme. It's like systemd except without configuration files > and instead you need configuration programs. This program can't return > any useful status information (e.g. exit value) because anything other > than 0 exit status means "error" and the service looks like it failed. > Same is true with scheduled jobs, btw (and is worse, since > scheduled-jobs really need to be able to return status information). > If you want to use the command-line (let's just admit that Windows is > completely unusable from the command-line), using "NET" to start/stop > services is particularly difficult because the service name is always > some 90-character string with spaces and special characters that need > to be escaped. Using GUI tools gives you carpal tunnel syndrome with > all the clicking required. > This is one of the many reasons why I don't run Tomcat as a service on development machines. 1. "Install" Tomcat from a zip or tar.gz file 2. Configure IDE to start / stop / debug Tomcat 3. Profit (more or less) > 3. There are a handful of programs all which launch Java in different > ways. You need javaw.exe if you don't want to see a console window, > java.exe will always show a console window. If you use javaw.exe, > stdout/stderr is discarded. > > 4. File paths have unexpected quirks. This is not unique to Java and > is getting much better where Java is concerned, since URL handlers are > improving over time. Drive letters, UNC paths, network shares, etc. > are all a headache to use because you have to know the incantation for > each one to make it work. Sometimes you must map a network drive > letter. Out of drive letters? Too bad. Sometimes \\server\share works. > Maybe? Depends on the exact versions of everything involved. > > 5. Scripting is awful. I'm sure PowerShell makes it better. But there > was solution to this invented in the 1970s that is very powerful. It's > sad that it took Windows 25 years to get a decent shell/script > framework. Have a look at catalina.bat versus catalina.sh if you want > to get a sense of how awful scripting in Windows actually is. > Scripting is awful. Again, I install cygwin on all of my Windows machines. OK - I'm avoiding installing cygwin on my Windows 10 laptop. We'll see how much pain I can endure in my effort to learn PowerShell. It's the same way I learned vi. 1. Install vi on my Windows machine (long time ago and far away) 2. Use nothing but vi (eschewing SPF editor / mainframe - long time ago) 3. Profit (or at least learnit) >> My goal is to self-teach myself Java in JEE for Web development. I >> am a long-time Mac fan, but on my mac I got stuck by a >> configuration problem in JEE and got ZERO feedback on half a dozen >> forums and mailing lists, including this one. In contrast, in this >> windows question I got a lot of feedback very quickly. > > Well, welcome to the community. If you ever meet me in person, you'll > see I'm not such a miserable bastard as this thread would indicate. > > -chris > My overall goal in all of this is to have a single way of doing things regardless of platform (object oriented development environment design). I figure that I have enough to learn without trying to remember which platform I'm on, and why the platform is doing non-intuitive things (ie., why the user is confused). I use the same command line (bash), same GUI editor (jEdit), same IDE (NetBeans mostly), same build tools (Maven, mostly), and install Tomcat in the same general way. I figure that gives me more brain cells to concentrate on problems that need solving by not having to use brain cells on what are essentially muscle memory tasks. . . . just my two cents /mde/
signature.asc
Description: OpenPGP digital signature