• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javac only returns 'Killed'

 
Jim Kavanagh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I just installed the java sdk 1.4.2 04 the other day on my linux machine and everything was fine.

But I came back to it the next day all it will say is "killed".

Example:
# ./java -version
Killed

I've tried google but "java" and "killed" come back with some interesting results.

Thanks for any help
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
did you execute the command in the JAVA/bin dir?
 
Jim Kavanagh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes,

The directory Im using is:
/usr/java/j2sdk1.4.2_04/bin

I set up $JAVA_HOME to point there as well (less the /bin) if that makes a difference.
 
Jason Fox
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe the /bin directory does make a difference, but I could be wrong. At least, my $JAVA_HOME includes it (per etc/profile on mdk 10) and java works fine for me. To clarify, I checked and I am running 1.4.2_04 as well. What distro/ kernel are you using?
[ May 17, 2004: Message edited by: Jason Fox ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The bin directory is not meant to be part of the JAVA_HOME environment variable. JAVA_HOME/bin is often included in the PATH environment variable.

I'm moving this to the Linux/UNIX forum, where folks might have an idea of what's going on...
 
Jim Kavanagh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm using mandrake 9.2, kernel 2.4.22.

Would upgrading to a newer version make any difference?
 
Stefan Wagner
Ranch Hand
Posts: 1923
Linux Postgres Database Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think so.

JAVA_HOME seems to be set properly, putting $JAVA_HOME/bin into the path is very useful.

I didn't ever encounter such an error with java on linux.

Have you tried
java
javac
jar
without argument?
 
Leslie Chaim
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try these commands

which java
type java
whereis java

What do you get?
 
Jim Kavanagh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I have tried java, javac, javadocs, and javah all with and with out commands.

This is what is returned when I enter those commands:
which java
/usr/java/java/bin/java
type java
java is /usr/java/java/bin/java
whereis java
java:
 
Jason Fox
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I'm recalling your earlier post correctly where you mention where you had java installed, I believe the output of 'whereis java' should be:

/usr/java/j2sdk1.4.2_04/bin

What is the output of $PATH?
[ May 18, 2004: Message edited by: Jason Fox ]
 
Leslie Chaim
Ranch Hand
Posts: 336
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
echo $PATH | tr ':' '\n'
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you literally typed:

./java -version

the shell is going to be looking in your current working directory for an executable named "java".

Leave off the "./" and just type

java -version
 
Jim Kavanagh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for all the help. I really appreciate it.

I gave up and upgraded to mandrake 10, because I read alot of posts of people complaining about security settings in mandrake 9.2.

Again, thanks alot!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic