Solved

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

Posted on 2013-05-22
4
226 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 26

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
diffSum example 4 37
web services creation SOAP vs REST 5 42
table example 4 29
jboss wildfly 10.1 10 95
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…

809 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