Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a jar file named main.jar with the Manifest entry as:
VB
Main-Class : tss.Report
Class-Path : lib/Classes12.jar lib/xlist.jar lib/axis2.jar


now I have the lib folder in the same directory as that of the jar file and I am able to run the jar also from command prompt by using "java -jar" command.

But whenever I place the jar with the lib folder to my server and try to invoke the jar using same command from linux environment I get an error message saying something like :Cannot access the jar file because it is corrupt or in bad format.

I have a clientclasses folder in the server evenif I tried by placing my main.jar in the folder that has the clientclasses and changed the Manifest file accordingly as :
VB
Main-Class : tss.Report
Class-Path : clientclasses/Classes12.jar clientclasses/xlist.jar clientclasses/axis2.jar

but with no success.

Alternate method I thought of is:
coding my program in the application server it self and Scheduling the run of my program from the application set to run in application server.
Can I directly run my application from the application server .If yes then in which file of the existing application in the server I have to schedule the run of my program.In other words which is the file or what is the method that I can use to run my application.

Kindly help me to know how to run a jar having more than one dependent jars from server.
Posted
Updated 29-Jan-12 7:57am
v3
Comments
Richard MacCutchan 29-Jan-12 3:55am    
What happens if you try to run the program on the Linux server, do you get the same issue? Are you sure that you are not getting the file corrupted when it's copied to the server?
Be Yourself 29-Jan-12 13:53pm    
How to ensure that?
Even I am using winscp to copy the jar and using binary mode also.
I don't think the file is corrupted there's some other issue plz anyone help me.
Richard MacCutchan 29-Jan-12 14:02pm    
Sorry, I cannot think of anything else to suggest.

1 solution

You are probably using this: Apache Axis Tutorial[^]?

You need to deploy a WAR file for a AXIS Server - not a JAR file.
 
Share this answer
 
Comments
Be Yourself 1-Jul-12 0:41am    
I am not deploying any webservice
I am just running a java class file having main method.
TorstenH. 3-Jul-12 3:46am    
...and then why are there AXIS2 jars involved?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900