[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running AppleCommander GUI?
On 05/26/2011 12:35 PM, schmidtd wrote:
There's a reason Rob bundled AppleCommander into an executable on
Windows and an app on Mac.
That's obviously a sound approach under the circumstances.
And there's a reason why I hide the Java
command line of ADTPro behind a script for Unix-alikes. It's
complicated.
Why on earth does it need to BE so complex? I cannot think of any other
language runtime environment that's even in the same order-of-magnitude. And,
for the record, I had no idea that I could run AC from ADTPro. I thought it
was intended for interchange of data with an A2 over serial link, not a
general file-manipulation tool. Since I use Appletalk for data transfer, I've
never had a need for ADT and thus have never laid eyes on it in action.
First, give full qualification to the jars you need. The classpath,
or -cp command line switch will do that for you:
-cp /usr/lib/java/swt-gtk-3.5.1.jar:/wherever/AppleCommander-1.3.5.jar
But then you also need to pull the main class out of the manifest;
that is: com.webcodepro.applecommander.ui.AppleCommander
Then, there are some native libraries for SWT too, aren't there?
There are on Windows and Mac. For those, you need to give the -
Djava.library.path= command line switch, and point to those, too.
So I can get you as far as that - there's still the issue of 64-bit
SWT native libraries, which I trust you know where are. A full
invocation might look like this:
java -Djava.library.path=/path/to/SWT/jnilibs -cp /usr/lib/java/swt-
gtk-3.5.1.jar:/wherever/AppleCommander-1.3.5.jar
com.webcodepro.applecommander.ui.AppleCommander -swt
(I'm unsure if the -swt switch is passed in - or if Java will consume
it.)
Worked perfectly, thanks. Despite having spent over an hour poking around on
Google, I saw nothing that even hinted in that direction.
For reference, this was the shell wrapper required (assumes the AC jar in the
current directory and a Ubuntu system of recent vintage):
#!/bin/bash
java \
-Djava.library.path=/usr/lib/jni \
-cp /usr/lib/java/swt-gtk-3.5.1.jar:AppleCommander-1.3.5.jar \
com.webcodepro.applecommander.ui.AppleCommander \
-swt