Solved

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

Posted on 2013-05-22
4
235 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
[X]
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
  • 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

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 41
servlet example 17 59
mysql jsp example issue 32 75
Java pass by reference 3 23
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…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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 basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

726 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