ReplicatorG icon indicating copy to clipboard operation
ReplicatorG copied to clipboard

Running on OSX 10.10

Open hermanbanken opened this issue 9 years ago • 15 comments

This is an old project, but still in use. Using Java 1.8 and newer rxtx drivers it still runs.

http://blog.brianhemeryck.me/installing-rxtx-on-mac-os-mountain-lion/ describes where to get newer drivers.

Using this command I managed to run the UI:

java -ea \
-Xmx2g \
-XX:+HeapDumpOnOutOfMemoryError \
-Djava.library.path=./ReplicatorG/build/macosx/dist \
-Dreplicatorg.app-resources=./ReplicatorG/build/shared/lib \
-Dreplicatorg.toolpath=./ReplicatorG/build/macosx/dist/tools \
-classpath \
./ReplicatorG/build/macosx/jarbundler-2.2.0.jar:/Library/Java/Extensions/RXTXcomm.jar:./ReplicatorG/build/shared/lib/filedrop.jar:./ReplicatorG/build/shared/lib/j3dcore.jar:./ReplicatorG/build/shared/lib/j3dutils.jar:./ReplicatorG/build/shared/lib/jcommon-1.0.16.jar:./ReplicatorG/build/shared/lib/jfreechart-1.0.13.jar:./ReplicatorG/build/shared/lib/miglayout-3.7.4.jar:./ReplicatorG/build/shared/lib/mrj.jar:./ReplicatorG/build/shared/lib/quaqua.jar:./ReplicatorG/build/shared/lib/twitter4j-2.0.10.jar:./ReplicatorG/build/shared/lib/vecmath.jar:/System/Library/Java:./ReplicatorG/build/jar/ReplicatorG-Dreplicatorg.app-resources=./ReplicatorG/build/shared/lib \
-Dreplicatorg.toolpath=./ReplicatorG/build/macosx/dist/tools \
-classpath \./ReplicatorG/build/macosx/jarbundler-2.2.0.jar:./ReplicatorG/build/shared/lib/RXTXcomm.jar:./ReplicatorG/build/shared/lib/filedrop.jar:./ReplicatorG/build/shared/lib/j3dcore.jar:./ReplicatorG/build/shared/lib/j3dutils.jar:./ReplicatorG/build/shared/lib/jcommon-1.0.16.jar:./ReplicatorG/build/shared/lib/jfreechart-1.0.13.jar:./ReplicatorG/build/shared/lib/miglayout-3.7.4.jar:./ReplicatorG/build/shared/lib/mrj.jar:./ReplicatorG/build/shared/lib/quaqua.jar:./ReplicatorG/build/shared/lib/twitter4j-2.0.10.jar:./ReplicatorG/build/shared/lib/vecmath.jar:/System/Library/Java:./ReplicatorG/build/jar/ReplicatorG.jar replicatorg.app.Base

This removes the 32 bit restriction that is added in the ant.properties and the 1.5 Java version from the build.xml file.

For those of you who are interested in running this on modern OSX's. Feel free to use this knowledge to create a new release.

hermanbanken avatar Oct 07 '16 16:10 hermanbanken

After running however, I cannot seem to load STL files as the javax package was changed.

The error I'm receiving is comparable to: http://forum.jogamp.org/NoClassDefFoundError-GLCapabilitiesChooser-on-OS-X-Snow-Leopard-and-Java-1-6-td4008344.html

hermanbanken avatar Oct 07 '16 16:10 hermanbanken

Ugh, i'm having the exact same problem, except I get that class not defined error at startup on OSX 10.12.3.

synfinatic avatar Mar 04 '17 02:03 synfinatic

You must have the preferences in RepG set to load the last opened STL... Although, with that said, RepG 40r33 runs fine for me on OS X 10.12.3. Loads STLs fine. Keep in mind RepG ships with it's own JRE. It doesn't use the Java installed on your Mac; it uses the Java (Runtime Environment) contained in the folder it is shipped with.

dnewman-polar3d avatar Mar 04 '17 02:03 dnewman-polar3d

But, at the end of the day, RepG is only provided as a tool to download firmware to a printer. It's not provided to use as a slicer anymore. Not too sure what to advise you to work around the .plist file setting you must have telling RepG to open the last opened STL. You likely want to find the repg .plist file, ~/Library/Preferences/org.replicatorg.app.plist. HOWEVER, I vaguely recall that it uses Java's library for storing application preferences so you likely also need to use the plist editor on ~/Library/Preferences/com.apple.java.util.prefs.plist and there remove any preferences for repg/replicatorg.

