Apache Ant Error Java_home Is Not Defined Correctly
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you
Error: Java_home Is Not Defined Correctly. Ubuntu
might have Meta Discuss the workings and policies of this site java_home is not defined correctly windows About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or
Error Java_home Is Not Defined Correctly Ant
posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of error: java_home is not defined correctly jenkins 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up ant - JAVA_HOME is not defined correctly up vote 0 down vote favorite 1 I have installed java with the command sudo apt-get install openjdk-7-jdk and set the java home and path.But when I am trying to java_home is not defined correctly centos use ant I JAVA_HOME is not defined correctly. We cannot execute /usr/local/java/jre1.7.0_60/bin/java Please help me how to resolve this error. which java ----> /usr/bin/java java -version ---->java version "1.6.0_31" OpenJDK Runtime Environment (IcedTea6 1.13.3) (6b31-1.13.3-1ubuntu1~0.12.04.2) OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode) echo $JAVA_HOME -----> /usr/local/java/jre1.7.0_60 java ant share|improve this question edited Jun 5 '14 at 18:44 Sotirios Delimanolis 153k25244360 asked Jun 5 '14 at 18:43 algo1 40210 1 I think, it should JDK but not just JRE. –olyv Jun 5 '14 at 18:45 So, do you have an executable /usr/local/java/jre1.7.0_60/bin/java or not? Post ls or something. –PM 77-1 Jun 5 '14 at 18:53 Run update-java-alternatives -l and then update-java-alternatives -s with the openjdk-7-jdk you installed. –Elliott Frisch Jun 5 '14 at 18:57 usr$ ls --> bin games include lib local sbin share src –algo1 Jun 5 '14 at 19:03 add a comment| 1 Answer 1 active oldest votes up vote 0 d
Wiki Search Tutorials/Articles Search HCL Search Reviews Search ISOs Go to Page... LinuxQuestions.org > Forums > Linux Forums > Linux - Software [SOLVED] JAVA_HOME not
Error: Java_home Is Not Defined Correctly. We Cannot Execute /usr/lib/jvm/java-8-oracle/bin/java
defined User Name Remember Me? Password Linux - Software This forum is for error: java_home is not defined correctly. carbon cannot execute java Software issues. Having a problem installing a new program? Want to know which application is best for the job?
Jre_home Is Not Defined Correctly
Post your question in this forum. Notices Welcome to LinuxQuestions.org, a friendly and active Linux Community. You are currently viewing LQ as a guest. By joining our community you will have http://stackoverflow.com/questions/24067858/ant-java-home-is-not-defined-correctly the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.org? Visit the following links: Site Howto | Site FAQ | http://www.linuxquestions.org/questions/linux-software-2/java_home-not-defined-823345/ Sitemap | Register Now If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Introduction to Linux - A Hands on Guide This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter. For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own. Click Here to receive this Complete Guide absolutely free. Search this Thread 08-01-2010, 04:17 AM #1 tkmsr Member Registered: Oct 2006 Distribution: Ubuntu,Open Suse,Debian,Mac OS X P
Get Kubuntu Get Xubuntu Get Lubuntu Get UbuntuStudio Get Mythbuntu Get Edubuntu Get Ubuntu-GNOME Get UbuntuKylin Ubuntu Code of Conduct Ubuntu Wiki Community Wiki Other Support Launchpad https://ubuntuforums.org/showthread.php?t=1543461 Answers Ubuntu IRC Support AskUbuntu Official Documentation User Documentation Social Media Facebook Twitter https://bbs.archlinux.org/viewtopic.php?id=23570 Useful Links Distrowatch Bugs: Ubuntu PPAs: Ubuntu Web Upd8: Ubuntu OMG! Ubuntu Ubuntu Insights Planet Ubuntu Activity Page Please read before SSO login Advanced Search Forum The Ubuntu Forum Community Ubuntu Official Flavours Support Installation & Upgrades [SOLVED] JAVA_HOME not defined Having an Issue With Posting ? Do you want to help is not us debug the posting issues ? < is the place to report it, thanks ! Results 1 to 2 of 2 Thread: JAVA_HOME not defined Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode August 1st, 2010 #1 tapas_mishra View Profile View Forum Posts Private Message Quad Shot of Ubuntu Join Date Oct is not defined 2009 Beans 492 DistroUbuntu 10.04 Lucid Lynx JAVA_HOME not defined My OS Ubuntu 9.04 I installed java via Code: apt-get install sun-java6-jre also I downloaded ant-1.8.1 binary from here unpacked in in /usr/lib/apache-ant-1.8.1/ Created /etc/profile.d/ant.sh and /etc/profile.d/jdk.sh contents of /etc/profile.d/ant.sh are Code: export ANT_HOME=/usr/lib/apache-ant-1.8.1 export PATH=$ANT_HOME/bin:$PATH and /etc/profile.d/jdk.sh Code: export JAVA_HOME=/usr/lib/jvm/java-6-sun/bin export PATH=$JAVA_HOME/bin:$PATH Now logged out and logged in again in my system checked Code: echo $ANT_HOME /usr/lib/apache-ant-1.8.1 and Code: root@tapas-laptop:~# echo $JAVA_HOME /usr/lib/jvm/java-6-sun/bin After which I type on command prompt Code: ant and get the following error Code: Error: JAVA_HOME is not defined correctly. We cannot execute /usr/lib/jvm/java-6-sun/bin/bin/java both the file ant.sh and jdk.sh are executable Searched this on net Nothing useful seems to come across. Last edited by tapas_mishra; August 1st, 2010 at 10:20 AM. Adv Reply August 1st, 2010 #2 tapas_mishra View Profile View Forum Posts Private Message Quad Shot of Ubuntu Join Date Oct 2009 Beans 492 DistroUbuntu 10.04 Lucid Lynx Re: JAVA_HOME not defined Originally Posted by tapas_mishra My OS Ubuntu 9.04 [/code]and /etc/profile.d/jdk.sh Code: export JAVA_HOME=/usr/lib/jvm/java-6-sun/bin export PATH=$JAVA_HOME/bin:$PATH I got my mistake had incorrectly set JAVA_HOME to point to bin changing Code: JAVA_HOME=/usr/lib/jvm/java-6-sun/bin to Code:
entvex Member Registered: 2006-04-02 Posts: 52 apache-ant problem need it to complie freecol hallo i did just install apache-ant but when i try to run it i just get an error li'l post my log [root@archhost ~]# pacman -S apache-ant Targets: jdk-1_5_0_07-1 apache-ant-1.6.5-1 Total Package Size: 16.7 MB Proceed with upgrade? [Y/n] y :: Retrieving packages from extra... jdk-1_5_0_07-1 [################] 100% 14536K 75.2K/s 00:03:13 apache-ant-1.6.5-1 [################] 100% 2525K 69.9K/s 00:00:36 checking package integrity... done. loading package data... done. checking for file conflicts... done. installing jdk... done. The jre package is licensed software. You MUST read and agree to the license stored in /opt/java/LICENSE before using it. installing apache-ant... done. [root@archhost ~]# ant Error: JAVA_HOME is not defined correctly. We cannot execute java [root@archhost ~]# java -bash: java: command not found [root@archhost ~]# Linux can run on any thing... look at me[img]http://img53.imageshack.us/img53/8413/indexol8.png[/img] Offline #2 2006-07-27 22:27:09 Snowman Developer/Forum Fellow From: Montreal, Canada Registered: 2004-08-20 Posts: 5,212 Re: apache-ant problem need it to complie freecol To fix it, log out and relogin.If you don't want to logout now, run:source /etc/profile.d/jdk.shin a terminal and ant/java will work in that terminal. Offline #3 2006-07-28 08:41:50 entvex Member Registered: 2006-04-02 Posts: 52 Re: apache-ant problem need it to complie freecol heres my output agen[root@archhost ~]# source /etc/profile.d/jdk.sh[root@archhost ~]# antError: JAVA_HOME is not defined correctly. We cannot execute /opt/java/bin/java[root@archhost ~]# java-bash: java: command not found[root@archhost ~]#and i did try to logout and reboot still the same error Linux can run on any thing... look at me[img]http://img53.imageshack.us/img53/8413/indexol8.png[/img] Offline #4 2012-12-10 00:32:26 jarshvor Member Registered: 2012-07-26 Posts: 28 Re: apache-ant problem need it to complie freecol Snowman wrote:To fix it, log out and relogin.If you don't want to logout now, run:source /etc/profile.d/jdk.shin a terminal and ant/java will work in