Classpath patch

this one's only for eclipse users. nothing special, it just adds the natives to the classpath so you don't have to add the -Djava.library.path VM argument to the run configurations every time.


### Eclipse Workspace Patch 1.0
#P jmephysics
Index: .classpath
===================================================================
RCS file: /cvs/jmephysics/.classpath,v
retrieving revision 1.1
diff -u -r1.1 .classpath
--- .classpath   30 Mar 2006 11:26:32 -0000   1.1
+++ .classpath   22 Jan 2007 10:13:37 -0000
@@ -2,13 +2,17 @@
 <classpath>
    <classpathentry kind="src" path="src"/>
    <classpathentry kind="src" path="impl/ode/src"/>
-   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+   <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
+      <attributes>
+         <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="jmephysics/impl/ode/lib"/>
+      </attributes>
+   </classpathentry>
    <classpathentry kind="src" path="test"/>
    <classpathentry kind="src" path="test-interactive"/>
    <classpathentry combineaccessrules="false" kind="src" path="/jME"/>
    <classpathentry kind="lib" path="ant/lib/junit.jar">
       <attributes>
-         <attribute value="jME Physics 2/impl/ode/lib" name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY"/>
+         <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="jME Physics 2/impl/ode/lib"/>
       </attributes>
    </classpathentry>
    <classpathentry kind="output" path="classes"/>



edit: for avoiding confusion: it's for jmephysics 2

Thanks! Committed.

i noticed you changed the junit lib path to "jME Physics 2/impl/ode/lib", while the one for the jre is "jmephysics/impl/ode/lib"

this breaks the junit native lib config here. i wonder if this can't be done with some eclipse workspace variables otherwise this doesn't make sense unless everyone calls his project "jmephysics" (like in the cvs) or "jME Physics 2" (the way you have it locally) :expressionless:

err, well I just applied your patch - I'm not an eclipse user - that xml made sense to me… but now you're talking about it I notice that difference in naming… what should be done? Change "jmephysics" in your patch to "jME Physics 2"?

i would recommend jmephysics as it's the same name as the cvs module. otherwise users would have to check out in a folder named "jME Physics 2". if they don't, the build path would be broken. if they repair it, they change the CVS monitored file.



so change/leave it to jmephysics, and if there are complaints, either remove the file or point them into the right direction. but i assume there won't be many complaints.

By the way, I remember something similar happening with the dependence from jME that there is in jmephysics. I checked out as 'jme' (lowercase) and the dependence in jmephysics is to 'jME' (M and E uppercase).



Anyway, this is not really a problem, but that's why I don't upload the IDE project descriptors to repositories.

Sounds good. Done… waiting for complaints :wink: . . .



@jjmontes: true, thought it was easier for newbies to set it up this way - when you think it makes it more complicated I would remove them entirely…  (which would break their configurations once again, btw)

complaint: i had to rename my project from 'jME' to 'jme' :stuck_out_tongue:

I have a problem with your new .classpath.



The problem is you don't have to set the library path as VM arguments all the time

if you set the native library location when you add the library.

I have done this little howto use jME-physics with eclipse

and this makes your change in the .classpath unnecessary.

Sue said:

The problem is you don't have to set the library path as VM arguments all the time
if you set the native library location when you add the library.
I have done this little howto use jME-physics with eclipse
and this makes your change in the .classpath unnecessary.


the library is already added by default.
where's the howto?

Here it is!

http://www.jmonkeyengine.com/wiki/doku.php?id=setting_up_eclipse_to_build_jme-physics

I did it this way and everything works like a charm.

If something is wrong feel free to correct me  :wink:

i deleted my local copy of jmephsysics and checked out again according to your howto.

step 1 was all i needed (after that i was able to run the tests). because of the classpath settings, everything else was already set up, so i didn't need the steps 2 and 3 at all.

I thought so :wink:



but a problem occurs if you give you local copies another path then workspace/jME and jME physics 2

if you are new to eclipse and gave them other names it can create some frustration with this .classpath.

I for example named the cvs checkout jMonkey and not jME.


Sue said:

but a problem occurs if you give you local copies another path then workspace/jME and jME physics 2
if you are new to eclipse and gave them other names it can create some frustration with this .classpath.


none of my projects are in the eclipse workspace path.
as of the naming, i think it is more probably that people will name their projects like the cvs module than some other naming combinations. if they don't use those names, they will have to set up the paths. that's the worst case. otherwise they'll just have a running configuration which is better than nothing ;)

this is a good point…  I pass on that  8)

I will update the howto