wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Problem with JDK 1.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with JDK 1.4" Watch "Problem with JDK 1.4" New topic
Author

Problem with JDK 1.4

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I have written an applet using jdk 1.3. I have activation.jar, mail.jar, and mysql.jar (used for mysql db connection) in a folder called tools where all my java files reside. I include those when I compile my java files. On my web server, I have the main JAR file in a directory along with the tools directory where my other jar files exist. My applet tag in my html file is as follows with some sensitive information excluded:

This all works beautifully under jdk 1.3. I have now switched to jdk 1.4. I re-compiled all my java code and made my new JAR file. The applet still excutes and runs, however, I am getting the following errors in my JAVA CONSOLE whenever it needs activation.jar, mail.jar and the mm.mysql-2.0.9-bin.jar:

I was wondering if there is something different I need to do with jdk 1.4 and/or if they changed the way the compiler uses external jar files.
Any help would be greatly apprecitad.
Also, when I look at where the PC stores the cached jar files, the only one there is my main JAR file, HelpDesk.jar. So it appears that it is not downloading the external jar files.
Thanks again. Sorry this is so long.


GenRocket - Experts at Building Test Data
Ivor Horton
Author
Ranch Hand

Joined: Mar 22, 2002
Posts: 67
The API for reading and writing JAR files has changed. I think the changes are to JAR file caching but I haven't looked at the details. There are some other areas which may give you some problems. For instance, changes to JDBC 3.0 in 1.4 mean that 1.3 source may not be compatible. Binaries are supposed to be compatible though. The changes that affect compatibility are documented at:
http://java.sun.com/j2se/1.4/compatibility.html


Ivor Horton<br />Author of the Beginning Java Series including the new <a href="http://www.amazon.com/exec/obidos/ASIN/1861005695/ref=ase_electricporkchop" target="_blank" rel="nofollow">Beginning Java 2 SDK 1.4 Edition</a>
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I am going to start hunting, but if anyone has a link to the changes in JDK 1.4 as far as reading and writing jar files, please post it here.
Thanks.
And thanks to you Ivor.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Well, I found out part of my problem, however I still need a fix for it. I found out that when the jar files are being cached it won't cache jar files that exist in a subdirectory appearntly because it won't create the subdirectory. I placed the jar files in the same place as my main jar file and updated my html file and it worked wonderfully with no exceptions. However, I would really like to keep the extra jar files in their own folder. If anyone knows how this can be achieved, please let me know.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with JDK 1.4
 
Similar Threads
Problem with adding a Label to a Button
Problem: Adding ejb jar
Strange exception when mouse passes over JEditorPane's scrollbar
Problem getting image from JAR file
null pointer?