LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Can Java become the primary language on Linux? (https://www.linuxquestions.org/questions/programming-9/can-java-become-the-primary-language-on-linux-540157/)

chandru.in 03-24-2007 06:51 AM

Can Java become the primary language on Linux?
 
Now that Sun has GPL'd Java partially and would also be releasing it completely in GPL soon, can we expect more desktop applications to be written using Java?

acid_kewpie 03-24-2007 07:33 AM

Well it will *NEVER* be the primary one, as the kernel is written in c, so it will always be more common to interact with it in c. and of course java is not supposed to be used for lower level machine specific stuff, so is not technically able to do this. and it will *always* be slow compared to c...

Remember that just because code is GPL'd doesn't mean it's suddenly a functioning open source project. there's more to having a true community driven or influenced piece of software than the license attached to it.

chandru.in 03-24-2007 07:37 AM

Sorry, I think I did not get the meaning right. What I meant was, would Java be used to develop more desktop apps than, Python, Ruby, etc.

Of course, Java can never beat C/C++ on any platform.

indienick 03-24-2007 12:19 PM

I don't see why making GPL'ing Java would make it that much more popular...it's always been freely available, and there's not much to installing/using it - SUN Java, that is.

Nor, will it make it any more popular as far as using it for GUI application development. I really don't see how releasing something under the GPL can make it that much more...widespread. If it is free, it's free.

EDIT: Not to mention, building GUIs with the Swing API is a pain in the ass; more tedious than most.

jlliagre 03-24-2007 03:54 PM

Quote:

Originally Posted by chandru.in
Now that Sun has GPL'd Java partially and would also be releasing it completely in GPL soon, can we expect more desktop applications to be written using Java?

Probably, or at least will we see more of these Java applications running on Linux desktops.

GPL'ing Java is allowing now even the most die-hard linux distributions to bundle the JVM, this is removing a barrier to adoption for Linux desktop users.

Java beeing free (as free beer) since its first release, there is already a large Open Source community supporting Java, regardless of this GPL announcement.

The most active sourceForge project is currently a java desktop application (Azureus) and on the same site, there is now certainly more Java projects than in any other language http://www.cs.berkeley.edu/~flab/languages.html .

One of the Open Source Java projects, not hosted on SourceForge but on the more Java oriented java.net, JDIC https://jdic.dev.java.net/ was used as a base for Java SE 6 improvement in desktop integration. http://www.devx.com/Java/Article/30722/0/page/2

Another point is the startup and compilation improvements in latests Java releases that make, along with modern desktops H/W capabilities, criticism and misconceptions around Java performance becoming more and more irrelevant.

My current favorites Open Source desktop java applications are netbeans (IDE), especially since I installed the jVI module, Jalbum (photography), GenJ (Genealogy) and ArtOfIllusion (3D Modeling).

Another Java desktop project I'm watching the progress is looking-glass.

bigearsbilly 03-26-2007 02:38 AM

god I hope not, I'll have to buy more RAM
;)

sundialsvcs 03-26-2007 08:52 PM

I'm afraid that here I must shamelessly opine that "Java is what happens when a language is designed by a committee."

The runtime support package for Java on my OS/X box is more than fifty-three megabytes. That's a huge footprint. And furthermore, it runs some versions of Java programs but not others. So, the language fails in its intended purpose of being a "lingua franca."

When Java is released as open-source, I read this as an indication that the vendor is putting the whole thing out to pasture. I have no idea how they could seriously consider it to be a source of revenue... It's never going to change the world.

ta0kira 03-26-2007 09:27 PM

I think it's more of an X question than Linux. Java doesn't do much for daemons, command lines, and low-level processes. Also, it's pretty slow if it really has to do serious thinking work because of the extra layer(s) involved in portability. Plus quite a bit of overhead, etc. Even C++ is overkill for certain types of Linux programs. In order to do ANYTHING it still needs an interpreter written in another programming language to interface with the OS.
ta0kira

