- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Which Java is being used.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2013 02:37 AM
05-02-2013 02:37 AM
Which Java is being used.
Hello Alll,
We have Red hat Linux servers running SAP application. We have IBM and SUN java installed in it. Going further we will be installing SAP java. I am not sure which java is being used of the IBM and SUN.
How can i find which Java is being used i.e. IBM or SUN? Any specific command i can use?
Thanks
VJ
iGATE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2013 05:15 AM
05-02-2013 05:15 AM
Re: Which Java is being used.
First, you will need to determine the command and/or environment settings used when starting the Java application.
If the application is started with a script, you will need to check the script: there might be lines that set JAVA_HOME and/or PATH environment variables to point to a particular version of Java.
If the Java version is not determined explicitly at the application start-up script, you will need to look at the environment of the user that normally runs the application. The login scripts for that user might include JAVA_HOME and/or PATH settings that determine which version of Java will be used by default by that user.
If there are no application-specific nor user-specific settings, then you might use "which java" to see the pathname of the default Java interpreter (if there is a default Java interpreter).
Also, "java -version" might be useful to identify the manufacturer of a particular instance of Java.
If you see a "java" process in the process listing and want to know which version of Java it uses, make note of the PID of the process, then run "ls -l /proc/<PID>/exe". That will tell you the exact pathname of the java binary it uses.
Through the proc filesystem you can also take a peek at the environment variables of any running process, with a command like "strings /proc/<PID>/environ | less".