PDA

View Full Version : putArchive() NOT WORKING!!! Need help



robsahm
03-10-2006, 06:49 AM
I desparately need to include external JAR files in my project and then access class files inside the .jar file at run time. I can not get putArchive() to work. Here is my code in the build method, If I include a single class file with putClass it works.

support.logEvent(this,"INFORMATION","message " + "building : " + "GetProcessList");
support.putClass("com.sap.installshield.GetProcessList");
support.logEvent(this,"INFORMATION","message " + "building : " + "GetProcessList");
support.putArchive("C:\\Program Files\\Macrovision\\IS11.5MP\\classes\\GetProcessList.jar",new AllArchiveFilter());
support.logEvent(this,"INFORMATION","message " + "finished");

The build works without any errors however when I open the setup.jar file the embedded JAR is not included. I opened up assembly.dat and even looked in there. The class file I build is in there, however the JAR is not. Also I can not depend on the embedded JAR function on the launcher either as that does not work. Someone please help :)

robsahm
03-10-2006, 07:23 AM
If I include a JAR file which only has .class file inside then it works. However the .jar file I need to include has subdirectories and included .JAR files.

RobertDickau
03-10-2006, 12:23 PM
If you want the JAR file simply to be placed inside setup.jar, perhaps use putResource instead of putArchive?

rmackay
03-14-2006, 03:10 PM
I created a test.jar which contains all of my custom classes and the support classes for them and when using putArchive it appears to work but I do not see the jar file included in the setup.jar that resides in the directory with my setup.exe file. Why wouldn't it be included in that setup.jar file as well?

Also - does every custom action class file need to have the putArchive method in their build method? Or is doing it once sufficient?

sithlord
03-31-2006, 11:03 PM
Welcome to hell... that is all I can say when it comes to putArchive. All those files are placed inside setup.jar (or whatever you called your installer archive). Assuming you called your archive setup.jar, the files are located as follows:
setup.jar\install\data\{UUID}\{VERSION}\assembly.dat. assembly.dat is just another archive. You can open it and look inside of it. There you'll notice all your files.

You only need to putArchive once in your project. We dedicated one bean to handle all this mess.

* UUID and VERSION are defined inside Product Properties section.

Hey, I asked for ketchup! I'm eatin' salad here!
--Homer Jay Simpsons

JaySim20
05-16-2006, 11:23 AM
I'm using a custom bean in my uninstaller. ISMP complains when it's building if the class isn't on the classpath, so I know it's looking for it. I have the jar on the classpath, I also have my custom bean doing a support.putArchive

No matter what I do, I can't seem to get this bean / jar into the uninstaller. The uninstaller jar has no assembly.dat file either.

Thoughts?

JaySim20
05-16-2006, 02:21 PM
There was a JDK mismatch problem, discovered it when using -Dis:debug=1

UnsupportedClassVersionError