cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
robsahm
Level 4

putArchive() NOT WORKING!!! Need help

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 🙂
Labels (1)
0 Kudos
(6) Replies
robsahm
Level 4

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.
0 Kudos
RobertDickau
Flexera Alumni

If you want the JAR file simply to be placed inside setup.jar, perhaps use putResource instead of putArchive?
0 Kudos
rmackay
Level 7

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?
0 Kudos
sithlord
Level 4

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
0 Kudos
JaySim20
Level 3

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?
0 Kudos
JaySim20
Level 3

There was a JDK mismatch problem, discovered it when using -Dis:debug=1

UnsupportedClassVersionError
0 Kudos