Does one need java locally?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

Does one need java locally?

Post by Mike3 »

So I saw there was a bunch of java stuff installed in puppy.

What is it there for, to do programming?

Or is it used to run apps and the like?

Do I need it?

Aren't the apps I have and download allready compiled when using the PPM or pgs or similar? If so why do I need java locally on my computer?

Is it if I wanna compile stuff locally?

Could I delete the javastuff and still have everything working?

User avatar
Wiz57
Moderator
Posts: 583
Joined: Fri Dec 13, 2019 3:54 pm
Location: Chickasha, OK USA
Has thanked: 78 times
Been thanked: 119 times

Re: Does one need java locally?

Post by Wiz57 »

What Java programs do you have installed in Puppy? I've used many different versions,
and NONE, that is ZERO of them, have any Java applications. To answer your question,
NO, YOU DON'T NEED JAVA.
I'm just curious as to which applications you think are java.
Wiz

Signature available upon request

Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

Re: Does one need java locally?

Post by Mike3 »

I haven't checked which apps use which programming language to be compile.

My point was, even though an app actually used java, would I need it locally to get these apps going if I download them from the PPM or from the pkgs.com site or as an appimage? Or are they then allready compiled?

User avatar
puppy_apprentice
Posts: 691
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Does one need java locally?

Post by puppy_apprentice »

Appimages should have everything what is needed to launch. Some java apps have own Java engine included in package (check if there is a jre directory inside).
All java apps are compiled to bytecode that only running on Java Virtual Machine.

User avatar
Wiz57
Moderator
Posts: 583
Joined: Fri Dec 13, 2019 3:54 pm
Location: Chickasha, OK USA
Has thanked: 78 times
Been thanked: 119 times

Re: Does one need java locally?

Post by Wiz57 »

Mike3 wrote: Sat Dec 04, 2021 1:49 pm

I haven't checked which apps use which programming language to be compile.

My point was, even though an app actually used java, would I need it locally to get these apps going if I download them from the PPM or from the pkgs.com site or as an appimage? Or are they then allready compiled?

No, that is not what you asked in your opening post...here is exactly what you posted...

"So I saw there was a bunch of java stuff installed in puppy.

What is it there for, to do programming?

Or is it used to run apps and the like?

Do I need it?

Aren't the apps I have and download allready compiled when using the PPM or pgs or similar? If so why do I need java locally on my computer?

Is it if I wanna compile stuff locally?

Could I delete the javastuff and still have everything working?"

I've already answered the last of those questions. You may have installed something that needs
Java to run, but without YOU informing US what those softwares are, WE cannot help you!
You do not need Java for Puppy Linux to operate as intended. Java is not installed by default in
the mainline Puppy releases. You have to actively CHOOSE to install Java.

Wiz

Signature available upon request

Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

Re: Does one need java locally?

Post by Mike3 »

puppy_apprentice wrote: Sat Dec 04, 2021 1:57 pm

Some java apps have own Java engine included in package.
All java apps are compiled to bytecode that only running on Java Virtual Machine.

So do I need a java virtual machine locally on my computer to run those apps?

I don't think java is installed on my computer, there is a button to install it. But yet there are like 100 java files on the computer, what are they for?

If I remember correctly isn't the point of java that it can run on any machine and compiles locally when downloaded ehere as other languages have to be adopted to the different machines? If so I suppose I would need java for java apps to run, but then again I did not check which apps I have that use java if any.

Is it possible ti run apps programmed in java without installing it locally on your computer?

Are apps I download with the PPM and from pkgs.org allready compiled?

If I download a java app and it is allready compiled, would I still need java installed locally to run it?

User avatar
puppy_apprentice
Posts: 691
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Does one need java locally?

Post by puppy_apprentice »

Every Java app needs JRE (Java Runtime Enviroment). Some apps are packaged without JRE so you have to install it first to run them. Some have own JRE in the package (those are portable packages) so you have to only use eg. app.sh after unpacking. You can run java apps directly from web page using Java Web Start. Some apps are written especially for web and those are Java applets (those needs Java plugin for the web browser). And we have Java servlets too that are running on the servers. At last we have midlets that we can run on the phones or on the emulator (that still need JRE installed first).

