NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
fabio.portieri
Joined: 19 Mar 2010 Posts: 34
|
Posted: Wed Jul 28, 2010 11:36 am Post subject: classpath issue on a maven netbeans rcp application |
|
|
Hi
i have an annoying issue on my app:
this works:
modelSys = ModelFactory.createModel("net/java/joglutils/model/resources/nave.3ds");
this don't: (file not found)
modelSys = ModelFactory.createModel("org/intecs/systemtracklayer/helidragon/s76d_dragon_air_taxi.3ds");
the 3ds files are present in both the paths, what could be the reason for the latter not to work?
this code is located in org/intecs/systemtracklayer package, ModelFactory code is inside net/java/joglutils/model package
and they are in different jars
Thanks for any help
p.s. before mavenizing the app i could use the resource on the org/intecs/systemtracklayer package with this
modelSys = ModelFactory.createModel("SystemTrackLayer/src/org/intecs/systemtracklayer/helidragon/s76d_dragon_air_taxi.3ds");
Below i'll paste the content of the two jars and the classpath string generated by netbeans
vts@linux-nz0s:~/.m2/repository/org/intecs/davwwj-lib/joglutils/1.0> jar tvf joglutils-1.0.jar
0 Wed Apr 30 08:29:22 CEST 2008 META-INF/
291 Wed Apr 30 08:29:20 CEST 2008 META-INF/MANIFEST.MF
0 Wed Jul 28 10:54:24 CEST 2010 net/
0 Wed Jul 28 10:54:30 CEST 2010 net/java/
0 Wed Jul 28 10:54:32 CEST 2010 net/java/joglutils/
0 Wed Jul 28 10:54:38 CEST 2010 net/java/joglutils/model/
0 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/
0 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/
0 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/max3ds/
0 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/obj/
0 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/geometry/
0 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/loader/
1204 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/ModelFactory.class
477 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/ModelLoadException.class
501 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/ResourceRetriever$1.class
2160 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/ResourceRetriever.class
276 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/DisplayListRenderer$1.class
2337 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/DisplayListRenderer$DisplayListCache.class
12545 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/DisplayListRenderer.class
1608 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/ModelTest$1.class
905 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/ModelTest$2$1.class
965 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/ModelTest$2.class
1529 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/ModelTest$MouseHandler.class
5652 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/ModelTest$Renderer.class
1991 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/ModelTest.class
9079 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/max3ds/POLYSHIP.JPG
1001 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/max3ds/sources.txt
21824 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/max3ds/spaceship.3ds
27313 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/obj/penguin.gif
179 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/obj/penguin.mtl
14325 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/examples/models/obj/penguin.obj
2283 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/geometry/Bounds.class
515 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/geometry/Face.class
701 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/geometry/Material.class
1176 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/geometry/Mesh.class
4417 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/geometry/Model.class
494 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/geometry/TexCoord.class
890 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/geometry/Vec4.class
243 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/iModel3DRenderer.class
1611 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/loader/LoaderFactory.class
2374 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/loader/MaxConstants.class
242 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/loader/MaxLoader$1.class
956 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/loader/MaxLoader$Chunk.class
14055 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/loader/MaxLoader.class
11627 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/loader/WaveFrontLoader.class
278 Wed Apr 30 08:29:22 CEST 2008 net/java/joglutils/model/loader/iLoader.class
0 Wed Jul 28 10:56:30 CEST 2010 net/java/joglutils/model/resources/
1257504 Wed Jul 28 10:56:30 CEST 2010 net/java/joglutils/model/resources/nave.3ds
vts@linux-nz0s:~/.m2/repository/org/intecs/SystemTrackLayer/1.0-SNAPSHOT> jar vtf SystemTrackLayer-1.0-SNAPSHOT.jar
0 Wed Jul 28 12:24:04 CEST 2010 META-INF/
1002 Wed Jul 28 12:24:02 CEST 2010 META-INF/MANIFEST.MF
0 Wed Jul 28 12:23:42 CEST 2010 org/
0 Wed Jul 28 12:23:42 CEST 2010 org/intecs/
0 Wed Jul 28 12:24:00 CEST 2010 org/intecs/systemtracklayer/
0 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/
2457 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/heliTrackFlip.png
118 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/Bundle.properties
2440 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/heliTrack.png
1232 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/layer.xml
2001 Wed Jul 28 12:24:00 CEST 2010 org/intecs/systemtracklayer/SysTrackAnnotation$1.class
1832 Wed Jul 28 12:24:00 CEST 2010 org/intecs/systemtracklayer/SystemTrackLayer.class
2809 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/heliIcon.png
4815 Wed Jul 28 12:24:00 CEST 2010 org/intecs/systemtracklayer/SysTrackAnnotation.class
9504 Wed Jul 28 12:24:00 CEST 2010 org/intecs/systemtracklayer/SysTrackCore.class
5389 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/Aircraft-32On.png
1257504 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/nave.3ds
3401 Wed Jul 28 12:24:00 CEST 2010 org/intecs/systemtracklayer/SysTrackCore$1.class
5684 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/AirSysTrack.png
4192 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/Aircraft-32Off.png
1612 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/wheelbox.jpg
14768 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76c_aer.jpg
1241 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/readme.txt
7215 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/ch_wheel.jpg
50717 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/fake_coc.jpg
8211 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76c_a01.jpg
52780 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/talefin_.jpg
1511 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/hh65a_wh.jpg
2318 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/wheelb01.jpg
9948 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/lamp_t.jpg
37832 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/ch_rotor.jpg
2428 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/ch_whe01.jpg
5354 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76c_a03.jpg
25908 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76c_a04.jpg
4302 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/dragon_a.jpg
6649 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76d_rot.jpg
4602 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/ch_whe03.jpg
1999 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/wheelb02.jpg
23230 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76_bott.jpg
1009 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/red_bulb.jpg
37969 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76_drag.jpg
6642 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/ch_whe02.jpg
705500 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76d_dragon_air_taxi.3ds
7980 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76c_a02.jpg
5403 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/ch_rot01.jpg
18341 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/brakelig.jpg
1001 Wed Jul 28 12:23:42 CEST 2010 org/intecs/systemtracklayer/helidragon/s76_door.jpg
0 Wed Jul 28 12:24:04 CEST 2010 META-INF/maven/
0 Wed Jul 28 12:24:04 CEST 2010 META-INF/maven/org.intecs/
0 Wed Jul 28 12:24:04 CEST 2010 META-INF/maven/org.intecs/SystemTrackLayer/
3728 Fri Jul 23 14:53:40 CEST 2010 META-INF/maven/org.intecs/SystemTrackLayer/pom.xml
119 Wed Jul 28 12:24:02 CEST 2010 META-INF/maven/org.intecs/SystemTrackLayer/pom.properties
Boot & Ext. Classpath = /usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/resources.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/rt.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/jsse.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/jce.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/charsets.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/classes:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-1.6.0-sun-1.6.0/jre/lib/ext/sunjce_provider.jar
Application Classpath = /home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/boot.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/org-openide-modules.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/org-openide-util.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/boot_ja.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/boot_pt_BR.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/boot_zh_CN.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/org-openide-modules_ja.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/org-openide-modules_pt_BR.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/org-openide-modules_zh_CN.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/org-openide-util_ja.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/org-openide-util_pt_BR.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/lib/locale/org-openide-util_zh_CN.jar:/usr/lib/jvm/java-1.6.0-sun/lib/dt.jar:/usr/lib/jvm/java-1.6.0-sun/lib/tools.jar
Startup Classpath = /home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/core/core.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/core/org-openide-filesystems.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/core/locale/core_pt_BR.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/core/locale/org-openide-filesystems_zh_CN.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/core/locale/org-openide-filesystems_ja.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/core/locale/core_zh_CN.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/core/locale/org-openide-filesystems_pt_BR.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/platform11/core/locale/core_ja.jar:/home/vts/Desktop/DAVWWLinux/mavenproject1/application/target/foo/bin/../foobar/core/locale/core_foo.jar
Bonus question:
why i cannot see in the classpath string the location of my modules?
which are stored in .../application/target/foo/modules/
Thanks in advance |
|
| Back to top |
|
 |
