Java compile error

I am compiling my code using NetBeans clean and build option and get errors.  The compiler output is included.  Anyone with any ideas - THANKS!

 compileErrors
sargent240Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sargent240Author Commented:
The error is line 17 in embedded file.  Hope that helps
0
reijnemansCommented:
The compiler says that the build is succesfull
BUILD SUCCESSFUL (total time: 0 seconds)

So I'm wondering if there is a problem also because I don't see any errors in the log. The only thing that maybe looks a little bit strange is the next line

Not copying library /home/al/NetBeansProjects/DisplayImage/dist/lib , it can't be read.


But this doens't mean it's wrong
0
sargent240Author Commented:
Some added info.  The programs runs when I run it on the computer I developing on when I select run and run the project.  When I clean and build I get the error.  It still runs if I execute it from the command line ie:

java -jar DisplayImage.jar

When I copy it to another machine it will not run.  I am assuming the error has something to do with that.  I wrote the program a year ago and it has been running on the other machine just fine.  A month ago the hard drive I wrote the program on crashed.  I had to replace the hard drive but had a current back up of the directories I was using to write the program.  I put all the directories on the new hard drive and got some errors that the com.mysql.jdbc.connection could not be found.  I cured that problem and I could make changes and execute the program on the development machine fine.
0
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

reijnemansCommented:
What is the exact error message you got on the "other" machine, because it seems that some king of library could not be found
0
sargent240Author Commented:
Attached are the error messages I got when I ran the program on the other machine.  The things that are different from the time I first developed the program is I crashed the development hard drive and I am now using Netbeans 7.0.1 and I originally used Netbeans 6.9.?  Again, it runs on my development machine.

 otherMachineErrors
0
for_yanCommented:
You need to add mysql driver in the classpath
0
for_yanCommented:

Downlod the druver and put it in the classpath:
http://dev.mysql.com/downloads/connector/j/
0
for_yanCommented:
0
for_yanCommented:

The jar file will be called  in the top levelfolder after you unzip
mysql-connector-java-5.1.17.jar
0
sargent240Author Commented:
I loaded the mysql driver from my suse distro disk.  I am not sure where to go to get it in the class path
0
for_yanCommented:
If you are in NetBeans you shoul rightclick the project select properties and the lib and then add jar button
Let me check - and I'll tell you exactly
0
sargent240Author Commented:
I am curious, as the README file in my projects dist directory says to distribute the program I needed to copy the dist and dist/lib directories to the recipient machine.  I did that the first time about a year ago and it ran fine.  I did it this time and these problem popped up.  Just a curious thing.  If I can get an idea as to how to set the class path that would be fine.

THANKS!
0
for_yanCommented:
Yes, I was right - right-click project - Proprerties- in the left column of the pop-up winodw - sleect Libararies - on the right Add Jar/Folder
and wbrowse to the jar
0
sargent240Author Commented:
This is what I have in by Compile-time Libraries box

Beans Binding
TopLInk Essentials
/home/al/NetBeansProjects/DisplayImage/dist/lib
MySqlJdbc Driver

0
sargent240Author Commented:
Am I missing one?
0
sargent240Author Commented:
Is the fact that there is not a

/home/al/ and so forth

directory on the recipient machine a problem?
0
for_yanCommented:

http://wiki.netbeans.org/FaqpackageAndDistribute

To package the project, ZIP up the dist folder (including the lib folder!), and distribute the ZIP file.

so you meant you did it and now you have problems on deployment machine?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
for_yanCommented:
check this:
http://www.velocityreviews.com/forums/t141385-how-to-create-executable-jar-in-netbeans-ide.html

Iam not sure this is full information - still look at it:
   
Why use a Eclipse if you can use a well-suited, fast and optimized out-of-the-box-IDE?
Easy as pie: (Netbeans 5.5)

right-click your project,
"set main project",
select your project,
"File",
"PROJECTNAME Properties",
"Run",
set your main class,
"Libraries",
"Add JAR/Folder",
select your wanted libs,
do a CLEAN build,
enter the build-path,
enter /dist and be amazed --> DONE!

No Modifications/Hacks/buggy DiY-IDE´s, no cry
      
 
0
for_yanCommented:
0
sargent240Author Commented:
Thank you very much yan.  I recopied the lib (under dist) directory and all is working fine.  I must not have gotten a good copy the first time.  Your time and efforts are appreciated.  Problem solved.  I am going to put your last post in my three ring binder for future reference.  Again thanks to you both.
0
sargent240Author Commented:
Thanks you very much for the rapid exchange!!
0
for_yanCommented:
You are always welcome.
0
sargent240Author Commented:
I may have to open another question but do you have any idea why when I compile the program it says

Not copying library /home/al/NetBeansProjects/DisplayImage/dist/lib , it can't be read.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Java

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.