Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2013-05-22
4
Medium Priority
?
244 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 28

Assisted Solution

by:dpearson
dpearson earned 1000 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 1000 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
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 will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses

688 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