hello, I had created a simple database application using 4th category drivers. The application works sucessfully when I execute the .class file. I had build the application using JBuilder IDE. The problem start When I try to deploy the application into a executable jar file using the jbuilder options, and when i try executing the .jar files the framework of the application comes up, but the database apart does not get executed .... Can some help me ... to find a solution ... Urgent !!! Cheers!!!
I'm not a JBuilder user, but I can tell you what's need to make a JAR file executable. In the JAR you must have a manifest file that declares which class in the JAR has a main method. The entry in this file can be as simple as: Main-Class: ClassWithMainMethod.class Make sure there is a null line below this entry. To bundle it into the JAR: $ jar -cfm name_of_JAR manifest_file class_files then you should be able to run the whole schmeer with: $ java -jar name_of_JAR Hope this helps, ------------------ Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide [This message has been edited by Michael Ernest (edited August 01, 2001).]
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
hello, Basically the main window of my program is displayed, so the application is also executed. But when it comes to database connection the database drivers inside the .jar files does not get executed. Regards...
if your jar file contains the drivers etc. required files for the connection thing, you would have to place the jar file in classpath. specifically include it in the classpath like on NT you can say - set classpath= %CLASSPATH%;PATH_OF_YOUR_JAR_FILE\NAME_OF_JAR_FILE.jar hope it helps raghav..
You didn�t say if the jar that contains the driver is the same as the one containing the application: If there is only one jar and the drivers are not loaded the only thing I can think of is that they are in an incorrect packect within the jar. If there is two jar the application jar�s manifest must have a header pointing the relative URL of the jar contaning the drivers. "Class-Path: another.jar" The Java Tutorial has a trial about jar. Read as well the Jar File Specificatioon in the SDK Docs By the way when executing a jar with java -jar there isn�t a classpath, but the classes are looked for in t he proper jar. This is why you need the Class-Path header in the application jar.
SCJP2. Please Indent your code using UBB Code
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad: