Solved

Can't find javac

Posted on 2014-11-21
14
557 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 ***
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 3
  • +1
14 Comments
 
LVL 36

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 19

Author Comment

by:*** Hopeleonie ***
ID: 40458382
Hi Kimputer

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

Error2
0
 
LVL 55

Expert Comment

by:Huseyin KAHRAMAN
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
Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

 
LVL 19

Author Comment

by:*** Hopeleonie ***
ID: 40458408
Hi HeinKurt

Still get errors :-(


Error3
0
 
LVL 36

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 19

Author Comment

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

Expert Comment

by:Kimputer
ID: 40458493
So, did you fix what I said (first and second point)?
0
 
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 55

Assisted Solution

by:Huseyin KAHRAMAN
Huseyin KAHRAMAN 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 19

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 19

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 19

Author Comment

by:*** Hopeleonie ***
ID: 40461453
Thanks CEHJ
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is about my first experience with programming Arduino.
Computer science students often experience many of the same frustrations when going through their engineering courses. This article presents seven tips I found useful when completing a bachelors and masters degree in computing which I believe may he…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Six Sigma Control Plans

689 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