Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > adding a new library .jar to your path (netbeans)

Reply
Thread Tools

adding a new library .jar to your path (netbeans)

 
 
jason
Guest
Posts: n/a
 
      05-15-2010
hello!

just downloaded swing worker.

i up until now have not needed any external libraries for any of my
projects.

how do i go about adding this? if this is very dumb and is easily
solved with a link, please let me know. if i could find it by googling
i think i would have already as i tried for a bit.

thanks!
 
Reply With Quote
 
 
 
 
John B. Matthews
Guest
Posts: n/a
 
      05-15-2010
In article
<14bb221c-a9d0-46f5-a82a->,
jason <> wrote:

> just downloaded swing worker.
>
> i up until now have not needed any external libraries for any of my
> projects.
>
> how do i go about adding this?


Adding this to what? What JVM version are you targeting? What build
environment are you using? Have you tried this?

<http://groups.google.com/group/comp.lang.java.programmer/msg/9b707988630265cd>

> if i could find it by googling i think i would have already as
> i tried for a bit.


You should still try. Without knowing what you found or tried, it's
hard to suggest a way forward. For Java 5, download
swing-worker-src-1.2.zip from <https://swingworker.dev.java.net/>.

$ unzip swing-worker-src-1.2.zip
Archive: swing-worker-src-1.2.zip
creating: ...

Then run the demo outlined in the SwingWorker API:

<http://java.sun.com/javase/6/docs/api/javax/swing/SwingWorker.html>

$ ant demo
Buildfile: build.xml

init:
[mkdir] Created dir: ...

compile:
[javac] Compiling 3 source files to ...

demo:
[javac] Compiling 1 source file to ...

BUILD SUCCESSFUL
Total time: 10 seconds

Use ` ant -p` to see other build targets.

SwingWorker is included in Java 6 and later.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      05-15-2010
jason wrote:

> just downloaded swing worker.


> how do i go about adding this? if this is very dumb and is easily
> solved with a link, please let me know. if i could find it by googling
> i think i would have already as i tried for a bit.



This is a little on the dumb side. Do you know what the Java API is?
It's the stuff that comes with both the JRE (runtime) and the JDK
(development kit). If you see it in Sun's basic documentation, then you
already have it.

Therefore, exactly what problem are you having? As always please
provide an SSCCE.

 
Reply With Quote
 
jason
Guest
Posts: n/a
 
      05-15-2010
On May 15, 12:07*pm, markspace <nos...@nowhere.com> wrote:
> jason wrote:
> > just downloaded swing worker.
> > how do i go about adding this? if this is very dumb and is easily
> > solved with a link, please let me know. if i could find it by googling
> > i think i would have already as i tried for a bit.

>
> This is a little on the dumb side. *Do you know what the Java API is?
> It's the stuff that comes with both the JRE (runtime) and the JDK
> (development kit). *If you see it in Sun's basic documentation, then you
> already have it.
>
> Therefore, exactly what problem are you having? *As always please
> provide an SSCCE.


okay, to answer all of your questions at once:

i am trying to run this code exactly:
http://java.sun.com/docs/books/tutor...y/Flipper.java

when i run it using the launch button here:
http://java.sun.com/docs/books/tutor...y/interim.html

it runs perfectly.

when i bring it into net beans (i am running verison 6.8:
http://netbeans.org/downloads/index.html i am using the bundle with
all possible technologies). i am running Java JDK 1.5

now, when i download and unzip this file it is all present in my
download file (running on a mac).
if i bring this code into my netbeans developer i get the following
error:
import javax.swing.SwingWorker; //line with error

error:
cannot find symbol
symbol: class swing worker
location: package javax.swing

i am assuming this is because my netbeans is not acknowledging the
file. and i agree, i haven't bridged this in any way.

i agree it is obvious i am not too sure what i am talking about. i am
honestly trying here, and if there is anything i can do to help you
help me try and be patient.

thanks in advance.
 
Reply With Quote
 
markspace
Guest
Posts: n/a
 
      05-15-2010
jason wrote:
> i am running Java JDK 1.5


The SwingWorker documentation says:

Since:
1.6

Download the latest JDK and add it to the NetBeans platform. Then
change your project properties to use Java 1.6.


 
Reply With Quote
 
jason
Guest
Posts: n/a
 
      05-15-2010
>when i bring it into net beans (i am running verison 6.8:
>http://netbeans.org/downloads/index.html i am using the bundle with
>all possible technologies). i am running Java JDK 1.5
>now, when i download and unzip this file it is all present in my
>download file (running on a mac).



let me clarify in advance. i bring the flipper code into netbeans. a
project i created called flipper.

i have downloaded the zip for swingworker and it is in my downloads
file.

the flipper file is the code open noted above that is giving the erorr.
 
Reply With Quote
 
Lew
Guest
Posts: n/a
 
      05-15-2010
jason wrote:
> when i [sic] bring it into net beans [sic] (i [sic] am running verison 6.8:
> http://netbeans.org/downloads/index.html i [sic] am using the bundle with
> all possible technologies). i [sic] am running Java JDK 1.5


Java 5 hit "end-of-life", that is, was officially retired by Sun on April 8,
2008, over two years ago. Java 6, the current version, was released to the
public on December 11, 2006, well over three years ago. Is there a particular
reason that you cannot use the current version of Java?

'SwingWorker' has been included with the current Java version for over three
years.
<http://java.sun.com/javase/6/webnotes/features.html>

Whether you use Java 5 or 6, be quite sure to keep up to date with the minor
version, that is, the number after the underscore in "Java 1.6.0_20" or
"1.5.0_22". As in the case of these very latest versions, there are important
security fixes and bug fixes in the minor upgrades.

--
Lew
 
Reply With Quote
 
John B. Matthews
Guest
Posts: n/a
 
      05-16-2010
In article
<6e54fc61-3250-46f7-920f->,
jason <> wrote:

> when i bring it into net beans (i am running verison 6.8:
> http://netbeans.org/downloads/index.html i am using the bundle with
> all possible technologies). i am running Java JDK 1.5


Download swing-worker-1.2.jar from <https://swingworker.dev.java.net/>.
Right click on your Projects > Libraries > Add JAR/Folder, and add the
JAR to the project.

On Mac OS X 10.5 and later, you can add Java 1.6 under Tools > Java
Platforms, if it's not already present.

--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>
 
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
library.path VS class.path Terracotta Java 0 07-16-2007 03:57 PM
library.path VS class.path Terracotta Java 1 07-16-2007 03:52 PM
how do i add a new path into sys.path? wen Python 10 08-19-2005 12:35 PM
Path as a dictionary tree key? (was Re: PEP on path module forstandard library) Ron Adam Python 3 08-02-2005 04:27 AM
sys.path.append('/my/new/path') Jeff Wagner Python 3 11-24-2003 07:39 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57