Monday 15 September 2014

java - How can I add a library to portable Eclipse? -



java - How can I add a library to portable Eclipse? -

to preface: yes, have indeed read this. tried , failed because of reasons i'll explain below. it's not duplicate sole reason question linked on 3 years old and, obviously, eclispe has changed since then, , 1 time worked works no longer.

tl;dr: tried , didn't work. else can do?

anyway, actual question largely same; i'm looking updated answer. couldn't find 1 on google -- every reply found either ide or old previous question -- might post here.

i'm working on project where, instead of using date , calendar java built-ins, want utilize joda-time. i've heard lots of wonderful things and, own experience, seems quite nice. however, because i'm student, want able work on both in school , @ home, means need create portable. 1 time again because i'm student, can't install java 8 , utilize new built-in classes same thing. therefore, need way portably install library.

however, when alter computers, drive letter changes, , adding external jar in flash drive won't work. tried adding normal jar, suggested in previous question, failed because though libs folder in same directory src folder, says, doesn't appear in menu.

add jars... menu

file construction (library within joda-time-2.5)

next, tried manually editing .classpath file. did bit of testing see how worked, tried changing absolute path relative one. however, still failed, when changed computers told me couldn't find library, though relative paths unchanged. clarify, changed equivalent of this:

<classpathentry kind="lib" path="f:/.../projorg/libs/joda-time-2.5/joda-time-2.5.jar"/>

to this:

<classpathentry kind="lib" path="libs/joda-time-2.5/joda-time-2.5.jar"/>

and still threw error when moved computers, though worked fine on first machine.

is there way can import or otherwise link joda-time library portable eclipse don't need when move pcs? alternatively, there way can java 8 onto flash drive don't have worry it?

as discussed in comments, project needed refresh.

if re-create files project using , external file browser, eclipse doesn't see new files automatically. 1 should maintain in mind. simple refresh solves seemingly unexplainable errors regarding missing files. happens me lot.

i have expected "add jars..." dialog reads straight file scheme seems utilize project content known in workspace @ time.

java eclipse

No comments:

Post a Comment