• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 706
  • Last Modified:

Can't find javac

Hi

I need to compile a Java software.
But the javac command can not be found.

What is wrong ?

Error
What I did :
- installed jdk-8u25-windows-i586.exe and  jdk-8u25-windows-x64.exe http://java.sun.com/javase/downloads/index.jsp
- restarted the client
- set the variables

Many thanks in advance
0
*** Hopeleonie ***
Asked:
*** Hopeleonie ***
  • 6
  • 3
  • 3
  • +1
3 Solutions
 
KimputerCommented:
Almos there, in the window System section, you see the scrollbar can be dragged down, there's a PATH variable, add the path there. Edit, then type in an extra semicolon (as in ;) and the path.

Best restore TMP and TEMP back to %USERPROFILE%\AppData\Local\Temp
0
 
*** Hopeleonie ***IT ManagerAuthor Commented:
Hi Kimputer

Did it and restarted the client but same error :-(

Error2
0
 
HainKurtSr. System AnalystCommented:
or go to java folder and run it from there

or use full path to java in command line

cd java_path
javac .....

or

java_path\javac ....


or run this

set path=%path%;java_path
javac ....
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
*** Hopeleonie ***IT ManagerAuthor Commented:
Hi HeinKurt

Still get errors :-(


Error3
0
 
KimputerCommented:
First, you fill it in without quotes. (in the PATH env)
Second, you need to add "\bin" (without the quotes).
And maybe a third, if there was already something filled in, did you overwrite it? Put it back if there was, because otherwise you might have broken other apps.
0
 
*** Hopeleonie ***IT ManagerAuthor Commented:
@Kimputer
This was only a VM (no other apps). Did a reset to default.
0
 
KimputerCommented:
So, did you fix what I said (first and second point)?
0
 
CEHJCommented:
a. Set JAVA_HOME to C:\Program Files\jdk-8u25-windows-x64
b. Prepend to PATH
%JAVA_HOME%\bin;
0
 
HainKurtSr. System AnalystCommented:
javac is in bin folder...

so your java_path should be "C:\Program Files\jdk-8u25-windows-x64\bin"

The rest is same:

cd C:\Program Files\jdk-8u25-windows-x64\bin
javac .....

or

C:\Program Files\jdk-8u25-windows-x64\bin\javac ....


or run this

set path=%path%;C:\Program Files\jdk-8u25-windows-x64\bin;
javac ....
0
 
CEHJCommented:
You usually want to prepend to PATH or you might find you get the wrong bin directory, having missed one buried deep
0
 
*** Hopeleonie ***IT ManagerAuthor Commented:
I checked on my office computer and the solution was Kimputer’s post ID: 40458411
But I’m awarding points to all others who tried to help me here. I hope Kimputer has nothing against it. :-)
0
 
*** Hopeleonie ***IT ManagerAuthor Commented:
Thank to all of you.
0
 
CEHJCommented:
Bear in mind that some software requires JAVA_HOME to be set
0
 
*** Hopeleonie ***IT ManagerAuthor Commented:
Thanks CEHJ
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 6
  • 3
  • 3
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now