jaknav
Pilgrim

java.lang.NoSuchMethodError: main while build

Hi All,

Can anybody explain me wht exactly the use of the Main class in InstallAnywhere?

I have a java project for which I need to create the installer. I had written my script to create the installer in PHP and when I try to run the same through cmdline I get the below error.
"java.lang.NoSuchMethodError: main"
Exception in thread "main"

My php code is able to create the xx.iap_xml project and when I open the same in IDE and build it, it builds without errors and also able to install the same.

can anybody tell me what am I doin wrong when I call the below command in php?

"c:/buildapps/jsdk/1.5.0_04/bin/java -verbose com.zerog.ia.integration.ant.InstallAnywhereAntTask -build "Default" 2>&1"

Appriciate for the help

Thanks & Regards
jaknav
Labels (1)
0 Kudos
7 Replies
pv7721
Flexera beginner

Oh my God, do you actually spit out in a programatical way the .iap_xml file?!? And using PHP?!? Then what need do you have for InstallAnywhere anyway? Have you tried opening your made up project with the Advanced Designer? Does it open? If the answer to the previous is Yes, does it also build from within the Advanced Designer?
0 Kudos
jaknav
Pilgrim

Yes I'm able to open the project in Advanced designer and also able to build through it.....but I want to build through commad line which I'm not able to do with the below cmd.

c:/buildapps/jsdk/1.5.0_04/bin/java -verbose com.zerog.ia.integration.ant.InstallAnywhereAntTask E:/build/CRM/C100/WIN2K/core/install/project-code-only/CRM.iap_xml -build "Default" 2>&1

The last few lines of verbose:

[Loaded com.zerog.ia.integration.ant.InstallAnywhereAntTask from file:/C:/buildapps/InstallAnywhere/8.0/resource/build/iaant.jar]

[Loaded org.apache.tools.ant.UnknownElement from file:/C:/buildapps/InstallAnywhere/8.0/resource/ant/ant.jar]

[Loaded org.apache.tools.ant.BuildException from file:/C:/buildapps/InstallAnywhere/8.0/resource/ant/ant.jar]

java.lang.NoSuchMethodError: main

[Loaded java.lang.Shutdown from c:\buildapps\jsdk\1.5.0_04\jre\lib\rt.jar]

[Loaded java.lang.Shutdown$Lock from c:\buildapps\jsdk\1.5.0_04\jre\lib\rt.jar]

Exception in thread "main"

Please do help me...urgent
0 Kudos
pv7721
Flexera beginner

I'm afraid you're doing it the wrong way: in order to build the .iap_xml project using the command-line tool, you have to use the build.exe located in your IA installation folder.
0 Kudos
jaknav
Pilgrim

I'm able to build through build.exe, how abt building the VM's?
wht options/args I have to pass to build.exe?

How to build the project through ANT? Any idea?

Appreciate your help
0 Kudos
pv7721
Flexera beginner

I strongly suggest consulting the manual, as there is a whole chapter which treats this issue of command-line building: you'll find there all the parameters which build accepts etc.

When it comes to building the project through ant, there is an iaanttask but I personally prefer to directly invoke build.exe using exec with the correct parameters (as people often have complained about issues with the iaanttask).
0 Kudos
jaknav
Pilgrim

Buddy thanks for the help....
Is there a way to build the InstallAnywhere project using Java?
I was using Java to build ISMP projects earlier and now I dont want to install Ant on build server for IA.

How can I build usin Java?
0 Kudos
pv7721
Flexera beginner

I don't think this is possible (I mean personally I've never used anything but building using the Advanced Designer or the build.exe tool). You're the first person that I know of to have tried such thing. You may want to contact directly the Acresso Software support, but I've have a hunch that they'll tell you that either 1) this is not possible or 2) they might let you know about a method, but they'll warn you about it not being supported. Franckly, I don't see the use of building using Java, because it completely removes the use for IA...
0 Kudos