|
||
|
|||
|
Dear sir,
I have developed library managment system using netbeans 6.5 and javaDB The name of my project in netbeans is "LibMan". So a file LibMan.jar is created. That file I can run externally without using netbeans but my problem is that i can't update my database without use of netbeans i.e. i have to start netbeans and go to servies window and right click and connect database and than I can update my database. Can you please tell me how to update database without using the following process: " i have to start netbeans and go to servies window and right click and connect database and than can I connect to database." regards gaurav khatwani
|
|
||||
|
Hello haygaurav,
It sounds like the JDBC driver classpath is missing from your manifest file. Are any errors displayed when you try to connect to the Database? You need to set the correct classpath to your JDBC driver before you create the jar file. I think you also need to add the JDBC driver into the jar. That way, when you execute, your application will know exactly where to look for the required driver. These links will help you continue: Adding Classes to the JAR File's Classpath (The Java™ Tutorials > Deployment > Packaging Programs in JAR Files) Using Java DB in Desktop Applications Quote:
__________________
Don't forget to add syntax highlighted code tags around your code: [highlight=Java] code here [/highlight] Forum Tip: Add to peoples reputation ( ) by clicking the button on their useful posts.
|
|
||||
|
OK well unfortunately I have no experience with JavaDB so I will guide you through roughly what I think you need to do.
How are you creating your jar file? If you look inside your jar you will find the manifest file. You need to edit this and add the class path to derby.jar which im assuming is the JavaDB JDBC driver. Add this line to your manifest: Java Code
Class-Path: derby.jar Java Code
Class-Path: directory-name/derby.jar If you are creating your .jar in netbeans they you may need to look into how to create a jar file from scratch. Take another look at the links above. These explain the same things Im saying her but in a bit more detail. I don't know how I would make this any simpler...
__________________
Don't forget to add syntax highlighted code tags around your code: [highlight=Java] code here [/highlight] Forum Tip: Add to peoples reputation ( ) by clicking the button on their useful posts.
|
|
|||
|
Dear sir,
My libman.jar file is constructed through netbeans And I have seen the contents of libman.jar file using command jar tf libman.jar There is no manifest.txt file in the libman.jar So ,please tell me what is the next step regards gaurav khatwani |
|
||||
|
Quote:
Yes please upload or send me the project files and I will take a look for you friend.
__________________
Don't forget to add syntax highlighted code tags around your code: [highlight=Java] code here [/highlight] Forum Tip: Add to peoples reputation ( ) by clicking the button on their useful posts.
|
|
|||
|
Dear sir,
I have e-mailed my project files on the e-mail ID: **Email removed by admin for security reasons** The file manifest.mf is in the libman.jar When i try to update that file the file gets updated but i recieve the the warning message. After that i tried to run that file still i can't interact with database without using netbeans Please remember i my trying to get same results when i run my project without using netbeans and when i run my project using netbeans You please deploy it, and send it to me again at e-mail: **Email removed by admin for security reasons** regards gaurav khatwani |
|
||||
|
haygaurav, I will PM you my contact details.
It is not wise to list email addresses in forums because they get picked up by spam bots. The last thing we both need is more spam in our inboxes!! Please check your Private Messages
__________________
Don't forget to add syntax highlighted code tags around your code: [highlight=Java] code here [/highlight] Forum Tip: Add to peoples reputation ( ) by clicking the button on their useful posts.
|
|
||||
|
haygaurav, I have looked over your project files.
Please look at the libman directory. There is an official README file in there that tells you what you need to do. I have quoted it below. You really need to read over all of this again and try for yourself. I cannot replicate your setup here on my workstation. I suggest you create a new simple project with a single class. Make it really simple with an option to connect and disconnect from the Database. Nothing else. Then you can create the jar following the instructions in the driver readme and try again. You can keep trying different options until you get it to successfully connect. Quote:
__________________
Don't forget to add syntax highlighted code tags around your code: [highlight=Java] code here [/highlight] Forum Tip: Add to peoples reputation ( ) by clicking the button on their useful posts.
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Netbeans User Manual | systech44 | Java IDEs | 1 | 08-12-2009 04:56 PM |
| Netbeans help | [Kyle] | Java IDEs | 2 | 20-09-2009 11:32 PM |
| Java ME / Netbeans : Device Name | Drakenmul | Mobile Applications | 0 | 27-07-2009 07:37 PM |
| adding rows to coloumns. Netbeans | haygaurav | Java IDEs | 1 | 01-04-2009 08:16 PM |
| Are We seriously Ignoring NetBeans? | javacrazed | Java IDEs | 4 | 12-11-2008 09:08 PM |