Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Ant compilation problem
Ant compilation problem [message #301072] Thu, 23 March 2006 05:56 Go to next message
Eclipse UserFriend
Originally posted by: gws293.hotmail.com

I have been trying (unsuccessfully) to get Eclipse Ant to run a
compilation using the Eclipse compiler. I have found '000 of entries on
this subject, but never one that works for me.
1) I have the jdtCompilerAdapter.jar in my Ant properties ClassPath. The
jar is found in:
C:\eclipse\configuration\org.eclipse.osgi\bundles\107\1\.cp\

2)the build file is similar to the one found in the Eclipse help files, as
follows:
<?xml version="1.0" encoding="UTF-8"?>
<project name="compile" default="main" basedir="../.">
<property name="build.compiler"
value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
<property name="root" value="${basedir}"/>
<property name="destdir" value="bin" />
<target name="main">
<javac srcdir="." destdir="bin" classpath="${classpath}"
debug="off"/></target>
</project>

I receive the following error:

[javac] Compiling 38 source files to C:\eclipse\workspace\testproject\bin

BUILD FAILED
java.lang.NoClassDefFoundError:
org/eclipse/jdt/internal/compiler/impl/CompilerOptions

Any suggestions?
Many thanks
Re: Ant compilation problem [message #301073 is a reply to message #301072] Thu, 23 March 2006 05:59 Go to previous messageGo to next message
Darin Swanson is currently offline Darin SwansonFriend
Messages: 2386
Registered: July 2009
Senior Member
Are you running the build in the same or separate JRE from Eclipse?
To keep it simple, try running in the same JRE.
See the JRE tab for your Ant launch configuration for the Ant build.

HTH
Darins

"Exquisitus" <gws293@hotmail.com> wrote in message
news:af2d735b93cab248ab1aaf5b819657a4$1@www.eclipse.org...
> I have been trying (unsuccessfully) to get Eclipse Ant to run a
> compilation using the Eclipse compiler. I have found '000 of entries on
> this subject, but never one that works for me.
> 1) I have the jdtCompilerAdapter.jar in my Ant properties ClassPath. The
> jar is found in:
> C:\eclipse\configuration\org.eclipse.osgi\bundles\107\1\.cp\
>
> 2)the build file is similar to the one found in the Eclipse help files, as
> follows:
> <?xml version="1.0" encoding="UTF-8"?>
> <project name="compile" default="main" basedir="../.">
> <property name="build.compiler"
> value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
> <property name="root" value="${basedir}"/>
> <property name="destdir" value="bin" />
> <target name="main">
> <javac srcdir="." destdir="bin" classpath="${classpath}"
> debug="off"/></target>
> </project>
>
> I receive the following error:
>
> [javac] Compiling 38 source files to C:\eclipse\workspace\testproject\bin
>
> BUILD FAILED
> java.lang.NoClassDefFoundError:
> org/eclipse/jdt/internal/compiler/impl/CompilerOptions
>
> Any suggestions?
> Many thanks
>
>
Re: Ant compilation problem [message #301074 is a reply to message #301073] Thu, 23 March 2006 06:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gws293.hotmail.com

Thanks Darin for your prompt help, changing the setting for the JRE got
the compiler running, but I now receive '00s of compiler error messages
which I don't get when I compile in Eclipse. I think my external jars
required for compilation are not being found, but the classpath property
is set in my build file.
Any other good suggestions. You are doing well so far...


Darin Swanson wrote:

> Are you running the build in the same or separate JRE from Eclipse?
> To keep it simple, try running in the same JRE.
> See the JRE tab for your Ant launch configuration for the Ant build.

> HTH
> Darins

> "Exquisitus" <gws293@hotmail.com> wrote in message
> news:af2d735b93cab248ab1aaf5b819657a4$1@www.eclipse.org...
>> I have been trying (unsuccessfully) to get Eclipse Ant to run a
>> compilation using the Eclipse compiler. I have found '000 of entries on
>> this subject, but never one that works for me.
>> 1) I have the jdtCompilerAdapter.jar in my Ant properties ClassPath. The
>> jar is found in:
>> C:eclipseconfigurationorg.eclipse.osgibundles1071.cp
>>
>> 2)the build file is similar to the one found in the Eclipse help files, as
>> follows:
>> <?xml version="1.0" encoding="UTF-8"?>
>> <project name="compile" default="main" basedir="../.">
>> <property name="build.compiler"
>> value="org.eclipse.jdt.core.JDTCompilerAdapter"/>
>> <property name="root" value="${basedir}"/>
>> <property name="destdir" value="bin" />
>> <target name="main">
>> <javac srcdir="." destdir="bin" classpath="${classpath}"
>> debug="off"/></target>
>> </project>
>>
>> I receive the following error:
>>
>> [javac] Compiling 38 source files to C:eclipseworkspacetestprojectbin
>>
>> BUILD FAILED
>> java.lang.NoClassDefFoundError:
>> org/eclipse/jdt/internal/compiler/impl/CompilerOptions
>>
>> Any suggestions?
>> Many thanks
>>
>>
Re: Ant compilation problem [message #301075 is a reply to message #301074] Thu, 23 March 2006 08:36 Go to previous message
Eclipse UserFriend
Originally posted by: gws293.hotmail.com

Darin, please ignore my previous message. Your earlier one in fact
resolved the problem completely. I found that the reason why the libraries
were not found was entirely correct, a previous attempt at getting the
build file to run with a clean compile had deleted all the libraries! I
apologise for involving you in my mishap.
All is well now.
Many thanks
Previous Topic:building
Next Topic:Displaying a notification popup a la outlook
Goto Forum:
  


Current Time: Fri Apr 19 00:42:44 GMT 2024

Powered by FUDForum. Page generated in 0.01834 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top