?
Solved

Can't find javac

Posted on 2014-11-21
14
Medium Priority
?
577 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 57

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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Author Comment

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

Still get errors :-(


Error3
0
 
LVL 36

Accepted Solution

by:
Kimputer earned 1600 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 200 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 57

Assisted Solution

by:HainKurt
HainKurt earned 200 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 real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
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)
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…
Suggested Courses
Course of the Month13 days, 2 hours left to enroll

777 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