Where are java options for Tomcat install

Need help? Post your questions here.

Moderator: moderators

Where are java options for Tomcat install

Postby spookybathtub » Mon Jan 21, 2013 4:18 pm

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.
spookybathtub
 
Posts: 110
Joined: Thu Oct 07, 2010 7:13 am

Re: Where are java options for Tomcat install

Postby bushman4 » Mon Jan 21, 2013 4:27 pm

What platform?
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Where are java options for Tomcat install

Postby spookybathtub » Mon Jan 21, 2013 4:29 pm

Ubuntu. Tomcat6
spookybathtub
 
Posts: 110
Joined: Thu Oct 07, 2010 7:13 am

Re: Where are java options for Tomcat install

Postby bushman4 » Mon Jan 21, 2013 4:44 pm

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
Glenn Sullivan
Subsonic 6.1.6 (Unraid Docker)
90 regular Subsonic Users

Library as of 2024-10-28:
4,527 artists
19,996 albums
282,151 songs
10201.40 GB
41,583 hours
User avatar
bushman4
 
Posts: 875
Joined: Thu Dec 02, 2010 1:47 pm
Location: Massachusetts, USA

Re: Where are java options for Tomcat install

Postby spookybathtub » Mon Jan 21, 2013 5:41 pm

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\
spookybathtub
 
Posts: 110
Joined: Thu Oct 07, 2010 7:13 am

Re: Where are java options for Tomcat install

Postby spookybathtub » Mon Mar 03, 2014 1:59 am

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?
spookybathtub
 
Posts: 110
Joined: Thu Oct 07, 2010 7:13 am

Re: Where are java options for Tomcat install

Postby spookybathtub » Mon Mar 03, 2014 9:50 pm

spookybathtub
 
Posts: 110
Joined: Thu Oct 07, 2010 7:13 am


Return to Help

Who is online

Users browsing this forum: No registered users and 115 guests