• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem build.xml and Ant : Don't find the class

 
Aymen Rebouh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello , I have a problem in my build.xml which doesn't find the main class :



galaxy is the name of my package
Univers.java my main and only class

My ant version : Apache Ant(TM) version 1.8.2 compiled on June 20 2012

So i position myself in the Tp1FormeJava and launch " ant " , and this is the error :



This is ma build.xml :




I'm hoping you will helping me

Edit : I changed galaxy/Univers by galaxy.Univers
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure that this file exists: ./Class/galaxy/Univers.class (starting from your basedir where build.xml is located)

I don't use a Mac, so I have no idea what the Finder screenshot is telling me (I'm not even sure that is from a Mac, I'm only guessing) - exactly what directory are the displayed Univers.class and Univers.java files located? I would have expected them to be located at
/Users/rebouhaymen/Desktop/Aymen/IUT/Java/Tp1FormeJava/Src/galaxy/Univers.java
and
/Users/rebouhaymen/Desktop/Aymen/IUT/Java/Tp1FormeJava/Class/galaxy/Univers.class
respectively.

By the way, what is the package declaration within Univers.java? I am assuming it is "package galaxy;" based on the definition of MainClass in the build.xml.
 
Aymen Rebouh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is like that :


/Users/rebouhaymen/Desktop/Aymen/IUT/Java/Tp1FormeJava/galaxy/Univers.java

what is the package declaration within Univers.java? That's say ? Univers.java have a package which is galaxy


 
Aymen Rebouh
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Edit : This is resolved . I finally abandonned my build.xml and create a new :-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic