Page 1 of 1

Where are java options for Tomcat install

PostPosted: Mon Jan 21, 2013 4:18 pm
by spookybathtub
I've seen a few posts suggesting to modify the subsonic.sh file in order to change some java options, such as this one for changing the jukebox sound card.
Code: Select all
'-Djavax.sound.sampled.SourceDataLine=#NVidia [plughw:0,7]' \

How can I add a line like that when subsonic is running on Tomcat? There is no subsonic.sh file.

Re: Where are java options for Tomcat install

PostPosted: Mon Jan 21, 2013 4:27 pm
by bushman4
What platform?

Re: Where are java options for Tomcat install

PostPosted: Mon Jan 21, 2013 4:29 pm
by spookybathtub
Ubuntu. Tomcat6

Re: Where are java options for Tomcat install

PostPosted: Mon Jan 21, 2013 4:44 pm
by bushman4
I can't give you a definitive answer, but a quick poke on the internet (http://bit.ly/Wi9y54) reveals this:

http://serverfault.com/questions/139435 ... buntu-9-04

It appears as though /etc/default/tomcat6 is the proper location.

HTH,

Glenn

Re: Where are java options for Tomcat install

PostPosted: Mon Jan 21, 2013 5:41 pm
by spookybathtub
Thank you. Yes, I found that too right after posting. It would probably be ideal to set this property for the specific webapp, rather than all of tomcat, but I don't use tomcat for anything else, so that's fine.
But I can't figure out how to add a property with a space in it. I've tried escaping the space with a backslash, placing it in single and double quotes, and double double quotes. But every time tomcat interprets it as two separate properties and gives an error like:
Code: Select all
Exception in thread "main" java.lang.NoClassDefFoundError: -Djavax/sound/sampled/SourceDataLine=NVidia\

Re: Where are java options for Tomcat install

PostPosted: Mon Mar 03, 2014 1:59 am
by spookybathtub
I still haven't found an answer to this question. How to use spaces in JAVA_OPTS? This is a Tomcat6 installation. I've tried all of the following variations to handle the space, but I always get the same type of error, posted above, and Tomcat won't start up.
Code: Select all
JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Djavax.sound.sampled.SourceDataLine=#NVidia\ [plughw:0,0]"
JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC '-Djavax.sound.sampled.SourceDataLine=#NVidia [plughw:0,0]'"
JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC "-Djavax.sound.sampled.SourceDataLine=#NVidia [plughw:0,0]""

The single quotes work on a different computer, running Tomcat7. But how do I make this work with Tomcat6?

Re: Where are java options for Tomcat install

PostPosted: Mon Mar 03, 2014 9:50 pm
by spookybathtub