arittner
Joined: 10 Jun 2009 Posts: 118
|
Posted: Thu Jul 29, 2010 9:32 am Post subject: |
|
|
Hi!
Is org.intecs.systemtracklayer your modules code base name with the s76d_dragon_air_taxi.3ds file? If not, this could be your problem. I#ve no idea how ModelFactory works, but resources are only visible under the code base name path (and deeper).
An example:
Module x with code base name com.example.test: org/intecs/systemtracklayer/helidragon/s76d_dragon_air_taxi.3ds is invisible by the nbres:// protocol.
Module x with code base name org.intecs.systemtracklaye: org/intecs/systemtracklayer/helidragon/s76d_dragon_air_taxi.3ds is visible by the nbres:// protocol.
HTH.
br, josh. |
|
| Back to top |
|
 |
fabio.portieri
Joined: 19 Mar 2010 Posts: 34
|
Posted: Thu Jul 29, 2010 11:23 am Post subject: |
|
|
Thanks for your answer
yes, systemtracklayer holds the 3ds file:
org/intecs/systemtracklayer/helidragon/s76d_dragon_air_taxi.3ds
and his code base name correspond to the package
Aniway i solved moving the resources in the other jar in which there is modelfactory, and that is consistent with what you said:
"resources are only visible under the code base name path (and deeper)"
Before the mavenization i could make modelfactory load a resource outside the module:
modelSys = ModelFactory.createModel("SystemTrackLayer/src/org/intecs/systemtracklayer/helidragon/s76d_dragon_air_taxi.3ds");
maybe i was using the system classpath? I tried to inspect the classpath
(everytime i need to load a resource i have troubles :p) but i couldn't find the path in which my custom modules were |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|