on 12-11-2006 9:42 AM
Hi all,
I had created a java project that calls RFC for getting data from Ztable(by creating proxy) which is having a main Class. How can I create an executable jar file of that project using the jar command of jdk.
Thanks
Fahad Hamsa
Hi Anil,
I tried that option and generated an executable jar file. But when i tried to execute the jar file it is showing coulnot find main class. But the main class is there in the manifest file of jar.
My requirement is to create an executable jar file accessing Ztable and schedule that jar file in window's Task scheduling.
So I just want to execute " RFC calling program" from DOS prompt
Thanks
Fahad Hamsa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi Fahad,
You can create jar by using 'jar' command at command prompt, e.g. jar -cvf jarfile.jar files.
Jar files can be executed by using java -jar jarfile.jar.
If you are facing errors in manifest file, make sure it is in proper format and fully qualified package names.
A gudd note on all this is <a href="http://neptune.netcomp.monash.edu.au/JavaHelp/howto/jar.htm">here</a>
cheers
avadh
Hi Fahad,
The problem is that you have to add the jar file that contains the AbstractProxy in your jar file (aii_proxy_rt.jar).
Then your project knows where to find this AbstractProxy class.
So in your manifest file you have to have something like this:
Class-Path: lib/aii_proxy_rt.jar
Maybe you'll get a different exception then, containing a other jar file that is missing, just put that jar files also.
Refer to the sun site
http://java.sun.com/j2se/1.4.2/docs/tooldocs/windows/jar.html
Using IDE, you can use "Export option to create a Jar file"
Go to File->Export->Jar
Regards, Anilkumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.