1 Reply Latest reply on Jul 3, 2013 8:35 AM by rsmeral

    seam setup Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

    carlos alex Newbie

       

      from    

      2.3.1.CR1

       

      A Framework for

      Enterprise Java

      2.2. Setting up a new project

       

      The first thing we need to do is configure seam-gen for your environment: JBoss AS installation

      directory, project workspace, and database connection. It's easy, just type:

      cd jboss-seam-2.3.0

      seam setup

       

      ++++++++++++++++++++

       

      on windows , command line

       

      D:\jboss\jboss-seam-2.3.1.CR1> seam setup

       

      generate the error:--->  seam setup Error: Could not find or load main class org.apache.tools.ant.launch.Launcher ...

       

      +++++++++++++++

      fix:

       

      edit the seam.bat

       

      instead:

       

      "%JAVA_HOME%\bin\java" -cp "%JAVA_HOME%\lib\tools.jar;%SEAM_HOME%\lib\gen\ant-launcher.jar;%SEAM_HOME%\lib\gen\ant-nodeps.jar;%SEAM_HOME%\lib\gen\ant.jar" -Dant.home="%SEAM_HOME%\lib" org.apache.tools.ant.launch.Launcher -buildfile "%SEAM_GEN_DIR%\build.xml" -Dworking.dir="%WORKING_DIR%" %*

       

      change to:

       

      "%JAVA_HOME%\bin\java" -cp "%JAVA_HOME%\lib\tools.jar;%SEAM_HOME%\build\lib\ant-launcher.jar;%SEAM_HOME%\build\lib\ant-nodeps.jar;%SEAM_HOME%\build\lib\ant.jar" -Dant.home="%SEAM_HOME%\lib" org.apache.tools.ant.launch.Launcher -buildfile "%SEAM_GEN_DIR%\build.xml" -Dworking.dir="%WORKING_DIR%" %*

       

       

      hope to save 1 hour of work to somebody ...