This content has been marked as final. Show 11 replies
joshmo wrote:- Maybe the calls are just 'all tuckered out'. Give them a warm cup of cocoa and a good night's sleep and try them in the morning.
..any calls to another package do not work. ..
- Maybe the calls are just lazy. Try the carrot and/or stick approach.
- Maybe the calls are having some other problem, in which case, I'd suggest you refrain from paraphrasing the error, and instead [copy/paste the exception or error message|http://pscode.org/javafaq.html#exact] that is being produced.
well thats the thing..I do not get any error message..It just does not respond. I created the JAR file using eclipse..here is the generated ant file
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <project default="create_run_jar" name="Create Runnable Jar for Project HMS"> <!--this file was created by Eclipse Runnable JAR Export Wizard--> <!--ANT 1.7 is required --> <target name="create_run_jar"> <jar destfile="C:/Users/User/Desktop/MYJAR.jar" filesetmanifest="mergewithoutmain"> <manifest> <attribute name="Main-Class" value="Login.loginMain"/> <attribute name="Class-Path" value="."/> </manifest> <fileset dir="C:/Users/User/Documents/Project/Implementation"/> </jar> </target> </project>
joshmo wrote:OK. Note that the first letter of every sentence should be upper case.
no error message or any message output.
Is the code [swallowing exceptions|http://pscode.org/javafaq.html#stacktrace] at any point?
..My UI in the main package opens and I cant call any other UI in another packageHow do you know that if there is absolutely no error output?
What is the output for these two commands (untested - adjust to need)?
prompt> dir C:/Users/User/Desktop/*.jar
What is the final content of the manifest file?
prompt> dir C:/Users/User/Documents/Project/Implementation/*.jar
This is the output..
My manifest file contains
05/05/2010 10:19 AM 10,946,787 MYJAR.jar 1 File(s) 10,946,787 bytes 0 Dir(s) 1,434,251,264 bytes free
Manifest-Version: 1.0 Class-Path: . Main-Class: Login.loginMain
AndrewThompson64 wrote:Is the code [swallowing exceptions|http://pscode.org/javafaq.html#stacktrace] at any point?Nope..
AndrewThompson64 wrote:The when I ran the code from my compiler, it has no errors, and it works smoothly. I have used a JAR for a single package program before and it worked well but this multiple package program is giving me the problem and I don't want to put all the files in a single package
How do you know that if there is absolutely no error output?
ejp wrote:<head-desk /> The ['Understanding class path wildcards' section of 'Setting the class path'|http://java.sun.com/javase/6/docs/technotes/tools/windows/classpath.html] supports your statement.
I believe the class-path of a manifest file can only name other .jar files.
..class path wildcards are not honored in the Class-Path jar-manifest header.I was thinking of the abilities of the SDK tools to accept wildcards. I am still curious as to why that produced no exceptions or errors in the output.
Pardon my misrepresentation. Perharps when I was running the jar file I didn't maneuver around the program fully. I happened to get an exception which is "no suitable driver found" I have been checking this out almost all day and have failed to get a work around. On some forums I read adding "Class.forName("com.mysql.jdbc.Driver")" would help, but it throws a "class not found exception". My class paths are all okay because I can access the database from the actual program. I have tried adding the "mysql-connector-java-5.1.10-bin.jar" to the Manifest file but this does not do the trick so I am kind of confused on what to do, or perhaps I have got myself jumbled up.
joshmo wrote:Sure. But my understanding of the manifest class-path is that to be found, the Jar specified with no path would need to be in the same directory as your main Jar. Your directory listing in reply 6 suggests it is not in that directory.
..I have tried adding the "mysql-connector-java-5.1.10-bin.jar" to the Manifest file but this does not do the trick so I am kind of confused on what to do, or perhaps I have got myself jumbled up.