Java compilation problem - path not set

Login or Register to Reply

Thread Tools Search this Thread
# 1  
Java compilation problem - path not set

I am compiling the Java program in the Command Prompt then one error has appeared that you did not have set the path of java folder then I also set the path to go in the environment variables but I have the same issue. What should I do to resolve this issue?

Moderator's Comments:
Mod Comment Please don't hijack others' threads.
Moved pertaining posts to own new thread.
Tried to find an adequate title.

Last edited by RudiC; 10-11-2018 at 03:48 AM..
# 2  
Hello Nancy, and welcome to the forums.

A good start would be to open a new thread for new questions.

Besides that, output created by that failed compilation would probably be helpful to determine the cause.
Please use code tags for that and specify the operating system you are using and java version in a new thread.

# 3  
It may help to confirm java is installed and what paths are currently set. If you will run the following and post them here this may help us to see how java is configured or what paths need to be added or changed:

$ which java

$ whereis java
java: /usr/bin/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz

You'll probably want to include the error message you received too, as it probably provides the path that application expecting and not being found. It may also have other helpful information about this problem.
# 4  
Here are some techniques which is helpful for solve the issue.

1.Find the Java path; it looks like this: C:\Program Files\Java\jdkxxxx\bin\
2.Start-menu search for "environment variable" to open the options dialog.
3.Examine PATH. Remove old Java paths.
4.Add the new Java path to PATH.
6.Close and re-open console/IDE.
# 5  
Such issues are usually caused by the fact that java installs to e.g. /usr/jdkxxxxx directory but most (but not all) packages look for java in a default directory of /usr/java or /usr/lib/java.

Therefore, a sysadmin needs to create a link so that the default pathname /usr/java actually points to the java version installed path.

Read this thread for the idea:
Strange issue installing Java 8

and see my post#6, although this is referring to fixing a similar issue with java runtime.

Last edited by hicksd8; 10-20-2018 at 03:42 PM..
Login or Register to Reply

Thread Tools Search this Thread
Search this Thread:
Advanced Search

More UNIX and Linux Forum Topics You Might Find Helpful
Set java classes path
I add some new java jar files in the old project, how can I edit the class path? How can I compile all the java classes by just type 'C':o... Programming
Java sting up path problem
Hi java programmers I'm a newbee to the Java. Could please help me to set the path correctly. I'm getting the following error. ----jGRASP exec: javac -g C:\Documents and Settings\bogugk\Desktop\ ----jGRASP wedge2 error: command "javac" not found. ---- This command...... Programming
Set java Path
Hey eveyone, I am new to unix, and I just installed java 6, however it doesn't recognize javac command I tried to set the path such as: set path="/usr/java/jdk1.6.0_06/bin/ but i still got the same error message. any ideas? -andi... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers
How to set path for java in UNIX
How to set path for java in UNIX?... UNIX for Dummies Questions & Answers
UNIX for Dummies Questions & Answers
problem in getting the path of environment variable set in bashrc in my shell script
hi all i have joined new to the group. i have set an variable in my bashrc file. .bashrc PROGHOME=/home/braf/braf/prog export PROGHOME but while using it in my shell script its path is not taken and i had to explicitly give the export command to set the path. in my script...... Shell Programming and Scripting
Shell Programming and Scripting