Go Back   Java Programming Forums > Java Standard Edition Programming Help > Java IDEs


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-12-2008, 03:50 AM
Junior Member
 

Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
haygaurav is on a distinguished road
Default regarding project Netbeans

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



Reply With Quote Share this thread on Facebook
Sponsored Links
Java Training from DevelopIntelligence
  #2 (permalink)  
Old 05-12-2008, 11:07 AM
JavaPF's Avatar
mmm.. coffee
 
8 Highscores

Join Date: May 2008
Location: United Kingdom
Posts: 1,543
Thanks: 98
Thanked 92 Times in 85 Posts
JavaPF is someone you want to know!JavaPF is someone you want to know!JavaPF is someone you want to know!

I'm feeling Relaxed
Default Re: regarding project

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:

Working with Java DB is easy and fun. Java DB makes it possible to create and distribute an embedded database with minimal effort. Just remember a few tips to make your work with Java DB successful:
  1. Place the derby.jar file in your development environment's classpath so that your Java technology compiler and runtime environment can find the libraries to compile and run the application.
  2. Set the derby.system.home system property to tell Java DB where to find your database. You can set this property programmatically or on the command line.
  3. Create a build process that places the derby.jar file in a lib subdirectory immediately below your application's own directory.
  4. Add derby.jar to the application classpath by including a Class-Path property in your application JAR's manifest file.
__________________
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.
Reply With Quote
  #3 (permalink)  
Old 05-12-2008, 05:06 PM
Junior Member
 

Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
haygaurav is on a distinguished road
Default Re: regarding project

Dear sir,
I am totally confused.
Please spoon feed me in this process.
regards
gaurav khatwani
Reply With Quote
  #4 (permalink)  
Old 05-12-2008, 05:21 PM
JavaPF's Avatar
mmm.. coffee
 
8 Highscores

Join Date: May 2008
Location: United Kingdom
Posts: 1,543
Thanks: 98
Thanked 92 Times in 85 Posts
JavaPF is someone you want to know!JavaPF is someone you want to know!JavaPF is someone you want to know!

I'm feeling Relaxed
Default Re: regarding project

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
or

Java Code
Class-Path: directory-name/derby.jar
Locate derby.jar on your computer and add this into your jar file so it corresponds with the class path you added to the manifest.

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.
Reply With Quote
  #5 (permalink)  
Old 06-12-2008, 06:45 AM
Junior Member
 

Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
haygaurav is on a distinguished road
Default Re: regarding project

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
Reply With Quote
  #6 (permalink)  
Old 06-12-2008, 12:36 PM
Junior Member
 

Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
haygaurav is on a distinguished road
Default Re: regarding project

Dear sir,
Please help me.
Ok, i m sending my project files u please deploy it for me and send it to me again
thanks and regards
gaurav khatwani
Reply With Quote
  #7 (permalink)  
Old 06-12-2008, 06:35 PM
JavaPF's Avatar
mmm.. coffee
 
8 Highscores

Join Date: May 2008
Location: United Kingdom
Posts: 1,543
Thanks: 98
Thanked 92 Times in 85 Posts
JavaPF is someone you want to know!JavaPF is someone you want to know!JavaPF is someone you want to know!

I'm feeling Relaxed
Default Re: regarding project

Quote:
Originally Posted by haygaurav View Post
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
Hmm.. Something doesn't sound right to me. There needs to be a manifest file in the jar for it to run correctly. Or atleast that is what I thought..

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.
Reply With Quote
  #8 (permalink)  
Old 07-12-2008, 11:20 AM
Junior Member
 

Join Date: Nov 2008
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
haygaurav is on a distinguished road
Default Re: regarding project

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
Reply With Quote
  #9 (permalink)  
Old 07-12-2008, 01:55 PM
JavaPF's Avatar
mmm.. coffee
 
8 Highscores

Join Date: May 2008
Location: United Kingdom
Posts: 1,543
Thanks: 98
Thanked 92 Times in 85 Posts
JavaPF is someone you want to know!JavaPF is someone you want to know!JavaPF is someone you want to know!

I'm feeling Relaxed
Default Re: regarding project

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.
Reply With Quote
  #10 (permalink)  
Old 09-12-2008, 11:14 AM
JavaPF's Avatar
mmm.. coffee
 
8 Highscores

Join Date: May 2008
Location: United Kingdom
Posts: 1,543
Thanks: 98
Thanked 92 Times in 85 Posts
JavaPF is someone you want to know!JavaPF is someone you want to know!JavaPF is someone you want to know!

I'm feeling Relaxed
Default Re: regarding project

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:
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).

To run the project from the command line, go to the dist folder and type the following:

java -jar "LibMan.jar"

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

Notes:

* If two JAR files on the project classpath have the same name, only the first JAR file is copied to the lib folder.

* Only JAR files are copied to the lib folder. If the classpath contains other types of files or folders, none of the classpath elements are copied to the lib folder. In such a case, you need to copy the classpath elements to the lib folder manually after the build.

* If a library on the projects classpath also has a Class-Path element specified in the manifest,the content of the Class-Path element has to be on the projects runtime path.

* To set a main class in a standard Java project, right-click the project node in the Projects window and choose Properties. Then click Run and enter the class name in the Main Class field. Alternatively, you can manually type the class name in the manifest Main-Class element.
__________________
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.
Reply With Quote
Reply

Thread Tools
Display Modes

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 On



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


100 most searched terms
Search Cloud
2 dimensional arraylist java 2d arraylist java actionlistener actionlistener in java addactionlistener addactionlistener java convert double to integer java double format java double to integer in java double to integer java drag en drop programmeren java eclipse shortcut keys exception in thread "awt-eventqueue-0" java.lang.outofmemoryerror: java heap space exception in thread "main" java.lang.nullpointerexception exception in thread "main" java.lang.outofmemoryerror: java heap space format double in java format double java get mouse position java java 2d arraylist java actionlistener java double format java double formatting java double to int java double to integer java format double java forum java forums java get mouse position java list to map java mouse position java programming forum java programming forums java programming practice problems java send keystrokes to another application java two dimensional arraylist java.io.ioexception: premature eof java.lang.classformaterror: truncated class file java.lang.outofmemoryerror: java heap space java.util.arraylist jbutton action jbutton actionlistener jtextarea font jtextfield font size jxl.read.biff.biffexception: unable to recognize ole stream programming mutators and generics smack api two dimensional arraylist two dimensional arraylist java unable to sendviapost to url what is the smallest positive number that is evenly divisible by all of the numbers from 1 to 20?

All times are GMT. The time now is 01:58 AM.
Powered by vBulletin® Copyright ©2000-2009, Jelsoft Enterprises Ltd.