Command to check java file in UNIX | Unix Linux Forums | UNIX for Advanced & Expert Users

  Go Back    


UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

Command to check java file in UNIX

UNIX for Advanced & Expert Users


Tags
unix, unix admin, unix commands

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 06-14-2013
AraR87 AraR87 is offline
Registered User
 
Join Date: Dec 2012
Last Activity: 9 July 2014, 8:05 AM EDT
Posts: 46
Thanks: 1
Thanked 2 Times in 2 Posts
Command to check java file in UNIX

Guys,

i need to check whether java file can be executed in my current unix system or not.
Can anyone please help me to get the correct command to check this.

My Unix system is HP-UX.

Thanks,
Sponsored Links
    #2  
Old 06-14-2013
DGPickett DGPickett is offline Forum Advisor  
Registered User
 
Join Date: Oct 2010
Last Activity: 18 December 2014, 4:59 PM EST
Location: Southern NJ, USA (Nord)
Posts: 4,560
Thanks: 8
Thanked 561 Times in 536 Posts

Code:
$ java -version
java version "1.6.0.15"
Java(TM) SE Runtime Environment (build 1.6.0.15-jinteg_20_jul_2012_02_27-b00)
Java HotSpot(TM) Server VM (build 20.8-b03-jre1.6.0.15-rc1b1 PA2.0 (aCC_AP), mixed mode)
$ which java
<my_home>/local/jre/bin/java
$

You may need to search for the java executable and put its directory in your PATH. The file java is a starter executable that sets up the environment and selects the right final JAVA executable, as I recall.
Code:
$ find local/jre -name java | xargs file  
local/jre/bin/java:     PA-RISC2.0 executable dynamically linked -not stripped
local/jre/bin/PA_RISC2.0/java:  PA-RISC2.0 executable dynamically linked -not stripped
local/jre/bin/PA_RISC2.0W/java: ELF-64 executable object file - PA-RISC 2.0 (LP64)

If it is missing, go to the HP binary archive and geta copy. https://h20392.www2.hp.com/portal/sw...r=HPUXJAVAHOME You can untar it somewhere under your home dir if you are not a root guy.

Last edited by DGPickett; 06-14-2013 at 12:17 PM..
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
running unix command from java madhu_sharan UNIX for Advanced & Expert Users 0 07-09-2012 07:48 AM
Check EOF char in Unix. OR To check file has been received completely from a remote system alexalex1 UNIX for Advanced & Expert Users 5 07-22-2010 08:48 PM
execute unix command from java eclips katzs500 Programming 0 08-05-2008 06:30 AM
execute command unix with java:possible or not? mips Shell Programming and Scripting 4 05-13-2004 08:07 AM
Executing UNIX command from java on NT CJ Walt UNIX for Dummies Questions & Answers 1 06-25-2003 02:39 PM



All times are GMT -4. The time now is 05:21 AM.