Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi,
Can i count on a fresh Linux install (of any of the big distributions) to already be able to run java and python programs?
If so, what version of java/python can i assume it is running?
no, not really. Usually, but probably not always. You need to take care about that yourself if you want to be really sure.
Versions are always different, changing...
no, not really. Usually, but probably not always. You need to take care about that yourself if you want to be really sure. Versions are always different, changing...
Yeah changing updating changing updating two versions of Java freeJava, and that other one, maybe more.
if you what to really know then type
Code:
javac
python
in the command line, but yeah Like the man said... refer back to post #2
If you are building something to install on "any Linux," you should not assume that anything-at-all is already present. Nor that they are at the minimum version-levels that you need!
You will routinely find ./configure scripts (made using autoconf) ... performing these tests.
Another option is to create a "package" and to specify prerequisites. Of course, this requires a certain amount of distro-specific work since not all "packages" are the same. But you can be version-specific, then ...
Last edited by sundialsvcs; 03-23-2016 at 01:11 PM.
Reason: fix tpyo
As you are talking about "big distributions" you can count on both being installed, as so many configuration tools use Python and the usual office software uses Java. But (there's always a "but"!) at the moment you can't tell whether you'll get Python 2 or Python 3.
As you are talking about "big distributions" you can count on both being installed, as so many configuration tools use Python and the usual office software uses Java. But (there's always a "but"!) at the moment you can't tell whether you'll get Python 2 or Python 3.
Yes you can. If it's preinstalled and the distribution isn't Arch, it's Python 2. You can also check Distrowatch.
I don't understand why people think "is this preinstalled?" is a question worth asking. You can install software after installing the distribution.
I assumed that the OP is creating some type of software that depends on one-or-another programming language being available.
I now see that autoconf scripts apparently does not have the ("automatic, easy") capability to search for Perl, Python, and so on being installed. But there are plenty of examples of installation scripts, including packages, that do. (A simple "file-existence test," at the usual cadre of places [or by following $PATH] might be adequate unless you are asking for a particular version to be present. Still, examples of those things exist, too.)
(Incidentally, it might be wise to program your install or configure script to support a parameter like --java-exists which would cause it to skip that language-existence test, on the basis is that the user is asserting that it does exist, i.e. and does not wish for you to test for it or has found that your test doesn't work. Leave an "out," so as not to show-stop an installation if all of your design-time guesses turn out to be wrong.)
Last edited by sundialsvcs; 03-23-2016 at 01:19 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.