Reputation: 51
I am giving command like this bash-3.00$/app/jdk1.6.0_11/bin/java -version , it is giving error like bash-3.00: /app/jdk1.6.0_11/bin/java: invalid argument
Upvotes: 2
Views: 10235
Reputation: 4170
"Invalid argument" is the error you get on Solaris when you try running a SPARC binary on an x86 platform. Make sure the java runtime you have installed in /app is the right version for your hardware - you can use the file
command to check, for example:
% file /net/pkg/export/pkg.sparc.sunos5/gnu/bin/ls
/net/pkg/export/pkg.sparc.sunos5/gnu/bin/ls: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
% file /net/pkg/export/pkg.i386.sunos5/gnu/bin/tar
/net/pkg/export/pkg.i386.sunos5/gnu/bin/tar: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, not stripped
Upvotes: 10
Reputation: 25873
Try
bash-3.00$ source /app/jdk1.6.0_11/bin/java -version
or
bash-3.00$ . /app/jdk1.6.0_11/bin/java -version
I suggest you adding Java JDK path to your Bash PATH environment variable, so you don't have to write the whole path.
Upvotes: 0