What Java app dou you want to run?

Mike3 wrote: Sat Dec 04, 2021 2:40 pm

But yet there are like 100 java files on the computer, what are they for?

If those file have extension .java those are source codes you have to compile them using JDK (Java Development Kit).
If those files have extension .jar or .class those are compiled java apps and you need JRE.

Open/LibreOffice use some Java stuff.

Last edited by puppy_apprentice on Sat Dec 04, 2021 4:06 pm, edited 1 time in total.
User avatar
mikeslr
Posts: 2955
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 910 times

Re: Does one need java locally?

Post by mikeslr »

Java is not only a 'programing language'. It's been around for a very long time and has been used as "platform application", like Wine, qt and qt5. By platform I am referring to a coordinated bunch of files providing well understood sub-systems and capabilities. Rather than building an application starting with absolutely nothing, programmers can start with that platform and build on to it. Because the platform is a readily available application, programmers can just package and make available their additions.
If you don't run Windows programs, you don't need Wine. If you don't run applications requiring Java --such as those found here, viewforum.php?f=165-- you don't need the Java application.
However, Java --as a platform-- has been a part of in some commonly used applications --such as web-browsers-- for so long that it just makes sense for the developers of that application to package Java and the routines they built upon it within that application. When they do that, again you don't have to install Java because the developer already has. However, usually when Java has been built into an application it does not become part of your operating system. It is not, by default, available to other applications. That's the case with the Java modules used by Web-browsers.
LibreOffice, on the other hand, takes a different approach. LibreOffice is, itself, constructed as a 'platform'. It's specific applications -e.g. writer, calc, impress, draw, etc.-- are built on that platform. As published, it is already a 270+ Mb download. IIRC, both its Base and Math components --and only those components-- require JAVA. But most Users of LibreOffice don't use those components. So, Java is not builtin, and if you need to use those components you'll have to install Java into your operating system.

kuman11
Posts: 113
Joined: Tue Aug 18, 2020 1:22 pm
Has thanked: 23 times
Been thanked: 2 times

Re: Does one need java locally?

Post by kuman11 »

mikeslr, check your pm's!

User avatar
mikeslr
Posts: 2955
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 910 times

Re: Does one need java locally?

Post by mikeslr »

kuman11 wrote: Sat Dec 04, 2021 4:29 pm

mikeslr, check your pm's!

I don' t want to. :lol: No news is always good news. :roll:

Mike3
Posts: 112
Joined: Fri Aug 28, 2020 1:26 pm
Been thanked: 1 time

Re: Does one need java locally?

Post by Mike3 »

puppy_apprentice wrote: Sat Dec 04, 2021 2:50 pm

If those file have extension .java those are source codes you have to compile them using JDK (Java Development Kit).
If those files have extension .jar or .class those are compiled java apps and you need JRE.

There are like 100 files named java or java something.

There is a file named: "jave" in : /etc/file/magic/java for example

Then there are files like:

javaif.sh
java.sh
javaif.conf
application_x-java-archive
javaclasspathdialog.ui
javaif
get_java
javaifchange
filetypes.java
main.java
java.lang
x-java-archive.xml
x-java.xml
java.nanorc

and so on.

But I don't think I have the JDK kit, does that mean those .java files are not compiled?

How can I check if the JDK kit is installed?

So is most of this javastuff to enable the libreoffice apps to work? I guess I would mainly use Libreoffice draw and writer. Will they still work if I remove all this java stuff? Math in libreoffice is that for like exel like documents and the like?

Are there any good libre office alternatives not using java at all?

User avatar
Wiz57
Moderator
Posts: 583
Joined: Fri Dec 13, 2019 3:54 pm
Location: Chickasha, OK USA
Has thanked: 78 times
Been thanked: 119 times

Re: Does one need java locally?

Post by Wiz57 »