Zention 03-26-2007 10:31 PM

dear god I hope not :)

Java is a funny old language, it really is the most hyped and marketed language out there thanks to Sun.

Originally designed to be a language for multimedia TVs, when that did not take off it repositioned itself as the applet (which because of early adoption it has remained king in that domain - well perhaps activeX offers better control of remote systems).

Java is not a dynamic language but does fall into the same category as Perl, Python, and Ruby but it is more verbose than either of these.

All of them use virtual machines to allow cross platform compatibility.

Java does type checking upfront, though with Perl, Python and Ruby type checking occurs at execution.

I think we will see both sides move to a way of type checking upfront and allowing for dynamic type checking when required.

Cross platform GUIs are met nicely with Tk and Wx.

So, it starts to boil down to the syntax used and tools to help the development process along.

And there Java is verbose and unwieldy, verbose to read and write, Python is succinct, and Perl is cryptic in its shorthand.

Python has some nice ways of passing parameters - most of the time you should pass as reference (very rarely is it better to pass as value) in Python that is inbuilt.

Introspection is a valuable tool in the development process - Java is also quite unwieldy there.

Haskell and OCaml are making some inroads in places and Lisp is still there.

People don't have fun writing Java generally, and the other languages tend to be a bit sexier,

http://www.linuxjournal.com/article/2070

Java is muzak, even if muzak was open to be copied I bet it would not get downloaded very often.

IBall 03-26-2007 10:39 PM

Java may increase slightly, since there are benefits to having a cross-platform language.

Since GUI programs written in C or C++ are generally dependent on either GTK or Qt, programs that are written for Gnome will not run perfectly under KDE. If the JVM could be improved with regards to efficiency, then maybe GUI apps could be written in Java more effectively than C.

Also, if there was a good compiler for Java, that compiled into native machine code and only included the required parts of Java in the binary then it could find more usage in lower level programming.

--Ian

nmh+linuxquestions.o 03-27-2007 02:23 AM

Quote:

Originally Posted by IBall
<cut>
Since GUI programs written in C or C++ are generally dependent on either GTK or Qt, programs that are written for Gnome will not run perfectly under KDE. If the JVM could be improved with regards to efficiency, then maybe GUI apps could be written in Java more effectively than C.
<cut>
--Ian

Speaking to just this point - writing GUI apps in C seems a bad idea to me, though most of my experience has been Python GUI /CUI and C CUI work.

larrynewt 03-27-2007 02:45 AM

Java will not become a primary language on Linux b/c we already have a dominant statically typed C-like language (namely, C). C is faster, better suited to Unix coding and more people know it. And from what I can see, open sourcers much prefer dynamically typed interactive languages. That's why ruby, python, perl, php, etc will continue to reign supreme. Licensing under GPL won't change much.

bigearsbilly 03-27-2007 02:55 AM

java.Lang.OutOfMemory

xhi 03-27-2007 09:07 AM

one thing to remember when discounting java because of the resources it consumes, is that on many systems nowadays there is an excess of resources. a java app that uses twice as much memory as its <enter your language here> counterpart is normally far less expensive to develop and buying an extra X gigs of memory is typically far cheaper than developing in a *more efficient* language.

as for the original question, i dont know if it will help or hurt. i thought java was included on most distros anyhow before it was open sourced. but as far as passing C, that wont happen.

(PS there are many examples of java running some pretty complex applications, so resource problems are usually a sign of a poor implementation)

bigearsbilly 03-27-2007 09:17 AM

Quote:

on many systems nowadays there is an excess of resources.
that's a poor excuse for sloppy programming.

wait till you have a multiple projects on a server wanting
4 Gig Heap sizes for their college-boy coded java/weblogic apps ;)
(like what we do)

groan

"excuse me, can you turn your heap down a bit, thanks"


All times are GMT -5. The time now is 01:33 AM.