Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Limitations of Java desktop applications?

I come from a C/C++ background and now do a lot of C# stuff.

Lately I have become interested in doing some projects in Java since playing around with the Android SDK.

I know that Java apps run in a sandbox that can limit their access to the system.

In a desktop/server application environment what kind of things are restricted?

like image 481
TWA Avatar asked Dec 08 '22 07:12

TWA


2 Answers

Java applications are much in a sandbox as .NET applications are in a sandbox. They both run on their respective virtual machines, and do have some limitations as to what they can do, but for the most part, they have a good deal of access to the system, including access to native code through certain calls.

You may be thinking about Java applets, which run inside a browser, and generally will be in a security sandbox that prevents access to the system resources such as local files. (This restriction can be circumvented by specifically granting access to the system to certain applets.)

Here's a section on Security Restrictions for applets from The Java Tutorials, which includes a list of restrictions placed on applets.

like image 87
coobird Avatar answered Dec 21 '22 14:12

coobird


Typically desktop and server application run with security disabled. However, Java and the JVM still have a robust type system, so you can't for instance cast to types that an object was not created with, cannot access freed memory and can't run off the end of buffers.

like image 39
Tom Hawtin - tackline Avatar answered Dec 21 '22 12:12

Tom Hawtin - tackline