dcsimg
Move file location within jar
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Max_Win
Posted On:   Thursday, September 20, 2007 01:57 PM

Hi, I give in trying to do this, and hope someone here can help! When the jar is built, I end up with the file layout: jar... ......plugin.xml ......com ......com....company ......com....company....myClass.class ......com....company....myClass2.class I would like the classes built from the Netbeans src directory to be packaged in the jar under a subdir of classes. So Ant would need to create the classes subfolder, and move the compiled class files (with any sub-dir heirachy of their own) into the classes subfolder, instead of the jar.root folder. jar... ......plugin.xml ......clas   More>>

Hi,


I give in trying to do this, and hope someone here can help!







When the jar is built, I end up with the file layout:



jar...

......plugin.xml

......com

......com....company

......com....company....myClass.class

......com....company....myClass2.class



I would like the classes built from the Netbeans src directory to be packaged in the jar under a subdir of classes. So Ant would need to create the classes subfolder, and move the compiled class files (with any sub-dir heirachy of their own) into the classes subfolder, instead of the jar.root folder.



jar...

......plugin.xml

......classes....com

......classes....com....company

......classes....com....company....myClass.class

......classes....com....company....myClass2.class



Hope that makes sense. What would I need to add to build.xml to make the jar do this file move after compiling?
Thank you for your help.



Max.    <<Less

Re: Move file location within jar

Posted By:   Anonymous  
Posted On:   Monday, September 24, 2007 01:55 AM

You have to 'overwrite' the jar-target. You could use a nested in the which supports 'prefix' attribut.


But if the classes are not where they are, the JVM wouldnt find them ...
About | Sitemap | Contact