Those blank files were the root cause. If you are a newbie in these things, basic problems are always there.
Now I got it working. I thank both of you.
By the way, the command 'od -tc' is a strange one. This is for the first time I have learnt about it.
How did you find it?
Where can I read more about it?
Please tell me.
--------------------------------------------------------
I created a folder called Java1 and for the first time in my life I ran a java program unsuccessfully.
The following is the program:
-------------------------------------------------
class Hello {
public static void main(Strings args[]){
system.out.println("Hello, world");
}
}
--------------------------------------------------
The name of the program is 'Hello.java'
I copied the program from one of my UNIX books.
The book suggests to run 'javac Hello.java'.
I got the following output:
Ni@linux-3vxw:~/Java1> javac Hello.java
bash: javac: command not found
Ni@linux-3vxw:~/Java1>
The reason to get the above output is that the directory with 'javac' is not in the path.
I maybe wrong here. I am not good at guessing.
The following is my path:
---------------------------------------------------------------
Ni@linux-3vxw:~> $PATH
bash: /usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin:/usr/lib64/jvm/jre/bin:/usr/lib/mit/bin:/usr/lib/mit/sbin:/usr/lib/qt3/bin: No such file or directory
Ni@linux-3vxw:~>
---------------------------------------------------------------
I looked whether java is on my system. I just used the command 'find'. It is on the system.
Code:
Ni@linux-3vxw:~> su root
Password:
linux-3vxw:/home/Ni # find / -name java
/var/tmp/dirinstall/usr/share/java
/var/tmp/dirinstall/etc/java
/var/lib/rpm/alternatives/java
/usr/share/java
/usr/share/opera/java
/usr/share/swig/1.3.29/java
/usr/share/doc/packages/db/ref/java
/usr/share/doc/packages/libidn-devel/doc/java
/usr/lib64/java
/usr/lib64/jvm/java-1.5.0-sun-1.5.0_update14/jre/bin/java
/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre/bin/java
/usr/lib/ooo-2.0/share/Scripts/java
/usr/include/c++/4.1.2/java
/usr/include/c++/4.1.2/gnu/java
/usr/bin/java
/etc/java
/etc/alternatives/java
linux-3vxw:/home/Ni #
However, it didn't find 'javac'.
Code:
linux-3vxw:/home/Ni# find / -name javac
linux-3vxw:/home/Ni #
Your thoughts are welcome.