5 ms·
It was (and is) very common to develop on a Windows desktop / laptop and deploy to a Linux server
by ridruejo 4y ago
It was (and is) very common to develop on a Windows desktop / laptop and deploy to a Linux server
- cm2187 4y agoExactly, that's the "c is cross platform" way. What java offers is that you compile once and you can run the same binaries on any platform (hence freely switching OS as Bill Gates feared). But who uses that in real life? Because compiling on windows and deploying on linux/unix/etc, that was posssible 20 years before java in c/c++.
- Beltalowda 4y ago> Because compiling on windows and deploying on linux/unix/etc, that was posssible 20 years before java in c/c++. "20 years before Java"? That's 1975 we're talking about. Was it possible to build a program on Windows 95/NT and then deploy that to a Unix system? Probably. But given that today this can still be quite a pain to cross-compile C code I bet it wasn't easy. Besides, "it compiles" doesn't mean "it works" or "it works on this other platform" (quite likely with a different CPU architecture), especially not in C. And few people were writing any tests in the 90s. Java abstracted a lot of details like endianness, platform-specific APIs, etc. away. > who uses that in real life? There's quite a few cross-platform Java desktop apps; the IntelliJ IDEs are a good example (although they've since developed Kotlin, it's still the same Java VM). DBeaver is another example, openoffice.org used quite a bit of Java back in the day (although I think that's mostly phased out now) – I'm sure there are more. And of course in the 90s you had Java Web Applets. Java is a bit less popular for this than it was, but I've run plenty of Java programs on my FreeBSD machine back in the day, and I'm pretty sure "FreeBSD" wasn't really something the developers really thought of when they wrote it (I can't remember which off-hand, it was a long time ago but I have "fond" memories of dealing with the manual installation bruhhaha because of the license at the time).
- cm2187 4y ago> Java abstracted a lot of details like endianness, platform-specific APIs, etc. away. Well POSIX dates from the late 80s. That's not cross-CPU, but at least cross-OS, which is what Gates was really concerned about.
- pjmlp 4y agoAnyone doing POSIX in the mid-90's has the scars to prove how "portable" POSIX is in reality, autoconf wasn't created out of coding pleasure.
- Beltalowda 4y agoIt's not like POSIX was universally adopted the day it was released; that took a long time. And not all systems were Unix/POSIX in the first place (e.g. Windows, VMS, the IBM s/3.., and on the consumer side Amiga, Mac OS, BeOS, etc).
- heffer 4y agoThere are a few examples of where this is done. One that comes to my mind would be JOSM: https://josm.openstreetmap.de/ https://josm.openstreetmap.de/ You download one JAR file for any platform you intend to run the application on. There are installers for convenience but the JAR file works just as-is.
- pjmlp 4y agoWe use it all the time, the JARs compiled on Windows get deployed on the cloud without changes, instead of microservices one gets modules (binaries) that consumers cannot mess with unless they are into binary hacking, compiled just once. Nowadays we do the same with .NET code as well, when using .NET Core.
- kaba0 4y agoC is cross platform for a hello world. Anything more complicated and you are deep in OS-specific system calls/libs.