Help - Search - Members - Calendar
Full Version: Linux Crash
Linuxhelp > Support > Technical Support

Here's the error am getting which is bogging me and am not able to
run any command on linux

I just updated the profile file with the java1.3 I installed and everything is gone.My X server is giving this error and also the command prompt. It does not recognise any of the basic commands even
ie ls or man or anything, for everything its giving the following error

-bash:/usr/java/j2sdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin :no such file or directory
-bash:dircolors:command not found
-bash:unicode_start:command not found
-bash:cut not found
-bash:id:command not found
-bash:[:too many arguments
-bash:tbut:command not found
-bash:wc:command not found
-bash:[::integer expr expected
[root@localhost root]#

anyone can please get me out of this problem.

thank you and regards.
What distribution are you running? Can you paste your profile file.
it could be a problem with your PATH .... if you have no PATH, only a few built in commands from bash work.

Try this (all one line):

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH

and see if you can execute things again...

If this fixes the problem, then you must figure out what caused the issue...

Does it happen with all users or just the currently logged in user?
Hughes' solution was great. The system is working but still I am not out of the problem. When I say "javac" at the prompt the usual output doesn't come but it shows "gcj:no input files." And when I input some file to "gcj" or "javac" they do not recognise the "Swing" package. I find that the "libgcj" that came with my RedHat9 distribution(kernel 2.4.20-8) doesn't contain the swing package.
I type javac and the command is processed by gcj!! which I don't want to happen.
Also if I set "PATH=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin;" it works, but only in that particular command window.

The mistake::
export JAVA_HOME=/usr/java/jdk1.3.1_02:$JAVA_HOME
export J2EE_HOME=/usr/java/j2sdkee1.3.1:$J2EE_HOME
export PATH=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin:$PATH
export CLASSPATH=/usr/java/j2sdkee1.3.1/lib/j2ee.jar:$CLASSPATH

After correction::

but no use.

How else do I set the path for java??

Here's a sequence of steps where the error may be clear to your eyes...

[kanth@localhost kanth]$ su -
-bash: =/usr/java/jdk1.3.1_02: No such file or directory
-bash: =/usr/java/j2sdkee1.3.1: No such file or directory
-bash: /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X11:/usr/X11R6/bin=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin: No such file or directory
-bash: =/usr/java/jdk1.3.1_02/src.jar:/usr/java/j2sdkee1.3.1/lib/j2ee.jar: No such file or directory
[root@localhost root]# javac
gcj: no input files
[root@localhost root]# j2ee
-bash: j2ee: command not found
[root@localhost root]# PATH=/usr/java/jdk1.3.1_02/bin:/usr/java/j2sdkee1.3.1/bin; export PATH
[root@localhost root]# javac
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-O Optimize; may hinder debugging or enlarge class file -nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are used
-classpath <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-target <release> Generate class files for specific VM version

[root@localhost root]# j2ee
/usr/java/j2sdkee1.3.1/bin/j2ee: line 1: dirname: command not found
/usr/java/j2sdkee1.3.1/bin/j2ee: line 9: / No such file or directory
[root@localhost root]#

Thank you and regards.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.