Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

JAVA: SDK: should the SDK be under same user running java apps?

Posted on 2013-05-22
4
232 Views
Last Modified: 2013-05-23
Hello Experts,

in linux, should the java SDK be under same user running java apps?

in other words,

ls -alt /usr/lib/java/jdk<version>
drwxr-xr-x 2 root root 4096 Mar 2 04:02 bin
.
.

ps -ef | grep user1
user1 96661 123321 0 Feb 26 ? 00:31:42 /usr/lib/java/jdk<version> -xms 128M.... Bootstrap start

see what I mean?
if yes, how come the application is working while having the SDK under root instead of user1?

Thanks for your help....
Regards
0
Comment
Question by:epifanio67
  • 2
4 Comments
 
LVL 27

Assisted Solution

by:dpearson
dpearson earned 250 total points
ID: 39189529
The permissions on the JDK: drwxr-xr-x 2 root root 4096 Mar 2 04:02 bin

are set so that all users can read and execute the binaries - so that's why user1 can use Java.

If you don't want that - change the permissions (with chmod) so that only root can read and execute the files under the SDK.

But usually you want all users to be allowed to use the base software on a machine, so what you have is a pretty normal setup.

Doug
0
 
LVL 86

Accepted Solution

by:
CEHJ earned 250 total points
ID: 39190153
in linux, should the java SDK be under same user running java apps?
No. Why would you think that? It's a program like any other

if yes, how come the application is working while having the SDK under root instead of user1?
Because there are world (others) execute permissions on the executable (java)
0
 

Author Closing Comment

by:epifanio67
ID: 39190718
thank you experts for your help...
regards,
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 39191735
:)
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
type mismatch (Object[] to double[] 4 33
Tomcat: Unable to run tomcat service. 2 23
throw exception 21 58
login form jsp example 2 35
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question