Results 21 to 40 of 45
- 04-02-2008, 08:34 AM #21
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.
- 04-02-2008, 08:47 AM #22
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.
- 04-02-2008, 09:24 AM #23
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.
- 04-02-2008, 09:52 AM #24
- 04-02-2008, 10:10 AM #25
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.
- 04-02-2008, 10:20 AM #26
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?
- 04-02-2008, 11:05 AM #27
- 04-02-2008, 11:09 AM #28
- 04-02-2008, 11:19 AM #29
That means I was wasting ur time for the last two days ..
- 04-02-2008, 11:23 AM #30
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.
- 04-02-2008, 11:35 AM #31
Yes. its working within the dist folder.
- 04-02-2008, 11:38 AM #32
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.
- 04-04-2008, 08:09 PM #33Member
- Join Date
- Feb 2008
- Rep Power
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.
- 04-07-2008, 10:00 AM #34
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?
- 04-07-2008, 10:06 AM #35
- 04-07-2008, 12:57 PM #36
Yes..I want to load my application using only that jar file.
- 04-07-2008, 01:03 PM #37
- 04-07-2008, 01:19 PM #38
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..
- 04-07-2008, 01:54 PM #39
Yes it's true. You have to include all the jar files into single file, as a example,
jar cfm jar-file-name manifest_file input-file(s)/folder(s)
- 04-07-2008, 02:12 PM #40
- By kotoko in forum New To JavaReplies: 28Last Post: 10-26-2010, 04:39 AM
- By sajut in forum New To JavaReplies: 0Last Post: 02-15-2008, 06:47 AM
- By Java Tip in forum Java TipReplies: 0Last Post: 02-05-2008, 10:14 AM
- By vital101 in forum Advanced JavaReplies: 3Last Post: 10-30-2007, 06:17 PM
- By romina in forum New To JavaReplies: 1Last Post: 08-07-2007, 05:28 AM