LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing OpenJDK (http://www.linuxquestions.org/questions/linux-software-2/installing-openjdk-769944/)

MTK358 11-18-2009 08:09 AM

Installing OpenJDK
 
My Slackware installation came with Java, but I would rather have OpenJDK because it is completely free/open source and seems to work better with Linux/X Window System's way of doing things rather than being carried over from Windows.

So I did this:

Code:

# removepkg jre
# removepkg jdk

And then I downloaded the OpenJDK tarball here:

http://download.java.net/openjdk/jdk7/

I found the link that seemed appropriate, downloaded the tarball, and extracted it. then I typed make (there was no configure and a makefile was there already).

This showed up around the middle:

Code:

WARNING: LANG has been set to en_US, this can cause build failures.
        Try setting LANG to "C".
 
WARNING: The version of ant being used is older than
      the required version of '1.6.3'.
      The version of ant found was ''.

This around the end:

Code:

which: no ant in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/qt/bin:/usr/share/texmf/bin:.)
make[2]: Entering directory `/home/michael/downloads/packages/openjdk/langtools/make'
Makefile:161: *** 'ant' not found -- please set ANT_HOME or put 'ant' on your PATH.  Stop.
make[2]: Leaving directory `/home/michael/downloads/packages/openjdk/langtools/make'
make[1]: *** [langtools-build] Error 2
make[1]: Leaving directory `/home/michael/downloads/packages/openjdk'
make: *** [build_product_image] Error 2

So I understand that I need Ant, but it says in Ant's documentation that to install Ant I need Java. HOW IS THAT SUPPOSED TO WORK?!?!?

ozanbaba 11-18-2009 08:29 AM

Quote:

Originally Posted by MTK358 (Post 3761289)
My Slackware installation came with Java, but I would rather have OpenJDK because it is completely free/open source and seems to work better with Linux/X Window System's way of doing things rather than being carried over from Windows.

So I did this:

Code:

# removepkg jre
# removepkg jdk

And then I downloaded the OpenJDK tarball here:

http://download.java.net/openjdk/jdk7/

I found the link that seemed appropriate, downloaded the tarball, and extracted it. then I typed make (there was no configure and a makefile was there already).

This showed up around the middle:

Code:

WARNING: LANG has been set to en_US, this can cause build failures.
        Try setting LANG to "C".
 
WARNING: The version of ant being used is older than
      the required version of '1.6.3'.
      The version of ant found was ''.


use this "LANG=C make" and it will use LANG as C in the make run.

Quote:

This around the end:

Code:

which: no ant in (/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/qt/bin:/usr/share/texmf/bin:.)
make[2]: Entering directory `/home/michael/downloads/packages/openjdk/langtools/make'
Makefile:161: *** 'ant' not found -- please set ANT_HOME or put 'ant' on your PATH.  Stop.
make[2]: Leaving directory `/home/michael/downloads/packages/openjdk/langtools/make'
make[1]: *** [langtools-build] Error 2
make[1]: Leaving directory `/home/michael/downloads/packages/openjdk'
make: *** [build_product_image] Error 2

So I understand that I need Ant, but it says in Ant's documentation that to install Ant I need Java. HOW IS THAT SUPPOSED TO WORK?!?!?
yes that's stupied, i know what you mean. i guess you have to use stock Slackware java to install and run ant, then build the OpenJDK. before the install remove the stock Slackware java packages.


by the way, get ready for long compile.

Komakino 11-18-2009 08:35 AM

Couldn't you just put the sun jdk back on, install ant, install openJDK and then remove the sun jdk?


All times are GMT -5. The time now is 10:33 PM.