Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Files and folders includding into project ?
Files and folders includding into project ? [message #196232] Mon, 26 February 2007 12:50 Go to next message
Eclipse UserFriend
Originally posted by: smieci79.o2.pl

I need/want to add couple text files into the project and included them
to jar file. I copied them to:
~/WorkSpace/project/folder_to_include/some_files
In Eclipse->Package Explorer I can see the folder and files in it.
But i don't know how to open such files.

Could give me any tip, will be grateful.

Thanks
Re: Files and folders includding into project ? [message #196240 is a reply to message #196232] Mon, 26 February 2007 12:56 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jakub.jurkiewicz.gmail.com

Try clicking right mouse button on the file and choose Open or Open with.
To create a jar file you have to use Export Wizard -> Java -> Jar

Hope it helps
Jakub Jurkiewicz

Krzysztof Mokrzycki wrote:
> I need/want to add couple text files into the project and included them
> to jar file. I copied them to:
> ~/WorkSpace/project/folder_to_include/some_files
> In Eclipse->Package Explorer I can see the folder and files in it.
> But i don't know how to open such files.
>
> Could give me any tip, will be grateful.
>
> Thanks
Re: Files and folders includding into project ? [message #196248 is a reply to message #196240] Mon, 26 February 2007 13:04 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: smieci79.o2.pl

I've already done that but the problem is that i don't know how to open
such files from java code, i can access them by giving full path but it
will change after i move project to another machine so i need to use
path inside my future jar file something like (./folder/file ) ??

Jakub Jurkiewicz wrote:
> Try clicking right mouse button on the file and choose Open or Open with.
> To create a jar file you have to use Export Wizard -> Java -> Jar
>
> Hope it helps
> Jakub Jurkiewicz
>
> Krzysztof Mokrzycki wrote:
>> I need/want to add couple text files into the project and included
>> them to jar file. I copied them to:
>> ~/WorkSpace/project/folder_to_include/some_files
>> In Eclipse->Package Explorer I can see the folder and files in it.
>> But i don't know how to open such files.
>>
>> Could give me any tip, will be grateful.
>>
>> Thanks
Re: Files and folders includding into project ? [message #196255 is a reply to message #196248] Mon, 26 February 2007 13:12 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Krzysztof,

Maybe you'd be better to put these files in the same folder as the class
that will load them and then use Xyz.class.getResource("...") to access
them. If you are building a plugin, you could use Bundle's
getEntry/getResource method to access them anywhere in the bundle/jar;
be sure to use the build.properties to specify that the folder should
end up in the binary jar.


krzysiekM wrote:
> I've already done that but the problem is that i don't know how to
> open such files from java code, i can access them by giving full path
> but it will change after i move project to another machine so i need
> to use path inside my future jar file something like (./folder/file ) ??
>
> Jakub Jurkiewicz wrote:
>> Try clicking right mouse button on the file and choose Open or Open
>> with.
>> To create a jar file you have to use Export Wizard -> Java -> Jar
>>
>> Hope it helps
>> Jakub Jurkiewicz
>>
>> Krzysztof Mokrzycki wrote:
>>> I need/want to add couple text files into the project and included
>>> them to jar file. I copied them to:
>>> ~/WorkSpace/project/folder_to_include/some_files
>>> In Eclipse->Package Explorer I can see the folder and files in it.
>>> But i don't know how to open such files.
>>>
>>> Could give me any tip, will be grateful.
>>>
>>> Thanks
Re: Files and folders includding into project ? [message #196263 is a reply to message #196248] Mon, 26 February 2007 13:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: jakub.jurkiewicz.gmail.com

So I guess that it is more like java basics question rather than eclipse
question.
However, I googled and found this topic:
http://www.daniweb.com/techtalkforums/thread21906.html
Also here: http://javaworkshop.sourceforge.net/chapter5.html is some
interesting information.
Look here also:
http://java.sun.com/j2se/1.4.2/docs/guide/resources/resource s.html

Hope this helps :)
Jakub Jurkiewicz

krzysiekM wrote:
> I've already done that but the problem is that i don't know how to open
> such files from java code, i can access them by giving full path but it
> will change after i move project to another machine so i need to use
> path inside my future jar file something like (./folder/file ) ??
>
> Jakub Jurkiewicz wrote:
>> Try clicking right mouse button on the file and choose Open or Open with.
>> To create a jar file you have to use Export Wizard -> Java -> Jar
>>
>> Hope it helps
>> Jakub Jurkiewicz
>>
>> Krzysztof Mokrzycki wrote:
>>> I need/want to add couple text files into the project and included
>>> them to jar file. I copied them to:
>>> ~/WorkSpace/project/folder_to_include/some_files
>>> In Eclipse->Package Explorer I can see the folder and files in it.
>>> But i don't know how to open such files.
>>>
>>> Could give me any tip, will be grateful.
>>>
>>> Thanks
Re: Files and folders includding into project ? [message #196271 is a reply to message #196263] Mon, 26 February 2007 13:24 Go to previous message
Eclipse UserFriend
Originally posted by: smieci79.o2.pl

Thanks a lot.

That was exactly what I was looking for.


Jakub Jurkiewicz wrote:
> So I guess that it is more like java basics question rather than eclipse
> question.
> However, I googled and found this topic:
> http://www.daniweb.com/techtalkforums/thread21906.html
> Also here: http://javaworkshop.sourceforge.net/chapter5.html is some
> interesting information.
> Look here also:
> http://java.sun.com/j2se/1.4.2/docs/guide/resources/resource s.html
>
> Hope this helps :)
> Jakub Jurkiewicz
>
> krzysiekM wrote:
>> I've already done that but the problem is that i don't know how to
>> open such files from java code, i can access them by giving full path
>> but it will change after i move project to another machine so i need
>> to use path inside my future jar file something like (./folder/file ) ??
>>
>> Jakub Jurkiewicz wrote:
>>> Try clicking right mouse button on the file and choose Open or Open
>>> with.
>>> To create a jar file you have to use Export Wizard -> Java -> Jar
>>>
>>> Hope it helps
>>> Jakub Jurkiewicz
>>>
>>> Krzysztof Mokrzycki wrote:
>>>> I need/want to add couple text files into the project and included
>>>> them to jar file. I copied them to:
>>>> ~/WorkSpace/project/folder_to_include/some_files
>>>> In Eclipse->Package Explorer I can see the folder and files in it.
>>>> But i don't know how to open such files.
>>>>
>>>> Could give me any tip, will be grateful.
>>>>
>>>> Thanks
Previous Topic:Debug issue
Next Topic:Unable to view report in pdf format
Goto Forum:
  


Current Time: Thu Apr 25 15:42:23 GMT 2024

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

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

Back to the top