Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » building a project(ide runs project yet the build file does not compile : import prob)
building a project [message #1039037] Thu, 11 April 2013 13:07
Steve Howerton is currently offline Steve Howerton
Messages: 5
Registered: April 2013
Junior Member
Hello
I just started using eclipse and I am learning build.xml etc.

I had to comment out code below because the ant build would not compile the class.
I have junit.jar in the path and JUNIT4 in the project and I have imported every library that eclipse had.


> ant f  build.xml main



package model.test;

import model.math.MyMath;

import com.toedter.calendar.JCalendar;


public class Main {
	public static JCalendar myJCalendar;
	
  public static void main(String[] args) {
	  
	  displayCalendar();
	  
    MyMath math = new MyMath();
    System.out.println("Result is: " + math.multi(5, 10));
  }
  private static void displayCalendar() {
      myJCalendar = new com.toedter.calendar.JCalendar();
                 myJCalendar.main(null);
 }

} 



when it is commented out it does the basic operations. Here is some output


compile:
     [echo] "================ COMPILE ================="
     [echo] =================== Create a classpath container =============
======
     [echo] C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\ecl
pse\com.cisumma.build.ant.first\target_com.cisumma.build.ant.first\com.cis
mma.build.ant.first\src
     [echo] C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\ecl
pse\com.cisumma.build.ant.first\target_com.cisumma.build.ant.first\com.cis
mma.build.ant.first\build
    [javac] C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\ecl
pse\com.cisumma.build.ant.first\target_com.cisumma.build.ant.first\com.cis
mma.build.ant.first\build.xml:88: warning: 'includeantruntime' was not set
 defaulting to build.sysclasspath=last; set to false for repeatable builds
    [javac] Compiling 3 source files to C:\Users\Steves\Documents\ceyesumm
\java_cache\my_projects\eclipse\com.cisumma.build.ant.first\target_com.cis
mma.build.ant.first\com.cisumma.build.ant.first\build\classes
    [javac] C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\ecl
pse\com.cisumma.build.ant.first\target_com.cisumma.build.ant.first\com.cis
mma.build.ant.first\src\model\test\Main.java:5: error: package com.toedter
calendar does not exist
    [javac] import com.toedter.calendar.JCalendar;
    [javac]                            ^
    [javac] C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\ecl
pse\com.cisumma.build.ant.first\target_com.cisumma.build.ant.first\com.cis
mma.build.ant.first\src\model\test\Main.java:9: error: cannot find symbol
    [javac]     public static JCalendar myJCalendar;
    [javac]                   ^
    [javac]   symbol:   class JCalendar
    [javac]   location: class Main
    [javac] C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\ecl
pse\com.cisumma.build.ant.first\target_com.cisumma.build.ant.first\com.cis
mma.build.ant.first\src\model\test\Main.java:19: error: package com.toedte
.calendar does not exist
    [javac]       myJCalendar = new com.toedter.calendar.JCalendar();
    [javac]                                             ^
    [javac] 3 errors

BUILD FAILED
C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\eclipse\com.cis
mma.build.ant.first\target_com.cisumma.build.ant.first\com.cisumma.build.a
t.first\build.xml:88: Compile failed; see the compiler error output for de
ails.

Total time: 1 second
C:\ant\apache-ant-1.8.1\bin>


[code]


Previous Topic:How do I include a custom file in the generated javadoc output?
Next Topic:javadoc eror: illegal package name
Goto Forum:
  


Current Time: Thu Jul 31 01:26:07 EDT 2014

Powered by FUDForum. Page generated in 0.23384 seconds