Bleeding Edge reprap software.
I wanted to try the bleeding edge software that Adrian is working on. First I got the latest source
svn co http://reprap.svn.sourceforge.net/svnroot/reprap/trunk/reprap/host reprap
There is a setup-reprap-host-dev-environment.sh script that probably works but it downloads an installs versions of stuff, that i didn’t want cluttering up my system.
Also it seems that the intention is to distribute the files that get downloaded with the reprap source anyway, and indeed I already had them by now since they are in the svn repository.
In short I didn’t see the point of setup-reprap-host-dev-environment.sh and took it apon myself to “fix it” so that it uses the jar files included in reprap/lib
Firstly I modified the build-user.xml file so that the classpath was as specified in the manifest section as follows:
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
<attribute name="Class-Path" value="./lib/j3dcore.jar ./lib/vecmath.jar ./lib/j3dutils.jar ./lib/RXTXcomm.jar ./lib/swing-layout-1.0.3.jar ./lib/j3d-org-java3d-all.jar ./lib/"/>
</manifest>
The next step was to set the CLASSPATH enviroment variable so that I could compile the source
export CLASSPATH="./lib/j3dcore.jar;./lib/vecmath.jar;./lib/j3dutils.jar;./lib/RXTXcomm.jar;./lib/swing-layout-1.0.3.jar;./lib/j3d-org-java3d-all.jar"
Then I compiled it and moved the resulting reprap.jar file into the current dir …
cd reprap ant jar mv jar/reprap.jar .
… so that it could be run by using
./reprap-host.sh
Just catching up on your posts its looking good..
I need to decide on which OS to use next Windas or Ubuntu.. Just download Ubuntu 9.1
Oh and I got 4 of those Thermistors you found at Farnell thank they look good.. nice long leads too
Just remembered that the reason I wanted to post this was because I kept getting runtime errors, it turns out that when you run java with the -jar commandline option it ignores CLASSPATH environment variable aswell as ignoring the -classpath command line argument, so the only way to get it to work was to include the class path in the manifest of reprap.jar
The error I kept getting was:
Exception in thread "RepRap" java.lang.NoClassDefFoundError: javax/vecmath/Color3f
at org.reprap.Preferences.(Unknown Source)
at org.reprap.machines.MachineFactory.create(Unknown Source)
at org.reprap.Main.(Unknown Source)
at org.reprap.Main$10.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:190)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)
Caused by: java.lang.ClassNotFoundException: javax.vecmath.Color3f
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:319)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:264)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
… 12 more
Hopefully google will pick this up, and if anyone has the same problem then this post will be of use.
You normally use http://en.wikipedia.org/wiki/Manifest_file to declare classpath in jars.
Your ide should do that automatically if you use it.
I don't remember how to do it from the command line. IF you need to do it manually the look here http://en.wikipedia.org/wiki/Classpath_%28Java%29#Setting_the_path_in_a_Manifest_file
I understand that most people probably use Eclipse IDE to compile this source. I just wanted a neat way of doing it wihtout needing the IDE. As I understand, by adding the attributes to the build-user.xml file the said manifest file is automatically generated by ant. My solution works, but no doubt there are many ways to achieve the same thing.