FedoraForum.org - Fedora Support Forums and Community
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2005
    Posts
    601
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    BUILD FAILED: J2SE5 required

    I'm trying to build the code examples in "Thinking In Java" under FC11 and I keep throwing the error:

    Code:
    /java/TIJ4-code[191]% ant
    Buildfile: build.xml
    run:
    build:
    
    BUILD FAILED
    
    /java/TIJ4-code/build.xml:51: The following error occurred while executing this line:
    /java/TIJ4-code/object/build.xml:29: J2SE5 required
    
    Total time: 0 seconds
    I'm pretty sure this is a trivial problem to correct, but being new to java, I'm kind of lost. Googling led me to believe that jre-1_5_0_17-linux-i586.rpm was J2SE5 in Fedora speak, but installing it did not help. I do have java and jdk working along with the netbeans IDE, although I'm also experimenting with the commandline compilation, so I think my installation is relatively complete.

    Any help would be greatly appreciated.

    Daniel

  2. #2
    Join Date
    Mar 2005
    Location
    US
    Posts
    116
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    you probably want to make sure the correct java is being picked up in your PATH


    do 'java -version' If it says something like 'IceTea' for that particular build file you may need to change your PATH so that when you do 'java -version' it says something more like.

    java version "1.5.0_17"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)

  3. #3
    Join Date
    Feb 2005
    Posts
    601
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by fwelland
    you probably want to make sure the correct java is being picked up in your PATH


    do 'java -version' If it says something like 'IceTea' for that particular build file you may need to change your PATH so that when you do 'java -version' it says something more like.

    java version "1.5.0_17"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_17-b04)
    Thanks for the suggestion, but it turns out I was attempting to solve the wrong problem...

    After a bit of learning about ant, java, xml files, etc., I figured out to edit the build.xml files so that ant was testing for my installed java version (1.6) instead of 1.5. Now it is compiling everything as it should.

    Cheers,

    Daniel
    Last edited by parish; 2nd September 2009 at 03:33 AM. Reason: bad grammar

  4. #4
    Join Date
    Jul 2010
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile Re: BUILD FAILED: J2SE5 required

    Quote Originally Posted by parish
    Thanks for the suggestion, but it turns out I was attempting to solve the wrong problem...

    After a bit of learning about ant, java, xml files, etc., I figured out to edit the build.xml files so that ant was testing for my installed java version (1.6) instead of 1.5. Now it is compiling everything as it should.

    Cheers,

    Daniel
    How to chang the XML.I am a new from China.can you help me.my English is not well .thanks.
    give me some advise.
    Last edited by youthterm; 8th July 2010 at 03:58 PM.

Similar Threads

  1. build failed on x86_64
    By david.xiao.bj in forum Using Fedora
    Replies: 2
    Last Post: 16th January 2008, 03:07 AM
  2. build gcc-3.3.2 on Fedora core 6 failed
    By steven215 in forum Using Fedora
    Replies: 14
    Last Post: 28th March 2007, 06:35 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •