Solved

Can't find javac

Posted on 2014-11-21
14
509 Views
Last Modified: 2014-11-23
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
Comment
Question by:hopeleonie
  • 6
  • 3
  • 3
  • +1
14 Comments
 
LVL 35

Expert Comment

by:Kimputer
ID: 40458333
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
 
LVL 18

Author Comment

by:hopeleonie
ID: 40458382
Hi Kimputer

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

Error2
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 40458386
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
 
LVL 18

Author Comment

by:hopeleonie
ID: 40458408
Hi HeinKurt

Still get errors :-(


Error3
0
 
LVL 35

Accepted Solution

by:
Kimputer earned 400 total points
ID: 40458411
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
 
LVL 18

Author Comment

by:hopeleonie
ID: 40458425
@Kimputer
This was only a VM (no other apps). Did a reset to default.
0
 
LVL 35

Expert Comment

by:Kimputer
ID: 40458493
So, did you fix what I said (first and second point)?
0
Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 50 total points
ID: 40458669
a. Set JAVA_HOME to C:\Program Files\jdk-8u25-windows-x64
b. Prepend to PATH
%JAVA_HOME%\bin;
0
 
LVL 51

Assisted Solution

by:HainKurt
HainKurt earned 50 total points
ID: 40459958
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
 
LVL 86

Expert Comment

by:CEHJ
ID: 40460016
You usually want to prepend to PATH or you might find you get the wrong bin directory, having missed one buried deep
0
 
LVL 18

Author Comment

by:hopeleonie
ID: 40460853
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
 
LVL 18

Author Closing Comment

by:hopeleonie
ID: 40460859
Thank to all of you.
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 40460929
Bear in mind that some software requires JAVA_HOME to be set
0
 
LVL 18

Author Comment

by:hopeleonie
ID: 40461453
Thanks CEHJ
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A short article about problems I had with the new location API and permissions in Marshmallow
This article discusses how to create an extensible mechanism for linked drop downs.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now