Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #21 (permalink)  
Old 04-02-2008, 10:34 AM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
I followed all the steps described to create a jar file containing external jar files.

While creating the jar file manually I copied the external jars into a folder lib and use that in Class-Path attribute..

The manifest file that I created is exactly same as that generated by NetBeans. In both the problem is same.. The jar file is executing only in the current location.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #22 (permalink)  
Old 04-02-2008, 10:47 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
It should work pal. I've followed the same way in large number of times. At leas that dist folder content should work, even in another location, after extracting the jar file into the dist folder.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #23 (permalink)  
Old 04-02-2008, 11:24 AM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
Yes.There is lib folder containing all the external jars for my application.

The manifest file I created manually and the one generated by the NetBeans are same.I copied the jar files into a folder lib and used that path as Class-Path attribute value.

Both jar files-that I created and Netbeans created -have the same problem..They can execute only in the location where they are created.
Bookmark Post in Technorati
Reply With Quote
  #24 (permalink)  
Old 04-02-2008, 11:52 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by gowry View Post
Both jar files-that I created and Netbeans created -have the same problem..They can execute only in the location where they are created.
Sorry if I asking the same thin and dump you. In the different location did you try it by extracting the jar which is in the dist folder. Not the jar file create.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #25 (permalink)  
Old 04-02-2008, 12:10 PM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
Yes.. extracted the jar in the dist folder in another location and execute.thats giving an exception like class in the external jar file not found..

In the manifest file everything is fine.its having the main class name and class path..

If I copied the dist folder and execute the jar.its working.. I think its because the lib folder is within it and so.
Bookmark Post in Technorati
Reply With Quote
  #26 (permalink)  
Old 04-02-2008, 12:20 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
No I think still you are not doing what I say.

Now you have a dist folder, which contain a jar file and the folder called 'lib' and README.txt file. Now copy that dist folder to separate location. Say D:\Temp\


Still that dist folder contain lib folder, text file and jar file.

In that point, execution of the jar file is not work.

Then extract the jar file to same folder, I mean to dist folder. Now you have followings in the dist folder.

1. lib folder
2. README.txt file
3. jar file which has the name of your project
4. META-INF folder
5. Another folder which has the same name as your project.

Is that right?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #27 (permalink)  
Old 04-02-2008, 01:05 PM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
Quote:
Originally Posted by Eranga View Post
No I think still you are not doing what I say.

Now you have a dist folder, which contain a jar file and the folder called 'lib' and README.txt file. Now copy that dist folder to separate location. Say D:\Temp\?

Still that dist folder contain lib folder, text file and jar file.

In that point, execution of the jar file is not work.
Copied dist to D:\temp and execute it there using

java -jar jarfile.

Its working..

The exception occures when am
move the jarFile from dist to D:\temp and try to execute the jar file at D:\temp.



Quote:
Originally Posted by Eranga View Post

Then extract the jar file to same folder, I mean to dist folder. Now you have followings in the dist folder.

1. lib folder
2. README.txt file
3. jar file which has the name of your project
4. META-INF folder
5. Another folder which has the same name as your project.

Is that right?
yes.
Bookmark Post in Technorati
Reply With Quote
  #28 (permalink)  
Old 04-02-2008, 01:09 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Quote:
Originally Posted by gowry View Post
The exception occures when am
move the jarFile from dist to D:\temp and try to execute the jar file at D:\temp.
Just only jar file moving to another location it's not work. It simply destroyed the folder structure of the package. Moving whole dist folder and do stuff is the way to do.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #29 (permalink)  
Old 04-02-2008, 01:19 PM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
Ohhhhhh NO..

That means I was wasting ur time for the last two days ..

Sorry..
Bookmark Post in Technorati
Reply With Quote
  #30 (permalink)  
Old 04-02-2008, 01:23 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Don't worry. In most the things we have learn after doing the wrong things in thousand times. I like to let others what I know

Now what happened. Is it ok.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #31 (permalink)  
Old 04-02-2008, 01:35 PM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
Yes. its working within the dist folder.

Thank You...
Bookmark Post in Technorati
Reply With Quote
  #32 (permalink)  
Old 04-02-2008, 01:38 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
You are welcome.

If you feel that your problem is solved, please mark this thread solved from the Thread Tools of the menu. If not, it's ok. Just leave this as it is.

Still you have some issues relating to this topic, post here, please don't start a new thread.

Eranga
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #33 (permalink)  
Old 04-04-2008, 10:09 PM
Member
 
Join Date: Feb 2008
Posts: 45
new_2_java is on a distinguished road
Just to add to it:

If you require to add external jar files to your executable jar, in your Manifest file, then you need to provide the relative path to your external jars in your Manifest file.
Bookmark Post in Technorati
Reply With Quote
  #34 (permalink)  
Old 04-07-2008, 12:00 PM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
Yes.I specified the relative path of jars in Manifest file as Class-Path attribute.yes its working.but I should carry that jar files folder with my application wherever I want to execute my application.Is there any solution to execute jar file independently?
Bookmark Post in Technorati
Reply With Quote
  #35 (permalink)  
Old 04-07-2008, 12:06 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
So, you need to create a single jar file, isn't it?
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #36 (permalink)  
Old 04-07-2008, 02:57 PM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
Yes..I want to load my application using only that jar file.
Bookmark Post in Technorati
Reply With Quote
  #37 (permalink)  
Old 04-07-2008, 03:03 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
I think you try it early. Create a single jar file including libraries you used.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #38 (permalink)  
Old 04-07-2008, 03:19 PM
gowry's Avatar
Member
 
Join Date: Apr 2008
Location: India
Posts: 27
gowry is on a distinguished road
yes.I create jar file by giving the external jar file path as Class-Path values in manifest file,.My problem occures from that time.. I cant execute the jar file in any other location without copying the external jar am using..
Bookmark Post in Technorati
Reply With Quote
  #39 (permalink)  
Old 04-07-2008, 03:54 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 5,075
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Yes it's true. You have to include all the jar files into single file, as a example,

Code:
jar cfm jar-file-name manifest_file input-file(s)/folder(s)
in manifest file you have to refer all folders you use.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Someone helped you?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.
Help:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Resources:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Web:
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Tips:
To view links or images in signatures your post coun