Hack Forums
[Java] Limits to Java - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [Java] Limits to Java (/showthread.php?tid=5758044)



Limits to Java - CompSec - Nov 25, 2017

Would love to hear from the experts what the limits are to Java.  Obviously with a stapline of 'write once run anywhere' one would think that it would be used by all for everything.  What can't you make in Java that you might say use C++ for?  

NOOB ALERT: Could Photoshop have been designed in Java as opposed to C++?


RE: Limits to Java - GenericSkid - Nov 25, 2017

Photoshop could indeed be rewritten in java. If you don't discount things like JNA then there is literally nothing you can't do that using only C++ could do. You just need to set your mind to it.

It is not used everywhere for a variety of reasons. One is that when it launched it wasn't exactly a speed demon, so it was impractical to adopt for complex work early one. However if anyone tells you that java is slow nowadays they're just clinging on to old history.


RE: Limits to Java - matt - Nov 25, 2017

(Nov 25, 2017 09:15 AM)GenericSkid Wrote:  Photoshop could indeed be rewritten in java. If you don't discount things like JNA then there is literally nothing you can't do that using only C++ could do. You just need to set your mind to it.

It is not used everywhere for a variety of reasons. One is that when it launched it wasn't exactly a speed demon, so it was impractical to adopt for complex work early one. However if anyone tells you that java is slow nowadays they're just clinging on to old history.

In fact there's a lot of situations where java is even more efficient than native languages especially with its advanced garbage collector


RE: Limits to Java - Mr. Kim - Nov 25, 2017

(Nov 25, 2017 12:41 PM)Midnight Blue™ Wrote:  In fact there's a lot of situations where java is even more efficient than native languages especially with its advanced garbage collector

I mean, that's only true if you write bad native code though


RE: Limits to Java - sexyPudding - Nov 26, 2017

Pretty much, Java is limited due to the JVM. Sure with JNI you can call C code and stooof ( Never used it ).

But the JVM is the limiting factor.

I'm not really experienced enough to give you a definite answer but i think c++ code allows you to run code directly on the 'Hardware' and allows you to write more effieient code esepecially when it comes down to graphics rendering etc.

Java code, like scala and all other JVM languages is compiled into byte code that the JVM can understand.