cisumma 0 Newbie Poster

Hello I was working through a Netbeans tutorial :
http://java.sun.com/developer/technicalArticles/java_warehouse/single_jar/

I am having a problem understanding adding my properties and xml dependencies contained
in an xml dir in my project (Please find screen print of dir)

I jar my app and it can not find these files or dir.

java -jar -Xmx256m

C:\Program Files\Java\jdk1.6.0_25\bin>java -jar -Xmx256m C:\Users\Steves\Documen
ts\ceyesumma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\mu
sicSystems\store\musicSystems.jar

error:

Oct 21, 2011 8:08:01 AM view.MusicSystemsApp startup
SEVERE: null
java.io.FileNotFoundException: xml\ModelResourcesXML.properties (The system cann
ot find the path specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:120)
        at java.io.FileInputStream.<init>(FileInputStream.java:79)
        at model.ModelUtils.loadXMLResources(ModelUtils.java:246)

deleted from the dist/lib dir
I deleted the individual xml and .properties and DTD files previously added and
Put entire dir of their parent dirs’

contents of the dist\lib

lib\AbsoluteLayout.jar
lib\appframework-1.0.3.jar
lib\jcalendar.jar
lib\jdom-1.0.jar
lib\joda-time-1.6.2.jar
lib\joda-time-1.6.2-javadoc.jar
lib\joda-time-1.6.2-sources.jar
lib\joda-time-1.6.jar
lib\junit-3.8.2.jar
lib\junit-4.5-src.jar
lib\swing-worker-1.1.jar
lib\xml\keycards.xml
lib\xml\keycardsDTD.DTD
lib\xml\ModelResourcesXML

rebuild target and run:

package-for-store:
Packaging School Database Application  into a single JAR at store/musicSystems.jar
Created dir: C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\musicSystems\store
Building jar: C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\musicSystems\store\temp_final.jar
Building zip: C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\musicSystems\store\musicSystems.jar
Deleting: C:\Users\Steves\Documents\ceyesumma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\musicSystems\store\temp_final.jar
BUILD SUCCESSFUL (total time: 17 seconds)

double clicked new musicSystems.jar: bad

used: java -jar -Xmx256m

C:\Program Files\Java\jdk1.6.0_25\bin>java -jar -Xmx256m C:\Users\Steves\Documen
ts\ceyesumma\java_cache\my_projects\netbeans\musicSystems\target_musicSystems\mu
sicSystems\store\musicSystems.jar

I did not solve the missing (properties,DTD,xml) files.

Oct 21, 2011 8:18:27 AM view.MusicSystemsApp startup
SEVERE: null
java.io.FileNotFoundException: xml\ModelResourcesXML.properties (The system cann
ot find the path specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:120)
        at java.io.FileInputStream.<init>(FileInputStream.java:79)
        at model.ModelUtils.loadXMLResources(ModelUtils.java:246)
        at model.dao.ConnectDerbyDAOWorker.loadDBProperties(ConnectDerbyDAOWorker

How does this work? The project folder (attached ) allows the path to the xml file
To load but the jar file created does not find it?
Please find attached a print screen of how the project file structure runs within the
Netbeans IDE:

To me it almost looks like I may need to alter the program to look for the xml
somewere else because when the jar runs it will always be looking for ModelResourcesXML.properties in an xml dir.

additional step by step proceedures have been atached but not recommended that
you view it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.