dnewman-polar3d avatar Mar 04 '17 02:03 dnewman-polar3d

So I removed the entry from ~/Library/Preferences/com.apple.java.util.prefs.plist, but I have no ~/Library/Preferences/org.replicatorg.app.plist. I looked in the source code, but still have no idea what the key/value pairs that are necessary for setting the last opened STL. Any pointers?

synfinatic avatar Mar 04 '17 20:03 synfinatic

They would be items under one of those two plist files. I don't recall the names offhand and would have to dig through the sources myself. But if they were there, they would be obvious: you'd see a value with the name of an STL file -- a file whose name ends with the ".stl" extension.

dnewman-polar3d avatar Mar 04 '17 21:03 dnewman-polar3d

So I started over with a clean version of ReplicatorG/Sailfish 40-33.

So as far as I can tell, it ignores ~/Library/Preferences/org.replicatorg.app.plist because it keeps re-writing entries to ~/Library/Preferences/com.apple.java.util.prefs.plist. I deleted the old replicatorg entries, let it create a minimal set of new ones and added last.sketch.path and set it to a known good .stl file.

Double clicking on the ReplicatorG.app does nothing. I tried: $ open /Applications/Replicatorg.app

LSOpenURLsWithRole() failed with error -10810 for the file /Users/aturner/Desktop/ReplicatorG.app

Then: $ open -a /Applications/ReplicatorG.app ~/Things/Examples/Teapot.stl LSOpenURLsWithRole() failed for the application /Applications/ReplicatorG.app with error -10810 for the file /Users/aturner/Things/Examples/Teapot.stl.

So I tried: $ /Applications/ReplicatorG.app/Contents/MacOS/ReplicatorG

[JavaAppLauncher Error] CFBundleCopyResourceURL() failed loading MRJApp.properties file [JavaAppLauncher Error] CFBundleCopyResourceURL() failed while getting Resource/Java directory [LaunchRunner Error] No main class specified [JavaAppLauncher Error] CallStaticVoidMethod() threw an exception Exception in thread "main" java.lang.NullPointerException at apple.launcher.LaunchRunner.run(LaunchRunner.java:113) at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51) at apple.launcher.JavaApplicationLauncher.main(JavaApplicationLauncher.java:61)

synfinatic avatar Mar 04 '17 23:03 synfinatic

But the point was to not have it open any STL file on startup. You just now gave it one to open.

So I tried: $ /Applications/ReplicatorG.app/Contents/MacOS/ReplicatorG

All I can say is that it works for me on OS X 10.12.3. I just downloaded the replicatorg-0040r33-Sailfish-mac.dmg.zip file from Thingiverse just to make sure there wasn't something odd about the one I had installed on my laptop.

dnewman-polar3d avatar Mar 05 '17 00:03 dnewman-polar3d

Oh, I misunderstood. I removed all replicatorg related plist info and I get the same error. Thanks for trying to help.

synfinatic avatar Mar 05 '17 00:03 synfinatic

At this point, I don't know what your issue might be. Clearly environmental since it doesn't happen on my OS X 10.12.3.

dnewman-polar3d avatar Mar 05 '17 00:03 dnewman-polar3d

It looks like macOS 10.13 broke something, since while ReplicatorG still runs (with the legacy Java runtime installed), it no longer sees any ports.

d235j avatar Oct 30 '17 23:10 d235j

And can you communicate with the printer's USB via other programs? This wouldn't be the first time that Apple has done in the USB drivers. Back with Mavericks (IIRC) they did in FTDI when they tried to roll their own. Not that this is FTDI; that's just a for-instance. You may need to re-install USB drivers somehow.

dnewman-polar3d avatar Oct 30 '17 23:10 dnewman-polar3d

No problems talking to the printer via Simply3D on my Mac.

synfinatic avatar Oct 30 '17 23:10 synfinatic

It's not a USB driver issue — the printer appears as expected at /dev/tty.usbmodem1451.

d235j avatar Oct 31 '17 00:10 d235j

Well, I myself do not have any intentions of fixing this. It's open source so someone so inclined can investigate. If they should work out a fix, they are welcome to open a push request.

dnewman-polar3d avatar Oct 31 '17 00:10 dnewman-polar3d