new File(".") [message #123120] |
Fri, 05 September 2003 11:12  |
Eclipse User |
|
|
|
Originally posted by: npatel.indigostone.com
Dear Friends,
I am running a simple test which shows some descripancy between buliding
from ant within eclipse and build from eclipse run facility. I ran simple
check program from eclipse and ant and found following results.
From ANT: c:\eclipse\TEST.TXT
From eclipse run: c:\nilesh\env\TEST.TXT
Please note that eclipse was started from "c:\eclipse" and then java project
was created with path "c:\nilesh\env"
JAVA FILE:
import java.io.File;
public class pathCheck
{
public static void main(String[] args)
{
pathCheck t = new pathCheck();
File file = new File("TEST.TXT");
System.out.println("FILE PATH = " + file.getAbsolutePath());
}
}
I don't know why running from ant replaces project path with eclipse
start-up path. I would like to configure ant such that project path
("c:\nilesh\env") gets taken as base dir of pathCheck class. Please help.
Love you all,
nilesh
|
|
|
|
|
|
Re: new File(".") [message #123213 is a reply to message #123204] |
Fri, 05 September 2003 12:27   |
Eclipse User |
|
|
|
Originally posted by: npatel.indigostone.com
Hi,
I just looked at ant manual, and found that java task is associated with
attribute called "fork=true/false",. By default it is false. By setting it
to true, it runs in external jvm and provides the results as required.
Thanks for everyones effort and if you guys have anyt comment or disagree
with my message, then please write me back.
Thanks in the meantime, and I must admit, I am beginning to adopt eclipse
platform as opposed to netbeans.
Thanks again
Nilesh
"Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
news:bjaajs$nkg$1@eclipse.org...
> You are much more likely to have success by adapting your Ant build file
or
> your pathCheck code as I indicated.
> But you can see Bug 24129 comment #10 and start from there.
>
> HTH
> Darins
> ps you should likely move to the 2.1.1 as this is the latest release.
>
> "eclipse" <npatel@indigostone.com> wrote in message
> news:bjaae7$nf4$1@eclipse.org...
> > Thanks for your reply,
> >
> > I am running eclipse 2.1,as it is the current GA release. I can not use
> 3.0.
> > However please help me on step by step instruction on "how to run
Eclipse
> in
> > a separate VM?" I have only started working on eclipse from yseterday,
> > switching from netbeans.
> >
> > Thanks for you help and looking forward to hearing again.
> >
> > Nilesh
> >
> > "Darin Swanson" <Darin_Swanson@us.ibm.com> wrote in message
> > news:bja9vq$mtq$1@eclipse.org...
> > > Which Eclipse are you using?
> > >
> > > You are running Ant within the same VM as Eclipse.
> > > See bug 30353 comment #4
> > > In Eclipse 3.0 you can run Eclipse in a separate VM as a solution
> > > Or you could base your pathCheck basedir based on the location of a
> known
> > > resource using getClass().getResource(String)
> > >
> > > HTH
> > > Darins
> > >
> > > "eclipse" <npatel@indigostone.com> wrote in message
> > > news:bja8jj$lgk$1@eclipse.org...
> > > >
> > > > Dear Friends,
> > > > I am running a simple test which shows some descripancy between
> buliding
> > > > from ant within eclipse and build from eclipse run facility. I ran
> > simple
> > > > check program from eclipse and ant and found following results.
> > > >
> > > > From ANT: c:\eclipse\TEST.TXT
> > > > From eclipse run: c:\nilesh\env\TEST.TXT
> > > >
> > > > Please note that eclipse was started from "c:\eclipse" and then java
> > > project
> > > > was created with path "c:\nilesh\env"
> > > >
> > > > JAVA FILE:
> > > > import java.io.File;
> > > >
> > > > public class pathCheck
> > > >
> > > > {
> > > >
> > > > public static void main(String[] args)
> > > >
> > > > {
> > > >
> > > > pathCheck t = new pathCheck();
> > > >
> > > > File file = new File("TEST.TXT");
> > > >
> > > > System.out.println("FILE PATH = " + file.getAbsolutePath());
> > > >
> > > > }
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > > I don't know why running from ant replaces project path with eclipse
> > > > start-up path. I would like to configure ant such that project path
> > > > ("c:\nilesh\env") gets taken as base dir of pathCheck class. Please
> > help.
> > > >
> > > > Love you all,
> > > >
> > > >
> > > >
> > > > nilesh
> > > >
> > > >
> > >
> > >
> >
> >
>
>
|
|
|
Re: new File(".") [message #123236 is a reply to message #123213] |
Fri, 05 September 2003 13:08  |
Eclipse User |
|
|
|
"eclipse" <npatel@indigostone.com> wrote in message
news:bjad17$q3n$1@eclipse.org...
> Hi,
>
> I just looked at ant manual, and found that java task is associated with
> attribute called "fork=true/false",. By default it is false. By setting it
> to true, it runs in external jvm and provides the results as required.
Well that will work...sorry I didn't give you that advice first :-)
> Thanks in the meantime, and I must admit, I am beginning to adopt eclipse
> platform as opposed to netbeans.
Good thing or else you will have to change name from eclipse to netbeans :-)
Darins
|
|
|
Powered by
FUDForum. Page generated in 0.05071 seconds