Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > OS independent path in build path

Reply
Thread Tools

OS independent path in build path

 
 
guesswho
Guest
Posts: n/a
 
      09-06-2006
Hi,

I hope someone can help... I'm quite new to java and eclipse and there
is sth. i don't understand
i want to add some external jar's (jawk, jclips) to my project, I
placed them in my projects directory but when I add them to build path
(in eclipse -> Add External JAR) it is impossible to give the OS
independent path and i need to change that every time i want to run my
app on different OS.
....so how to make external jars work on both Win/Linux ??

thanks in advance,

 
Reply With Quote
 
 
 
 
impaler
Guest
Posts: n/a
 
      09-06-2006
> (in eclipse -> Add External JAR) it is impossible to give the OS
> independent path and i need to change that every time i want to run my
> app on different OS.
> ...so how to make external jars work on both Win/Linux ??
>



A good practice is to use a lib folder under your project dir and copy
there all the dependencies. Don't use add external jars use Add Jar or
Add Class Folder instead.
Also have a look at ant and build your project including all the
dependencies and you won't have problems at all in different OSs

 
Reply With Quote
 
 
 
 
Dale King
Guest
Posts: n/a
 
      09-06-2006
"impaler" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ups.com...
>> (in eclipse -> Add External JAR) it is impossible to give the OS
>> independent path and i need to change that every time i want to run my
>> app on different OS.
>> ...so how to make external jars work on both Win/Linux ??

>
> A good practice is to use a lib folder under your project dir and copy
> there all the dependencies. Don't use add external jars use Add Jar or
> Add Class Folder instead.
> Also have a look at ant and build your project including all the
> dependencies and you won't have problems at all in different OSs


A better solution is to use Maven as your build environment. It will
download and keep your external dependencies in its own repository. There is
an Eclipse plug-in for it as well.

--
Dale King


 
Reply With Quote
 
John O
Guest
Posts: n/a
 
      09-06-2006
guesswho wrote:
> Hi,
>
> I hope someone can help... I'm quite new to java and eclipse and there
> is sth. i don't understand
> i want to add some external jar's (jawk, jclips) to my project, I
> placed them in my projects directory but when I add them to build path
> (in eclipse -> Add External JAR) it is impossible to give the OS
> independent path and i need to change that every time i want to run my
> app on different OS.
> ...so how to make external jars work on both Win/Linux ??
>
> thanks in advance,
>



NetBeans 5.0 allows you to add libraries to your project. The build
process (which uses ANT) places all library dependencies into a lib
subdirectory next to the app's jar file. The jar file has pointers to
all library dependencies...it has class-path entries for the other jar
files. Works on all platforms.

You should be able to do something similar with Eclipse.

--
John O'Conner
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
position independent build of python erikj Python 2 12-04-2010 08:22 AM
Configuration independent build events sansay Software 0 06-08-2007 03:59 PM
build independent product key? (Age of Mythology) news.bwsys.net Computer Support 4 04-05-2007 12:08 PM
SWsoft Acronis Disk Director Suite 9.0 Build 508, Acronis OS Selector 8.0 Build 917, Acronis Partition Expert 2003 Build 292, Acronis Power Utilities 2004 Build 502, F-SECURE.ANTI vIRUS.PROXY v1.10.17.WINALL, F-SECURE.ANTI vIRUS v5.50.10260 for CITRI vvcd Computer Support 0 09-25-2004 01:38 AM
Platform-independent way to refer to execute path MK Python 1 06-25-2003 05:43 PM



Advertisments