Solved

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

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

708 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now