---
title: "JAVA_HOME does not point to the JDK"  
description: "JAVA_HOME does not point to the JDK"  
author: "Anonymous User"  
published: 2015-12-25  
updated: 2015-12-25  
canonical: https://www.mindstick.com/forum/33789/java_home-does-not-point-to-the-jdk  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# JAVA_HOME does not point to the JDK

I [am trying](https://answers.mindstick.com/qa/36834/which-two-programming-languages-should-i-master-in-if-i-am-trying-to-get-into-google-or-facebook) to follow a [tutorial](https://www.mindstick.com/articles/43918/how-to-design-table-using-bootstrap) about how to use ant to build and run [your application](https://www.mindstick.com/forum/34702/please-tell-me-what-is-cross-site-scripting-and-how-is-it-harmful-for-your-application). I've followed all the steps and have created the build [file](https://www.mindstick.com/articles/59/encrypting-and-decrypting-files-using-c-sharp), but when I try to run ant it gives me this error.\

```
BUILD FAILED /home/bilal/tmp/ant/build.xml:19: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "/usr/lib/jvm/java-6-openjdk/jre"
```

\
Any [ideas](https://www.mindstick.com/articles/43878/making-the-best-use-of-the-options-trade-ideas) how to [resolve this issue](https://answers.mindstick.com/qa/95728/why-is-my-website-adsense-ads-not-matching-with-my-content-and-how-do-i-resolve-this-issue) ?

## Replies

### Reply by Anonymous User

Make JAVA_HOME variable point to a jdk installation, not jre.\
You are referencing the runtime environment, not the development kit - it can't find the compiler because its not there.\
From the line you posted, which states you have open-jdk you can just remove the jre at end:\
export JAVA_HOME='/usr/lib/jvm/java-6-openjdk/'


---

Original Source: https://www.mindstick.com/forum/33789/java_home-does-not-point-to-the-jdk

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
