using libraries at runtime
Hi there,
I am very new to java and multi OS development (a few weeks)
(i'm a fan of explaining my problem rather than just asking for a solution that i "think" is the correct one)
here's what i'm trying to do (using netbeans):
I have built a library of functions and encapsulated them into a JAR - this library uses classpath ${user.home}/".application name"/ folder to store files and logging info.
up until now, i have been using the "import JMyLib.*" and linking it to the JAR location at compile time (so that i have all my nice Javadoc comments when i type the class i use)
so that when i create:
JMyLib funky = new JMyLib();
i can just type
funky.
and it brings the popup/dropdown thing that shows all the available functions - all good :D
now here's my problem!
i want to distrabute my library of functions seperate from any of the applications that use it, so that when i update that jar file, each of the applications pick up the new version in ${user.home}/.application name/JMyLib.jar
and when i develop my code i still get those nice javadoc context.
(this is essentually trying to mirror what DLL's do in windows)
how do i go about doing this?
[1260 byte] By [
Mumeia] at [2007-11-27 7:59:06]

> now here's my problem!
> i want to distrabute my library of functions seperate
> from any of the applications that use it, so that
> when i update that jar file, each of the applications
> pick up the new version in ${user.home}/.application
> name/JMyLib.jar
> and when i develop my code i still get those nice
> javadoc context.
if you know how to run your application without netbeans, you will
know that thing is already implemented.
at the moment i have only used netbeans to build applications and then run them (or run the executable jar files by double clicking on them)
j_shadinata i don't know what you mean (sorry if i sound a total newb, i am ;) )
how do i add runtime libraries into the development environment so that they pick up the javadoc context, and then when i run the application it points to the correct one on anyone's computer
(I have been thinking it must be classpath related, but i can't seem to add "user.home/.application/JMyLib.jar" as a library location in netbeans, it always seems to want a hard coded location (like c:\documents and settings\username\.application\JMyLib.jar) and even then only in the compile time - if i add it to the run section, it doesn't allow an import call (and i don't know what the runtime equivelent is)
I applogise if i am not explaining this very well, it's probably something that's so basic LOL
Mumeia at 2007-7-12 19:41:07 >

> I have been thinking it must be classpath related
don't use netbeans for experiencing next level.
find out how to running java from command prompt.
read the tutorial. try it.
try building your own jar.
try running your jar.
if you search this forum, actually you will find lot of people ask
how to make an executable jar (opposite from you) LOL