|
Why is Java so huge |
Oscar Giner
Member #2,207
April 2002
|
bamccaig said: The problem is moreso Windows than Java. It performs much better in GNU+Linux. You're so biased :/. Java runs just as bad on Linux than on Windows. (If you're noticing a significant difference in performance, it probably is because you have the 64-bit version in Linux, but the 32-bit version on Windows (Sun thinks all Windows users are stupid, and won't let you even download the 64 bit version if you're not surfing with IE 64 bit version ), see next paragraph for more). CursedTyrant said: Quick tip (in case somebody doesn't know that yet): Installing a 64-bit version of JRE on a 64-bit system will help Minecraft run smoother. This is true. Not only for Minecraft, but also for other Java based games, and the performance difference is pretty big. Now, if java 64 bit installer wasn't broken so I could install it (it gives me a weird error message at some point and the installation fails). -- |
Dizzy Egg
Member #10,824
March 2009
|
Can more people slate Java please as I hate the b*stard thing. People give me 17,295 reasons why Java is better than my beautiful C, and all 17,295 are as desperate as a crack whore 2 days after the benefit cheque is cashed. As always I'm inebriated, so more vocal than I should be, but with that in mind Java smells like an obese persons discharge and takes up just as much room. ~fin~
---------------------------------------------------- |
Arthur Kalliokoski
Second in Command
February 2005
|
Java was the 1990's version of BASIC. They all watch too much MSNBC... they get ideas. |
Felix-The-Ghost
Member #9,729
April 2008
|
Neil Walker said: A quick scan shows that BOOST comprises 37,000 files and 400MB of data. Now which is a bloated library. Stick that up your C++ arse Felix Boost is optional. All that Java crap seems mandatory. Originally this thread was just me wondering why it was so much bigger or even what a "framework" is other than bundling a bunch of stuff you won't use. Please tell me I'm wrong cause I don't really understand frameworks. Especially .NET :x Wait are frameworks something that needs to be run in a virtual environment instead of the native machine language? Is that what runtime things are for? |
Dizzy Egg
Member #10,824
March 2009
|
..again...desperate arguments
---------------------------------------------------- |
gnolam
Member #2,030
March 2002
|
James Lohr said: Though to be fair I'm just talking about powerful servers (32/64-core 3Ghz machines is what we have where I work). Yeah, when I say supercomputer, I mean something along the lines of the (at the time) TOP 500 beast we got to deploy our MPI code on. -- |
bamccaig
Member #7,536
July 2006
|
Felix-The-Ghost said: Boost is optional. All that Java crap seems mandatory. Originally this thread was just me wondering why it was so much bigger or even what a "framework" is other than bundling a bunch of stuff you won't use. Please tell me I'm wrong cause I don't really understand frameworks. Especially .NET :x Wait are frameworks something that needs to be run in a virtual environment instead of the native machine language? Is that what runtime things are for? A framework is just a related collection of libraries. Java and .NET both come with much larger standard libraries than C or C++. Which is good. It means that much more code can be reused and much fewer people reinvent the square wheel. You might not directly need those libraries, but Java software that you install might. You could either make the user's life Hell and make them go out and install those packages manually every time a new dependency occurs; bundle redundant copies of dependencies with software releases (like Windows DLLs), which results in a lot MORE wasted space; or you can install everything from the beginning and let developers rely on it being there. Since disk space and bandwidth are so cheap these days it's a no-brainer to do the latter. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
type568
Member #8,381
March 2007
|
bamccaig said: A 5 second Google search suggests that java.net.InetAddress.isReachable(int) sends a ping request and returns true if successful. Official SUN API says it only checks access to the host, by available means. You can't be sure a ping will be sent, not to mention the ability to specify various ping parameters like packet size ttl or wait for t/o
|
Arthur Kalliokoski
Second in Command
February 2005
|
bamccaig said: Since disk space and bandwidth are so cheap these days it's a no-brainer to do the latter. Well, yeah, when you had a simple BASIC program that simply asked your name, then said "Hi <name!", it had all the graphical stuff and the PC speaker "sound" routines in it anyway, compiled or interpreted. It was just easier to do it that way so the poor dears using it wouldn't get confused. They all watch too much MSNBC... they get ideas. |
bamccaig
Member #7,536
July 2006
|
type568 said: Official SUN API says it only checks access to the host, by available means. You can't be sure a ping will be sent, not to mention the ability to specify various ping parameters like packet size ttl or wait for t/o Well I don't really know anything about the technical implementation of ping requests... According to Wikipedia it's an ICMP echo request, which is very low-level (i.e., below TCP/UDP)... From another 3 minutes of Googling it sounds like a very low-level mechanism that is implemented through system calls (at least, in Windows, but likely also in UNIX because apparently only root can make it). So I don't think that you can directly do it in C or C++ either; you need to invoke a system call. I think that Java is able to call into C code so you could conceivably do the same thing with Java... I don't know for sure though. In any case, do you actually have a practical reason why this is needed (I've never needed it) or are you just being pedantic (it's a pretty arbitrary measure of language quality)? Arthur Kalliokoski said: Well, yeah, when you had a simple BASIC program that simply asked your name, then said "Hi <name!", it had all the graphical stuff and the PC speaker "sound" routines in it anyway, compiled or interpreted. It was just easier to do it that way so the poor dears using it wouldn't get confused. That's not the same thing at all... -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
MiquelFire
Member #3,110
January 2003
|
CursedTyrant said: Quick tip (in case somebody doesn't know that yet): Installing a 64-bit version of JRE on a 64-bit system will help Minecraft run smoother. My experience says otherwise. I installed 64-java for some other program, and I was confused as to why Minecraft was so damn jerky. This was during a time Minecraft ran at some 300 fps. --- |
type568
Member #8,381
March 2007
|
bamccaig said: In any case, do you actually have a practical reason why this is needed Yeah, I've been writing a program to run non-stop ping requests to a host, and collect statistics about a connection(loss, and delay). Of course various package sizes may produce various results, not to mention the actual number representing milliseconds elapsed being quite necessary. I ended up actually calling system ping and manually parsing it's test output. Also AFAIK this protocol isn't any below TCP/IP, it's just different.
|
Felix-The-Ghost
Member #9,729
April 2008
|
bamccaig said: (like Windows DLLs), which results in a lot MORE wasted space There's no way my programs/other programs I have use 700+ MB in space (e.g. alleg44.dll is a little more than 1 MB) but I see your point (standardized) |
bamccaig
Member #7,536
July 2006
|
type568 said: Also AFAIK this protocol isn't any below TCP/IP, it's just different. (2 seconds of Googling and 60 seconds of reading...) Apparently java.net.Socket is a plain TCP socket wrapper and java.net.DatagramSocket is a UDP socket wrapper. So if the ping protocol was on top of TCP or UDP then you could do it. Felix-The-Ghost said: There's no way my programs/other programs I have use 700+ MB in space (e.g. alleg44.dll is a little more than 1 MB)... So if you were to install about 700 typically packaged Allegro games in Windows then it would be wasting about 700 MB of disk space. But it's not just your Allegro games that do this. It's everything: your IDE, your Web browser, your music player, your video player, etc., etc., etc., and not all libraries are as small or optimized as Allegro. It's not even uncommon for MinGW (and other open source, UNIX-like software) runtimes to be bundled with software that use them because they can't reliably install to a system-wide location and can't rely on the user to install them. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Oscar Giner
Member #2,207
April 2002
|
bamccaig
Member #7,536
July 2006
|
Oscar Giner said: It is not. ICMP is a transport protocol (level 4 on the OSI model), like TCP or UDP are (so it doesn't sit on top of either of them). I already said that. Pay attention. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Oscar Giner
Member #2,207
April 2002
|
You said it in a previous post, my memory doesn't go that far . Anyway you said ICMP is below TCP/UDP, that's not true either, it's on par (they're all level 4 protocols). -- |
bamccaig
Member #7,536
July 2006
|
Oscar Giner said: Anyway you said ICMP is below TCP/UDP, that's not true either, it's on par (they're all level 4 protocols). -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
BAF
Member #2,981
December 2002
|
Actually, ICMP is a layer 3 protocol. It sits alongside IP, BGP, etc. So it technically is lower than TCP/UDP. [edit] Damn, beaten while reading/posting. Well, I'll finish the rest of my post then... Matthew Leverton said: every Java application I run maxes out memory There are some decent Java apps, but they are few and far between. Then again, it's just like PHP - the quality to junk ratio is quite low. bamccaig said: The problem is moreso Windows than Java. It performs much better in GNU+Linux. It's no different than the .NET framework. Installing that is a few hundred megabytes too, IIRC, depending on how much of it you install. The size of C:\Windows\Microsoft.NET on this workstation is 1009 MiB (almost a GiB). The fact that Microsoft's platform runs faster on their own OSes shouldn't surprise anyone for any number of reasons. I think that Java is more mature and more customizable though. Google makes extensive use of Java. You just gotta know what you're doing, I guess... Now we're blaming the operating system? As if Microsoft coded Windows specifically to slow down anything that isn't .NET. Where does Google make extensive use of Java? With Android? That's hardly relevant, because they're using a totally different runtime. I feel that .NET does a much better job than Java. Sure, it doesn't have official Linux support, but mono is very well done. |
bamccaig
Member #7,536
July 2006
|
BAF said: Now we're blaming the operating system? As if Microsoft coded Windows specifically to slow down anything that isn't .NET. They didn't have to. .NET is considered a first-class citizen in Windows. It's even installed directly in the C:\Windows path. Perhaps more significant than that though is that it's developed by the same company that develops the operating system, meaning that they are free and likely to take advantage of intimate knowledge of the system and use lower-level access to the system APIs to achieve their goals. For example, WinForms is effectively a wrapper over the Windows API (i.e., not really portable at all). Java, on the other hand, had a goal of being portable from day one, so I think that more effort is put into developing platform independence (something Microsoft doesn't really want and settles for as a compromise), which often means sacrificing performance. I don't know of any Java frameworks that use the native Windows GUI, but then I'm not a Java programmer so they might well exist. That's just one example though. It's likely that .NET takes great advantage of its heritage on the Microsoft platforms, which is something that Java can't possibly do to the same degree. Everybody knows that it isn't uncommon for Microsoft to not document or to poorly document parts of the API. It's perfectly reasonable to assume that their .NET implementation has lower-level access than Java does. BAF said: Where does Google make extensive use of Java? With Android? That's hardly relevant, because they're using a totally different runtime. I don't j0rb at Google so I don't know for sure, but I definitely get the impression that they use a lot of Java. What I do know:
BAF said: I feel that .NET does a much better job than Java. Sure, it doesn't have official Linux support, but mono is very well done. I like C#, the language, but I am regularly bitten by little or no documentation for parts of .NET, or at the very least hard to find documentation, and the ecosystem around .NET isn't very helpful. Maybe it's because I don't get certified on every namespace before using it , but I seem to encounter very obscure errors in every major library that I use in .NET, and they usually don't have workarounds or are very difficult to workaround or resolve. The core components in .NET are rather well put together, but the further you stray from there the more of a mess it becomes. There's a lot of redundancy that just doesn't make sense. It seems clear to me that departments within the .NET development teams don't seem to coordinate their efforts well. In any case, I'm not impressed with the APIs that I've used. Java is basically C# without a few syntactic sugar features that I can live without. And it's actually considered free by the Free Software Foundation (though it took its timing getting there), which is a big thing if you care about software freedoms. I doubt that the standard framework is any better than .NET, but I doubt it's any worse either. Just different. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Matthew Leverton
Supreme Loser
January 1999
|
BAF said: There are some decent Java apps, but they are few and far between. Then again, it's just like PHP - the quality to junk ratio is quite low. It shouldn't be true with Java. It is the "university" language. People are taught how to use it. Even good programmers write Java applications that suck. PHP junk is created by no-talent n00bs. |
Thomas Fjellstrom
Member #476
June 2000
|
Matthew Leverton said: It shouldn't be true with Java. It is the "university" language. People are taught how to use it. Even good programmers write Java applications that suck. Just because you were taught how to write code, doesn't mean you know how to write good code. -- |
verthex
Member #11,340
September 2009
|
Thomas Fjellstrom said: Just because you were taught how to write code, doesn't mean you know how to write good code. Of course not, since most teachers aren't good coders from the real world. They code bloated apps for college level courses such as applets. They never seem to make those things fast, they just work good enough. Plus Java is a language full of object passing (obviously) so its hard to make the code fast since OOP is the only program design available.
|
CursedTyrant
Member #7,080
April 2006
|
Hey, the guy who teaches us Java told us this is how we assign values to floats: float x = (float)0.0; I am not kidding. When confronted that it should be 0.0f without the cast, he said that "it is also okay". Go figure. --------- |
Neil Walker
Member #210
April 2000
|
Arthur Kalliokoski said: Java was the 1990's version of BASIC. so what is the 21st century equivalent we should be using then for developing embedded, gui, web or console based apps? Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
|
|