cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Juhana
Level 3

Problem with custom panes and jar packing

Hi
I am new to writing custom code panels to IntallAnywhere. So I downloaded some examples from acressos site, namely ChooseInstallDrive.

http://www.acresso.com/webdocuments/Downloads/ChooseInstallDrive.zip

I got it up and running in no time no problems whatsoever. However when I made some modifications to .ChooseInstall
Drive.java file, then things got a bit more difficult. I was able to compile it easily with javac

C:\Documents and Settings\jyr\Desktop\InstallAnywhereSamples>javac ChooseInstallDrive.java
Note: ChooseInstallDrive.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.


It did give some warnings but it did compile. I got my class file. Next I created a jar file.

C:\Documents and Settings\jyr\Desktop\InstallAnywhereSamples>jar -cvfM ChooseInstallDrive.jar "C:\Documents and Settings\jyr\Desktop\InstallAnywhereSamples\ChooseInstallDrive.class"

adding: C:/Documents and Settings/jyr/Desktop/InstallAnywhereSamples/ChooseInsta
llDrive.class(in = 4062) (out= 2189)(deflated 46%)


Ok I got the jar file but the panel does not work with this jar-file anymore. I even tried to compile the exact original ChooseInstallDrive.java but with same results. Installer just skips whole custom code panel. I might have forgotten to add some files to that jar package but what?

Thanks in advance
Labels (1)
0 Kudos
(4) Replies
pv7721
Level 20

If the version you've compiled your custom code does not match the version you bundle in your installer (for example: if you compiled it with Java 1.6 but you bundle Java 1.5 then the custom code cannot be executed because of the generated bytecode incompatibilities).
0 Kudos
Juhana
Level 3

Hi
I downgraded my java compiler to JRE 1.6.0_02 but no luck. Same results. Could someone post a brief instructions and sample code how to compile and add custom panels to projects please
0 Kudos
pv7721
Level 20

Have you check the relevant section of the manual, there is a whole chapter that covers custom code!
0 Kudos
Juhana
Level 3

Hi
Thanks. I got it finally working. Thank you. This might have been a issue with java packing I needed to pack the directory structure as well.

This structure was not included in the zip file directly however it was included in the jar-file.
0 Kudos