B
bruce
Can I use NetBeans to build an installable package? If so, how? If
not, what should use?
Thanks..
Bruce
not, what should use?
Thanks..
Bruce
Can I use NetBeans to build an installable package? If so, how? If
not, what should use?
Thanks..
Bruce
bruce said:I tried to run the .jar file from the command line and got an error
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
What do I need to do to link the jdbc driver to my code?
The driver needs to be on the class path, specified either via the
command line or in the JAR's manifest. When you build the project,
NetBeans puts everything in a folder named "dist" with a README.TXT
that says, in part:
"When you build an Java application project that has a main class, the
IDE automatically copies all of the JAR files on the projects classpath
to your projects dist/lib folder. The IDE also adds each of the JAR
files to the Class-Path element in the application JAR files manifest
file (MANIFEST.MF)."
bruce said:Yah, I read that information. My MANIFEST.MF is:
Manifest-Version: 1.0
Ant-Version: Apache Ant 1.8.1
Created-By: 1.6.0_16-b01 (Sun Microsystems Inc.)
Main-Class: CensusRecords.Census1930
Class-Path:
X-COMMENT: Main-Class will be added automatically by build
Do I have to add something to the MANIFEST.MF file? If it's the class
path, how do I find out what it is?
It looks like you modified it from the default:
$ cat manifest.mf
Manifest-Version: 1.0
X-COMMENT: Main-Class will be added automatically by build
You can use this utility to see your manifest, as built:
<http://sites.google.com/site/drjohnbmatthews/manifesto>
bruce said:I "Don't" think I modified my MANIFEST.ME. All I did was load it from
the file list, select All, and copy/paste into my note.
Anyhow, I can now run my application from the command line. I added
mysql-connector-java-5.1.13 to my system CLASSPATH.
Which brings to mind a question! Should I leave mysql-connector-
java-5.1.13 in my system CLASSPATH or move it to my Java CLASSPATH?
I've put JARs in one of the java.ext.dirs in the past, but it inevitably
leads to problems. It's best to specify the class path either via the
command line or in the JAR's manifest.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.