Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » get the current directory of the current project
get the current directory of the current project [message #328137] Thu, 15 May 2008 05:27 Go to next message
No real name is currently offline No real nameFriend
Messages: 64
Registered: July 2009
Member
hi all, I would like know how to do to get the current directory of the
current project open.

thanks

a++
Re: get the current directory of the current project [message #328146 is a reply to message #328137] Thu, 15 May 2008 13:45 Go to previous messageGo to next message
Wayne Beaton is currently offline Wayne BeatonFriend
Messages: 554
Registered: December 2017
Senior Member
I assume that you mean at runtime.

As a matter of practice, you shouldn't be playing with directories in
your project at runtime. When you deploy as a JAR file, there won't be
any directories to navigate.

You probably want to access some files inside your project, right?

Look at the MyClass.class.getResource() and getResourceAsStream()
methods. Be sure to read the part about the leading '/'.

HTH,

Wayne

On Thu, 2008-05-15 at 07:27 +0200, julien wrote:
> hi all, I would like know how to do to get the current directory of the
> current project open.
>
> thanks
>
> a++
Re: get the current directory of the current project [message #328152 is a reply to message #328146] Thu, 15 May 2008 16:31 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 64
Registered: July 2009
Member
hi, thanks,
I ll look.
in fact, I really need the directory cause I need to launch a command
in the directory. it's a tropical command for a tropical language
etc...etc...

thanks

a++

Wayne Beaton a écrit :
> I assume that you mean at runtime.
>
> As a matter of practice, you shouldn't be playing with directories in
> your project at runtime. When you deploy as a JAR file, there won't be
> any directories to navigate.
>
> You probably want to access some files inside your project, right?
>
> Look at the MyClass.class.getResource() and getResourceAsStream()
> methods. Be sure to read the part about the leading '/'.
>
> HTH,
>
> Wayne
>
> On Thu, 2008-05-15 at 07:27 +0200, julien wrote:
>> hi all, I would like know how to do to get the current directory of the
>> current project open.
>>
>> thanks
>>
>> a++
>
Re: get the current directory of the current project [message #328153 is a reply to message #328152] Thu, 15 May 2008 16:35 Go to previous message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Julien,

I think you'd need to find the navigator/project explore/package explore
view from the current workbench page and check its selection.


julien wrote:
> hi, thanks,
> I ll look.
> in fact, I really need the directory cause I need to launch a command
> in the directory. it's a tropical command for a tropical language
> etc...etc...
>
> thanks
>
> a++
>
> Wayne Beaton a écrit :
>> I assume that you mean at runtime.
>>
>> As a matter of practice, you shouldn't be playing with directories in
>> your project at runtime. When you deploy as a JAR file, there won't be
>> any directories to navigate.
>>
>> You probably want to access some files inside your project, right?
>>
>> Look at the MyClass.class.getResource() and getResourceAsStream()
>> methods. Be sure to read the part about the leading '/'.
>>
>> HTH,
>>
>> Wayne
>>
>> On Thu, 2008-05-15 at 07:27 +0200, julien wrote:
>>> hi all, I would like know how to do to get the current directory of
>>> the current project open.
>>>
>>> thanks
>>>
>>> a++
>>
Previous Topic:100% cpu usage when opening a class file
Next Topic:Status of the Remote help Proposal
Goto Forum:
  


Current Time: Sun Jun 30 00:31:09 GMT 2024

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

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

Back to the top