[SOLVED] Mac Issues, doesn't recognise Java...

Need help? Post your questions here.

Moderator: moderators

[SOLVED] Mac Issues, doesn't recognise Java...

Postby montymintypie » Fri Jan 09, 2009 5:19 am

EDIT: Decided not to bump this thread since it's so old. I have since upgraded to Leopard and everything works fine.


I've subscribed to this post, so will read and reply quickly to help. :D

I'm trying to get Subsonic to work on Mac OS X 10.4.11

I've put it in /private/var/subsonic/standalone, as Mac has var inside the private folder. Changed permissions so Subsonic has read/write access.

Running the .sh script in Terminal gives me this:

/private/var/subsonic/standalone/subsonic.sh: line 16: /bin/java: No such file or directory


Any help here? I DO have Java, I know that for a fact. I don't think that $JAVA_HOME is defined properly in Mac.

Thanks in advance!
Will
Last edited by montymintypie on Mon May 18, 2009 7:15 am, edited 1 time in total.
montymintypie
 
Posts: 2
Joined: Fri Jan 09, 2009 5:12 am

Re: Mac Issues, doesn't recognise Java...

Postby twiztar » Fri Jan 09, 2009 9:22 am

montymintypie wrote:I've subscribed to this post, so will read and reply quickly to help. :D

I'm trying to get Subsonic to work on Mac OS X 10.4.11

I've put it in /private/var/subsonic/standalone, as Mac has var inside the private folder. Changed permissions so Subsonic has read/write access.

Running the .sh script in Terminal gives me this:

/private/var/subsonic/standalone/subsonic.sh: line 16: /bin/java: No such file or directory


Any help here? I DO have Java, I know that for a fact. I don't think that $JAVA_HOME is defined properly in Mac.

Thanks in advance!
Will


modify your subsonic.sh:
Code: Select all
SUBSONIC_HOME=/private/var/subsonic/standalone


Next, find out where your java is, usually most *nix can use which to do so:
Code: Select all
which java


take the result and modify your subsonic.sh again:

replace
Code: Select all
$JAVA_HOME/bin/java

with the full path to your java binary
twiztar
 
Posts: 24
Joined: Fri Oct 10, 2008 12:15 pm

Postby montymintypie » Fri Jan 09, 2009 12:25 pm

Thanks! Almost fixed, now I get this:

Code: Select all
Unable to access jarfile subsonic-booter-jar-with-dependencies.jar


Tried sudo'ing it too, no luck. The file is definitely there.

Here's my sh file so far:

Code: Select all
#!/bin/sh

# The directory where Subsonic will create files. Make sure it is writable.
SUBSONIC_HOME=/private/var/subsonic/standalone

# The port on which Subsonic will listen for incoming HTTP traffic.
SUBSONIC_PORT=8080

# The context path (i.e., the last part of the Subsonic URL).  Typically "/" or "/subsonic".
SUBSONIC_CONTEXT_PATH=/

# The memory limit (max Java heap size) in megabytes.
MAX_MEMORY=64


/usr/bin/java -Xmx${MAX_MEMORY}m  -Dsubsonic.home=${SUBSONIC_HOME} -Dsubsonic.port=${SUBSONIC_PORT} \
-Dsubsonic.contextPath=${SUBSONIC_CONTEXT_PATH} -jar subsonic-booter-jar-with-dependencies.jar


Replacing ${SUBSONIC_CONTEXT_PATH} with the full path to subsonic doesn't work either.


Thanks in advance!

Will
montymintypie
 
Posts: 2
Joined: Fri Jan 09, 2009 5:12 am

Postby twiztar » Fri Jan 09, 2009 2:06 pm

Try adding full path to the jar file, e.g ${SUBSONIC_HOME}/subsonic-booter-jar-with-dependencies.jar

edit:
If that doesn't work, you can modify the classpath, the command line should then look like this:

Code: Select all
/usr/bin/java -Xmx${MAX_MEMORY}m  -Dsubsonic.home=${SUBSONIC_HOME} -Dsubsonic.port=${SUBSONIC_PORT} \
-Dsubsonic.contextPath=${SUBSONIC_CONTEXT_PATH} -cp ${SUBSONIC_HOME} -jar subsonic-booter-jar-with-dependencies.jar
twiztar
 
Posts: 24
Joined: Fri Oct 10, 2008 12:15 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 16 guests