Solved

Can't find javac

Posted on 2014-11-21
14
547 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 19

Author Comment

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

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

Error2
0
 
LVL 52

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
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 
LVL 19

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 19

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
 
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 52

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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Jquery driving me nuts... 14 28
Html date format 9 20
How to pass values to HTML-5 attribute dynamically? 24 51
Java array sort 10 35
This article discusses how to create an extensible mechanism for linked drop downs.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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)

726 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