@mikeslr
I don't know of very many web browsers that include Java, certainly none I've used.
When browsing and I encounter a site that runs Java web applets, beans, whatever
they call them now, I usually see some notification that I need some Java plugin in
order to use this applet.
It's been over 10 years that I can remember actually needing Java for anything.
Now, it is very common for people to confuse Java with JavaScript...the only thing
the 2 have in common is the unfortunate use of the term "Java" in the name "JavaScript",
and try as they have to get people using ECMAScript, most still term it JavaScript.
Though I really don't think that is confusing Mike3 in this instance...I have a suspicion
he has installed something from either PPM or somewhere that does have Java as a
prerequisite, but hasn't installed the actual JRE...but that's just a guess at this point.
Wiz

Signature available upon request

User avatar
puppy_apprentice
Posts: 691
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Does one need java locally?

Post by puppy_apprentice »

Those files in /etc are configuration files. Those are not applications.

User avatar
puppy_apprentice
Posts: 691
Joined: Tue Oct 06, 2020 8:43 pm
Location: land of bigos and schabowy ;)
Has thanked: 5 times
Been thanked: 115 times

Re: Does one need java locally?

Post by puppy_apprentice »

Mike3 wrote: Sat Dec 04, 2021 5:01 pm

Are there any good libre office alternatives not using java at all?

viewtopic.php?p=39042#p39042

User avatar
mikewalsh
Moderator
Posts: 6149
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 788 times
Been thanked: 1976 times

Re: Does one need java locally?

Post by mikewalsh »

@Mike3 :-

Many of those files you've mentioned are either (as puppy_apprentice says) configuration files, or else 'handler', 'mime-type' or other system files that enable Puppy to recognise, understand and generally otherwise interact with Java apps/files/code if, as & when it encounters it. I'll hazard a guess that most Linux distros have a bunch of these same types of files, and no......they aren't installed as a by-product of installing Java, they will be there simply on the 'off-chance' that the user may want to use Java applications. They'll be there in the ISO download for those distros, and will be there OOTB.

They take up very little space, and simply help to speed things up if the user wishes to use anything Java-based. If they weren't present, the system wouldn't know what to do with Java-based stuff.

---------------------------------------

As mikeslr says, Java itself has been around for a very, very long time. Its roots stretch well back before the turn of the century. It first appeared in 1995, offered by Sun Microsystems, who were acquired by Oracle ages ago.

The principle behind it is very simple; you write an application ONCE - and only once - and through the magic of Java it will run literally anywhere, regardless of platform. You can write a Java-based application in Linux, secure in the knowledge that it will run equally well on a Mac.....or on a Windows PC.....or an Amiga.....or under FreeBSD.....etc, etc.

You know why? Because the 'virtual machine' "engine" at the heart of the Java run-time (JRE) will compile the Java byte-code literally "on-the-fly", in real-time, as the application runs. For any action you take in a Java-based app, the code that enables that action to take place will have been compiled just a split-second before it actually happens. The only real downside to this is that Java is notoriously full of security holes; because the virtual machine engine is so complex, no matter how rigorously the developers try to patch all the holes in any given release, inevitably they introduce a bunch of new ones. It's an on-going process that I seriously doubt will ever be completed.....

As far as LibreOffice is concerned, I believe one part of one of its modules - the "Base" database module - has been written to take advantage of certain Java features. LibreOffice will run quite happily without Java being installed, and more than 90% of individuals will only ever use the word-processor module ("Writer") anyway....

Just out of curiosity, which Puppy are you running here..?

Mike. ;)

kuman11
Posts: 113
Joined: Tue Aug 18, 2020 1:22 pm
Has thanked: 23 times
Been thanked: 2 times

Re: Does one need java locally?

Post by kuman11 »

mikeslr wrote: Sat Dec 04, 2021 4:51 pm
kuman11 wrote: Sat Dec 04, 2021 4:29 pm

mikeslr, check your pm's!

I don' t want to. :lol: No news is always good news. :roll:

That's a bit strange, u used to be more active here ...

Post Reply

Return to “Users”