Omnimaga

General Discussion => Technology and Development => Computer Programming => Topic started by: Hot_Dog on December 17, 2010, 04:12:42 pm

Title: Does Java work on all computers?
Post by: Hot_Dog on December 17, 2010, 04:12:42 pm
If a Java program is translated into "Java Byte Code," is it guranteed to run on Windows, Mac and Linux as long as they have java installed?
Title: Re: Does Java work on all computers?
Post by: nemo on December 17, 2010, 04:14:23 pm
if they have the JVM (java), then yes.
Title: Re: Does Java work on all computers?
Post by: DJ Omnimaga on December 17, 2010, 04:36:01 pm
It should, except I noticed sometimes that even after installing Java, sometimes some browsers will still think it's not installed.
Title: Re: Does Java work on all computers?
Post by: calcdude84se on December 17, 2010, 04:37:34 pm
It should, except I noticed sometimes that even after installing Java, sometimes some browsers will still think it's not installed.
Even if you make sure to select for it to install the correct browser plug-in and then you restart? What browser is this?
And yeah, it should work on any computer with a JVM installed
Title: Re: Does Java work on all computers?
Post by: DJ Omnimaga on December 17, 2010, 06:16:42 pm
It eventually worked after 2 or 3 restarts. It was IE and Opera. It happens often, though, when first installing Java..
Title: Re: Does Java work on all computers?
Post by: jnesselr on December 17, 2010, 07:18:14 pm
If a Java program is translated into "Java Byte Code," is it guranteed to run on Windows, Mac and Linux as long as they have java installed?
Not necessarily. You have to make sure you are using routines that are not deprecated, or provide some sort of version check.  You also have to make sure any native libraries are compiled to the correct architecture and installed. And you have to make sure that any libraries and functions you use are available to all systems.
Title: Re: Does Java work on all computers?
Post by: DJ Omnimaga on December 17, 2010, 08:17:55 pm
Would the program have to be updated regularly forever to maintain compatibiility? I remember PJIRC, for example, stopped working completely during about 3 versions of Java, then it started working again 4 versions later.
Title: Re: Does Java work on all computers?
Post by: Jonius7 on December 17, 2010, 10:00:22 pm
I just updated my java to 6r23. it works fine in browsers however there are problems for me when i run .jar files (runtime). I can run them, but only after a massive amount of tweaking with cmd. I dunno why i have this since everyone else seems to be able to run them directly by double-clicking. but as for the java in browsers it should work.
Title: Re: Does Java work on all computers?
Post by: jnesselr on December 17, 2010, 10:41:04 pm
I just updated my java to 6r23. it works fine in browsers however there are problems for me when i run .jar files (runtime). I can run them, but only after a massive amount of tweaking with cmd. I dunno why i have this since everyone else seems to be able to run them directly by double-clicking. but as for the java in browsers it should work.
Try just adding -d32. Unless you are on a 64 bit processor?
Would the program have to be updated regularly forever to maintain compatibiility? I remember PJIRC, for example, stopped working completely during about 3 versions of Java, then it started working again 4 versions later.
No, not necessarily. What I said was mostly referring to packages that have not been adopted to the java standard (Don't want to explain that. It's basically like making the package "official", and having it be released with any new updates).  E.G. 3rd party packages and such.
Title: Re: Does Java work on all computers?
Post by: Jonius7 on December 17, 2010, 10:44:52 pm
to the jar file or java.exe
Title: Re: Does Java work on all computers?
Post by: jnesselr on December 17, 2010, 10:45:28 pm
to the jar file or java.exe
Jar file. Also, are you 32 bit or 64 bit user? what OS?
Title: Re: Does Java work on all computers?
Post by: DJ Omnimaga on December 18, 2010, 12:21:50 am
I just updated my java to 6r23. it works fine in browsers however there are problems for me when i run .jar files (runtime). I can run them, but only after a massive amount of tweaking with cmd. I dunno why i have this since everyone else seems to be able to run them directly by double-clicking. but as for the java in browsers it should work.
Try just adding -d32. Unless you are on a 64 bit processor?
Would the program have to be updated regularly forever to maintain compatibiility? I remember PJIRC, for example, stopped working completely during about 3 versions of Java, then it started working again 4 versions later.
No, not necessarily. What I said was mostly referring to packages that have not been adopted to the java standard (Don't want to explain that. It's basically like making the package "official", and having it be released with any new updates).  E.G. 3rd party packages and such.

Ah ok thanks for the info.
Title: Re: Does Java work on all computers?
Post by: Munchor on December 23, 2010, 04:58:50 pm
I believe that .jar files do work in all platforms.

However, if converted to .exe, they won't anymore since .exe is for Windows :)

EDIT: Afterall, that's what Java is famous for: compatibility and portability :D
Title: Re: Does Java work on all computers?
Post by: jnesselr on December 23, 2010, 08:33:24 pm
I believe that .jar files do work in all platforms.

However, if converted to .exe, they won't anymore since .exe is for Windows :)

EDIT: Afterall, that's what Java is famous for: compatibility and portability :D
Java will work as all the JRE is there (Java Runtime Environment).  Also, all methods for systems classes must be supported and not deprecated.
Title: Re: Does Java work on all computers?
Post by: Binder News on December 23, 2010, 09:00:21 pm
A while ago, I managed to mess up Java on my computer. I got it working again, but we are stuck at version 1.6.2 (or is it just 6.2). Anyways, you can never assume that someone has the latest version of the JRE installed. My grandparents don't use their internet much, and so use DIAL-UP!!!!! I have no idea what version of the JRE they have, but it probably isn't up-to-date. I recommend using Java 5, as most of the common apis didn't change from 5 to 6, and there is a better likelihood of a user having at least v5.
Title: Re: Does Java work on all computers?
Post by: Munchor on December 24, 2010, 06:22:21 am
A while ago, I managed to mess up Java on my computer. I got it working again, but we are stuck at version 1.6.2 (or is it just 6.2). Anyways, you can never assume that someone has the latest version of the JRE installed. My grandparents don't use their internet much, and so use DIAL-UP!!!!! I have no idea what version of the JRE they have, but it probably isn't up-to-date. I recommend using Java 5, as most of the common apis didn't change from 5 to 6, and there is a better likelihood of a user having at least v5.

I have Java 6, but I do believe Java 6 is able to use Java 5 stuff...
Title: Re: Does Java work on all computers?
Post by: Binder News on December 24, 2010, 09:39:06 am
Correct. As long as you have the latest Java version, you should be able to run anything from previous versions as well.