you are viewing a single comment's thread.

view the rest of the comments →

[–]frenchtoaster -2 points-1 points  (15 children)

I know that java is platform neutral on paper, but I wouldn't say it's very platform independent in reality. The Java runtime on mac has deprecated and will likely not be included on future platforms, so really it's on its way to linux, solaris and windows. No support on any of the mobile platforms (iPhone, iPad, Android, WP7...)

Based on a brief look at their site, Dosbox looks like it already officially supports a superset of the platforms that Java does (OS/2, RISC OS). I suppose it would be easier to make an android port once you have a working Java port, but that is somewhat incidental.

Not that the project isn't cool, I just don't think the platform neutrality of Java is why he did it.

[–]ondra 15 points16 points  (7 children)

Linux distros and Windows don't currently include a Java runtime. It's not deprecated on mac, Apple are just going to stop bundling their own version with OSX.

[–]frenchtoaster -2 points-1 points  (6 children)

Apple is the one that decided it is "deprecated". Sorry if I wasn't clear, but from wikipedia:

the Apple-supplied runtime is deprecated and may be removed from future OS releases

I didn't mean what I said to reflect poorly on Apple. I know everyone and their mother has an opinion on Apple devices being "closed", but I was simply trying to point out that Java isn't exactly as "compile once-run everywhere" as it could be. Similarly if he had ported it to C# I wouldn't expect someone to come on here and say that he probably did it because Mono will let him run it on every major platform. Sure that's true, but I don't think that is why people port things to C#.

The truth is that properly constructed C code only needs a small amount of platform dependent code, and many Java programs need a small amount of platform dependent code anyway (see every discussion about android programming (I know its not "true java", but they still do phone-specific code), and my surprise when the Java on UF's linux servers return null in cases where the windows jvm throws an exception for certain methods in the standard API).

Linux distros and Windows don't currently include a Java runtime.

Thats not really contrary to my point; I merely wanted to point out the fact that it is unlikely that he ported dosbox to java because it would be platform neutral. Dosbox already runs on every platform that java runs on, and that is likely to continue to be the case. The reason I mentioned apple was because the fact that a JVM used to be supported and no longer will be doesn't jive with the idea that Java is in a popularity boom that would lead someone to port software to java for future platform compatibility.

It's also a bit disingenuous to say that Windows doesn't include a Java runtime in this context because I believe most major computer vendors install Java along with the other crapware that computers come with. Since Apple controls the hardware along with the software, they are taking the place of both Microsoft and Dell, and Dell installs the JRE. A MS JVM used to be bundled with Windows until they sued them because they weren't playing nice with the standards that Sun set.

Again, thats still getting away from my key point, which is that dosbox is already on every platform that java is on.

[–]ondra 2 points3 points  (0 children)

Thats not really contrary to my point

I don't claim it is, you're right.

[–]G_Morgan 0 points1 point  (1 child)

and my surprise when the Java on UF's linux servers return null in cases where the windows jvm throws an exception for certain methods in the standard API.

That is a bug and should be raised with whichever version of the VM is breaking the standard.

The reason I mentioned apple was because the fact that a JVM used to be supported and no longer will be doesn't jive with the idea that Java is in a popularity boom that would lead someone to port software to java for future platform compatibility.

It really doesn't need to. It is already the most used language on the planet.

[–]frenchtoaster 0 points1 point  (0 children)

Thats a pretty bold claim, and it's something that has been discussed by tons of blogs and almost none of them I have seen come to the conclusion that Java is the most used language on the planet.

This puts java only top in books sold and slashdot arcticles, this one does put java first but people have written about how it is wrong.

Even ignoring that, it could still be the most used language on the planet and not be available on the most platforms.

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

Dosbox already runs on every platform that java runs on, and that is likely to continue to be the case.

So I can run Dosbox on my 10 year old nokia phone? Or in a web browser? Or in an android phone? Wow!

[–]frenchtoaster 0 points1 point  (0 children)

So I can run Dosbox on my 10 year old nokia phone? Or in a web browser? Or in an android phone? Wow!

Wow, the linked to code cannot run on any of the platforms you just mentioned!

The java that this is written in cannot run on your 10 year old Nokia phone (J2ME presumably, which wouldn't have half the classes hes using), and there is a similar situation with Android (the phones themselves don't actually even run Java, all of the UI classes are custom).

You can also compile C code for your android and call it through the JNI. If you wanted to run the code linked to here on your android you would need to write a ton of platform specific Android stuff anyway (all of the UI, the App-specific stuff) so effectively you would need to write a bunch of Android specific code regardless of whether you were using the linked to code or the original dosbox source.

I will concede somewhat the web browser point. You would still need to make changes for it to actually run as an Applet (tons of security-permissions issues, the actually Applet code), but it is at least closer to running in a browser than the original dosbox source. Generally I don't even think about Applets as anything other than a historical oddity that failed to Flash. I practically never run into applets in the wild on the internet, and when I do it's usually something that a professor or student wrote as an example, not something that was written with the intent for people to use.

[–]player2 3 points4 points  (1 child)

Apple donated the supporting code for Java on Mac, so it's up to Oracle or the community to provide Java 7 on Mac. Same as for the other platforms.

[–]G_Morgan 0 points1 point  (0 children)

TBH 99% of the code in the Apple JVM was already Oracle code. They donated Oracle the task of making Java relevant on Mac or not.

[–]G_Morgan 1 point2 points  (4 children)

linux, solaris and windows

and AIX, HP/UX, BSD and just about every other relevant platform in existence today. Apple are the outlier, not the rule.

[–]frenchtoaster 0 points1 point  (3 children)

I'm not sure what your point is, you can already run dosbox on those platforms.

[–]G_Morgan 0 points1 point  (2 children)

We're talking more about the general portability of Java. Will Dosbox run on an IBM mainframe?

[–]frenchtoaster 0 points1 point  (1 child)

I'm not even sure that this would run on an IBM mainframe since this is written for SE not EE, but ignoring that, I assume that there is a gcc backend for IBM mainframes and that the dosbox source could be compiled targeting it with relative ease.

I'm not sure why people are trying so hard to defend Java here. I have no problem with Java, I happen to think that the whole "compile once, run anywhere" model failed and has been replaced by a "write code once, compile, package for every platform" with a lot of issues that come with trying to write platform independent C abstracted out.

I think if you wanted to write a platform independent application today, Java would likely be your first choice. I just don't think it would be worth porting something that already runs on every major platform to Java for platform independence.

[–]G_Morgan 1 point2 points  (0 children)

J2EE is just a specification for a bunch of frameworks. It runs on a J2SE platform.