Current location: Hot Scripts Forums » Programming Languages » Everything Java » packaging few jar files and class into single jar file


packaging few jar files and class into single jar file

Reply
  #1 (permalink)  
Old 09-18-06, 05:09 AM
mohit's Avatar
mohit mohit is offline
Newbie Coder
 
Join Date: Jul 2006
Location: India
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
packaging few jar files and class into single jar file

Greetings,

i just started work on java...now i need a little help.

i have few jar and class files.

x.jar;
y.jar;
abc.class;
xyz.class;
mainabc.class;

i want to convert it all in single jar file.
when i converted and run it, giving error and not accessing the methods in x.jar and y.jar.

i need to know how can i convert it into single jar executable.
i followed these steps..
PHP Code:



c
:\app>jar cfm myapp.jar manifest.tmp *.class

c:\app>java -jar myapp.jar
class not found org/ijk/ghij/searchable 
last line in code is error when i run that jar executable.

where org/ijk/ghij/searchable is import in x.jar
i used x.jar and when i import package of x.jar so i wrote

import org.ijk.ghij.searchable;

in my application's class.

in manifest i gave the name of main class file

anyhelp will be appreciated.

Thanks
mohit
Reply With Quote
  #2 (permalink)  
Old 09-19-06, 04:15 PM
King Coder King Coder is offline
Community VIP
 
Join Date: Jan 2006
Posts: 703
Thanks: 0
Thanked 0 Times in 0 Posts
You can add jars to jars, but I don't think you can access a file if it's in a jar and you're trying to run a jar... Does that make sense? It sounds weird, but it seems to be what you're doing. In my opinion, adding a jar inside of a jar and trying to access something in that nested jar is a design flaw by the programmer and should not be done.
__________________
my site
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
jbuilder deletes away class file xEn[O]n Everything Java 0 08-12-05 11:59 PM
ASP upload prob minority ASP 1 06-27-05 08:35 AM
File upload Class therat PHP 3 03-17-05 02:08 PM
Upload file to table so ONLY files tied to primary key are displayed in record? grafixDummy PHP 4 12-20-03 04:28 PM
Upload file type and size limiter! Arctic ASP 1 08-02-03 07:06 PM


All times are GMT -5. The time now is 05:37 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.