Hi,
I am new to linux and i want to run java code in linux.
Am using Redhat Enterprise linux 5.
I think java is installed (i mean built in)
When i write a java code in vi editor, its syntax is recognized, example keywords are highlighted.
i know how to run.For example, if 'sample' is java file name,
> javac sample.java
> java sample
will give output.
but the error i am getting is : \bash ' javac' is not a command
i think the problem might be that path is not set.
Can anyone tell me how to set path.
As you said ' To set PATH, open the ~/.bashrc file '
i want to know where is 'bashrc' located.
Um, the tilde (~) equates to your home directory, so ~/.bashrc is the location of the file. If the file does not exist, you can create it.
[code]And i can see that java is installed in 'root/bin/java'.
I assume that is a type and you mean to type "/root/bin/java".
Are you logged in as root by any chance. If so, don't do that. You should have a separate user account that you always log into. And I am also guessing that you downloaded the *.bin file, and not the *-rpm.bin file, for Sun's web site.
I have ' KDevelop' an IDE used for multiple languages installed in linux.
how can i run java in it.
I know nothing about KDevelop - I use Eclipse. Perhaps someone who uses KDevelop can help.
swapna valupadasu wrote:
but the error i am getting is : \bash ' javac' is not a command
i think the problem might be that path is not set.
Can anyone tell me how to set path.
You should be precise when reporting errors, because sometimes a single blank makes a difference. The name of the compiler is 'javac', not ' javac', but I guess this is a reporting error.
The backslash in front of bash is surprising too.
'root/bin' looks like a misinterpretation. There is the homedirectory of root, named '/root', and there is the root of the filesystem named '/', but often simply named root too.
But javac is normally put to /usr/bin/javac, not /bin/javac by the installationprocess.