ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Corcoran" <Tom.Corco...@trilogycomms.com>
Subject RE: Package prefix with ant build & ClassNotFoundException
Date Thu, 02 Nov 2006 17:06:28 GMT
Hi Peter / Prashant,

It's my understanding that I can use the full name everywhere or put an
import statement at the top. However, when I put an import statement in
Intellij it goes gray which indicates it's an unused import statement.

Anyway, I replaced all class references with their full name. I did a
negative lookbehind regular expression search in my source to see there
were no occurrences of MyAppletExtension which were not
com.trilogycomms. MyAppletExtension. The only occurrence is 
public class MyAppletExtension extends JApplet 
However I still get that message that it is not found.

I also looked at my launch applet code and I was using
MyAppletExtension.class so I qualified that as above without result.

Prashant, I have not been able to figure out how to get Intellij to
produce a build script, I wrote my own.

Thanks, Tom.

-----Original Message-----
From: Peter Reilly [mailto:peter.kitt.reilly@gmail.com] 
Sent: 30 October 2006 20:59
To: Ant Users List
Subject: Re: Package prefix with ant build & ClassNotFoundException

The package of the class has changed, therefore
the classname has changed from ClassName to package.ClassName,
therefore the applet needs to be changed to
refer to the new classname.

Peter

> Tom Corcoran wrote:
> > I am using IntelliJ and have added a package prefix to my swing
project.
> > If my prefix is "com.mycompany", this means I can have my source in
> > <src> rather than <src/com/mycompany>. At the moment I can't make
the
> > physical change due to source control issues.
> >
> >
> >
> > An ant build works fine but when I run the applet I get a console
> > message :
> > java.lang.ClassNotFoundException MyAppletExtension
> > (where MyAppletExtension extends JApplet).
> >
> >
> >
> > I am assuming it can't find the class because of the prefix, but
maybe I
> > am wrong?
> >
> >
> >
> > The package prefix is contained in a Intellij inc file.  What do I
need
> > to change in the build file (see below) so it can find the classes?
> >
> >
> >
> > Thanks a lot,
> >
> >
> > Tom.
> >
> >
> >
> > Here's the ant parameters:
> >
> > <property name="src" location="src"/>
> > <property name="build" location="classes"/>
> > <property name="dist" location="jar"/>
> >
> > with targets :
> >
> > <target name="compile">
> > <javac srcdir="${src}" destdir="${build}"/>
> > </target>
> >
> > <target name="dist" depends="compile">
> > <jar jarfile="${dist}/MyApplet.jar" basedir="${build}"/>
> > </target>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message