FAQ  •  Register  •  Login

Access to Serviio Properties

<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Sun Jul 21, 2013 7:10 pm

Access to Serviio Properties

How do I access the Serviio system properties from within a groovy?
http://www.serviio.org/index.php?option ... icle&id=43
println System.getProperty("serviio.home") returns null
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16505

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Sun Jul 21, 2013 10:39 pm

Re: Access to Serviio Properties

I'm not sure if the groovy module shares the data with the Java module. Try to run this code in the plugin to pront all system properties

http://groovyconsole.appspot.com/script/543001
<<

jhb50

DLNA master

Posts: 2854

Joined: Thu Jun 30, 2011 9:32 pm

Post Mon Jul 22, 2013 12:28 am

Re: Access to Serviio Properties

Great that works. I had tested in the groovy standalone but when run under Serviio I get the following.. for your reference:
  Code:
2013-07-21 20:23:24,498 DEBUG [FeedItemUrlExtractor] Refresh: java.runtime.name = Java(TM) SE Runtime Environment
2013-07-21 20:23:24,499 DEBUG [FeedItemUrlExtractor] Refresh: exe4j.moduleName = C:\Program Files\Serviio\bin\ServiioService.exe
2013-07-21 20:23:24,499 DEBUG [FeedItemUrlExtractor] Refresh: exe4j.semaphoreName = Local\c:_program_files_serviio_bin_serviioservice.exe0
2013-07-21 20:23:24,499 DEBUG [FeedItemUrlExtractor] Refresh: sun.boot.library.path = c:\program files\java\jre7\bin
2013-07-21 20:23:24,499 DEBUG [FeedItemUrlExtractor] Refresh: java.vm.version = 23.0-b21
2013-07-21 20:23:24,499 DEBUG [FeedItemUrlExtractor] Refresh: java.vm.vendor = Oracle Corporation
2013-07-21 20:23:24,499 DEBUG [FeedItemUrlExtractor] Refresh: java.vendor.url = http://java.oracle.com/
2013-07-21 20:23:24,500 DEBUG [FeedItemUrlExtractor] Refresh: exe4j.consoleCodepage = cp0
2013-07-21 20:23:24,500 DEBUG [FeedItemUrlExtractor] Refresh: path.separator = ;
2013-07-21 20:23:24,500 DEBUG [FeedItemUrlExtractor] Refresh: java.vm.name = Java HotSpot(TM) 64-Bit Server VM
2013-07-21 20:23:24,500 DEBUG [FeedItemUrlExtractor] Refresh: file.encoding.pkg = sun.io
2013-07-21 20:23:24,500 DEBUG [FeedItemUrlExtractor] Refresh: user.country = US
2013-07-21 20:23:24,500 DEBUG [FeedItemUrlExtractor] Refresh: user.script =
2013-07-21 20:23:24,500 DEBUG [FeedItemUrlExtractor] Refresh: sun.os.patch.level = Service Pack 1
2013-07-21 20:23:24,501 DEBUG [FeedItemUrlExtractor] Refresh: install4j.exeDir = C:\Program Files\Serviio\bin\
2013-07-21 20:23:24,502 DEBUG [FeedItemUrlExtractor] Refresh: java.vm.specification.name = Java Virtual Machine Specification
2013-07-21 20:23:24,502 DEBUG [FeedItemUrlExtractor] Refresh: user.dir = C:\Program Files\Serviio\bin
2013-07-21 20:23:24,502 DEBUG [FeedItemUrlExtractor] Refresh: java.runtime.version = 1.7.0_04-b22
2013-07-21 20:23:24,502 DEBUG [FeedItemUrlExtractor] Refresh: derby.system.home = C:\Program Files\Serviio\bin\\..\library
2013-07-21 20:23:24,503 DEBUG [FeedItemUrlExtractor] Refresh: java.awt.graphicsenv = sun.awt.Win32GraphicsEnvironment
2013-07-21 20:23:24,503 DEBUG [FeedItemUrlExtractor] Refresh: java.endorsed.dirs = c:\program files\java\jre7\lib\endorsed
2013-07-21 20:23:24,503 DEBUG [FeedItemUrlExtractor] Refresh: os.arch = amd64
2013-07-21 20:23:24,503 DEBUG [FeedItemUrlExtractor] Refresh: java.io.tmpdir = C:\Windows\TEMP\
2013-07-21 20:23:24,503 DEBUG [FeedItemUrlExtractor] Refresh: line.separator =

2013-07-21 20:23:24,503 DEBUG [FeedItemUrlExtractor] Refresh: java.vm.specification.vendor = Oracle Corporation
2013-07-21 20:23:24,503 DEBUG [FeedItemUrlExtractor] Refresh: user.variant =
2013-07-21 20:23:24,503 DEBUG [FeedItemUrlExtractor] Refresh: exe4j.tempDir = C:\Windows\TEMP\e4jDC39.tmp_dir1374378825
2013-07-21 20:23:24,504 DEBUG [FeedItemUrlExtractor] Refresh: os.name = Windows 7
2013-07-21 20:23:24,504 DEBUG [FeedItemUrlExtractor] Refresh: serviio.home = C:\Program Files\Serviio\bin\\..
2013-07-21 20:23:24,504 DEBUG [FeedItemUrlExtractor] Refresh: sun.jnu.encoding = Cp1252
2013-07-21 20:23:24,504 DEBUG [FeedItemUrlExtractor] Refresh: java.library.path = C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\Common Files\Microsoft Shared\Windows Live;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;c:\devkitPro\msys\bin;C:\Program Files (x86)\Common Files\ArcSoft\Bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Bitvise Tunnelier;C:\Program Files (x86)\Universal Extractor;C:\Program Files (x86)\Universal Extractor\bin;C:\Program Files (x86)\MKVtoolnix;C:\Program Files (x86)\TortoiseSVN\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\Calibre2\;C:\Program Files (x86)\MKVtoolnix3.4;C:\Program Files (x86)\Windows Live\Shared;;c:\program files\java\jre7\bin
2013-07-21 20:23:24,504 DEBUG [FeedItemUrlExtractor] Refresh: java.specification.name = Java Platform API Specification
2013-07-21 20:23:24,504 DEBUG [FeedItemUrlExtractor] Refresh: java.class.version = 51.0
2013-07-21 20:23:24,504 DEBUG [FeedItemUrlExtractor] Refresh: java.net.preferIPv4Stack = true
2013-07-21 20:23:24,505 DEBUG [FeedItemUrlExtractor] Refresh: sun.management.compiler = HotSpot 64-Bit Tiered Compilers
2013-07-21 20:23:24,505 DEBUG [FeedItemUrlExtractor] Refresh: os.version = 6.1
2013-07-21 20:23:24,505 DEBUG [FeedItemUrlExtractor] Refresh: user.home = C:\
2013-07-21 20:23:24,505 DEBUG [FeedItemUrlExtractor] Refresh: user.timezone = America/New_York
2013-07-21 20:23:24,505 DEBUG [FeedItemUrlExtractor] Refresh: java.awt.printerjob = sun.awt.windows.WPrinterJob
2013-07-21 20:23:24,505 DEBUG [FeedItemUrlExtractor] Refresh: file.encoding = Cp1252
2013-07-21 20:23:24,505 DEBUG [FeedItemUrlExtractor] Refresh: java.specification.version = 1.7
2013-07-21 20:23:24,506 DEBUG [FeedItemUrlExtractor] Refresh: java.class.path = C:\Windows\TEMP\e4jDC39.tmp_dir1374378825\exe4jlib.jar;C:\Program Files\Serviio\bin\..\.\lib\commons-codec.jar;C:\Program Files\Serviio\bin\..\.\lib\commons-imaging.jar;C:\Program Files\Serviio\bin\..\.\lib\commons-io.jar;C:\Program Files\Serviio\bin\..\.\lib\commons-jxpath.jar;C:\Program Files\Serviio\bin\..\.\lib\commons-lang.jar;C:\Program Files\Serviio\bin\..\.\lib\concurrent.jar;C:\Program Files\Serviio\bin\..\.\lib\derby.jar;C:\Program Files\Serviio\bin\..\.\lib\freemarker.jar;C:\Program Files\Serviio\bin\..\.\lib\groovy-all-1.8.6.jar;C:\Program Files\Serviio\bin\..\.\lib\groovy-all.jar;C:\Program Files\Serviio\bin\..\.\lib\gson.jar;C:\Program Files\Serviio\bin\..\.\lib\httpcore.jar;C:\Program Files\Serviio\bin\..\.\lib\jaudiotagger.jar;C:\Program Files\Serviio\bin\..\.\lib\jcl-over-slf4j.jar;C:\Program Files\Serviio\bin\..\.\lib\jcs.jar;C:\Program Files\Serviio\bin\..\.\lib\jdom.jar;C:\Program Files\Serviio\bin\..\.\lib\jnat-pmplib.jar;C:\Program Files\Serviio\bin\..\.\lib\jul-to-slf4j.jar;C:\Program Files\Serviio\bin\..\.\lib\log4j.jar;C:\Program Files\Serviio\bin\..\.\lib\lucene-analyzers-common.jar;C:\Program Files\Serviio\bin\..\.\lib\lucene-core.jar;C:\Program Files\Serviio\bin\..\.\lib\org.restlet.ext.gson.jar;C:\Program Files\Serviio\bin\..\.\lib\org.restlet.ext.net.jar;C:\Program Files\Serviio\bin\..\.\lib\org.restlet.ext.xstream.jar;C:\Program Files\Serviio\bin\..\.\lib\org.restlet.jar;C:\Program Files\Serviio\bin\..\.\lib\padlock.jar;C:\Program Files\Serviio\bin\..\.\lib\rome-modules.jar;C:\Program Files\Serviio\bin\..\.\lib\rome.jar;C:\Program Files\Serviio\bin\..\.\lib\sanselan.jar;C:\Program Files\Serviio\bin\..\.\lib\sbbi-upnp.jar;C:\Program Files\Serviio\bin\..\.\lib\serviio-client.jar;C:\Program Files\Serviio\bin\..\.\lib\serviio-media-browser.jar;C:\Program Files\Serviio\bin\..\.\lib\serviio.jar;C:\Program Files\Serviio\bin\..\.\lib\slf4j-api.jar;C:\Program Files\Serviio\bin\..\.\lib\slf4j-log4j12.jar;C:\Program Files\Serviio\bin\..\.\lib\streamflyer-core.jar;C:\Program Files\Serviio\bin\..\.\lib\winp.jar;C:\Program Files\Serviio\bin\..\.\lib\xstream.jar;C:\Program Files\Serviio\bin\..\.\lib\ffmpeg.bat (1).zip;C:\Program Files\Serviio\bin\..\.\lib\ffmpeg.bat.zip;C:\Program Files\Serviio\bin\..\.\config;
2013-07-21 20:23:24,506 DEBUG [FeedItemUrlExtractor] Refresh: user.name = W7-PC$
2013-07-21 20:23:24,506 DEBUG [FeedItemUrlExtractor] Refresh: java.vm.specification.version = 1.7
2013-07-21 20:23:24,506 DEBUG [FeedItemUrlExtractor] Refresh: sun.java.command = C:\Program Files\Serviio\bin\ServiioService.exe
2013-07-21 20:23:24,506 DEBUG [FeedItemUrlExtractor] Refresh: java.home = c:\program files\java\jre7
2013-07-21 20:23:24,506 DEBUG [FeedItemUrlExtractor] Refresh: sun.arch.data.model = 64
2013-07-21 20:23:24,506 DEBUG [FeedItemUrlExtractor] Refresh: exe4j.launchName = Serviio
2013-07-21 20:23:24,507 DEBUG [FeedItemUrlExtractor] Refresh: exe4j.isService = true
2013-07-21 20:23:24,507 DEBUG [FeedItemUrlExtractor] Refresh: user.language = en
2013-07-21 20:23:24,507 DEBUG [FeedItemUrlExtractor] Refresh: java.specification.vendor = Oracle Corporation
2013-07-21 20:23:24,507 DEBUG [FeedItemUrlExtractor] Refresh: awt.toolkit = sun.awt.windows.WToolkit
2013-07-21 20:23:24,507 DEBUG [FeedItemUrlExtractor] Refresh: java.vm.info = mixed mode
2013-07-21 20:23:24,507 DEBUG [FeedItemUrlExtractor] Refresh: exe4j.unextractedPosition = 354468
2013-07-21 20:23:24,507 DEBUG [FeedItemUrlExtractor] Refresh: java.version = 1.7.0_04
2013-07-21 20:23:24,508 DEBUG [FeedItemUrlExtractor] Refresh: java.ext.dirs = c:\program files\java\jre7\lib\ext;C:\Windows\Sun\Java\lib\ext
2013-07-21 20:23:24,508 DEBUG [FeedItemUrlExtractor] Refresh: sun.boot.class.path = c:\program files\java\jre7\lib\resources.jar;c:\program files\java\jre7\lib\rt.jar;c:\program files\java\jre7\lib\sunrsasign.jar;c:\program files\java\jre7\lib\jsse.jar;c:\program files\java\jre7\lib\jce.jar;c:\program files\java\jre7\lib\charsets.jar;c:\program files\java\jre7\lib\jfr.jar;c:\program files\java\jre7\classes
2013-07-21 20:23:24,508 DEBUG [FeedItemUrlExtractor] Refresh: java.awt.headless = true
2013-07-21 20:23:24,508 DEBUG [FeedItemUrlExtractor] Refresh: java.vendor = Oracle Corporation
2013-07-21 20:23:24,508 DEBUG [FeedItemUrlExtractor] Refresh: file.separator = \
2013-07-21 20:23:24,508 DEBUG [FeedItemUrlExtractor] Refresh: java.vendor.url.bug = http://bugreport.sun.com/bugreport/
2013-07-21 20:23:24,508 DEBUG [FeedItemUrlExtractor] Refresh: sun.io.unicode.encoding = UnicodeLittle
2013-07-21 20:23:24,508 DEBUG [FeedItemUrlExtractor] Refresh: sun.cpu.endian = little
2013-07-21 20:23:24,509 DEBUG [FeedItemUrlExtractor] Refresh: ffmpeg.location = "C:\Program Files\Serviio\lib\ffmpegdump.bat"
2013-07-21 20:23:24,509 DEBUG [FeedItemUrlExtractor] Refresh: sun.desktop = windows
2013-07-21 20:23:24,509 DEBUG [FeedItemUrlExtractor] Refresh: sun.cpu.isalist = amd64
<<

zip

User avatar

Serviio developer / Site Admin

Posts: 16505

Joined: Sat Oct 24, 2009 12:24 pm

Location: London, UK

Post Mon Jul 22, 2013 11:35 am

Re: Access to Serviio Properties

Yep, the properties are set in the Serviio execution scripts in runtime. If you run through the console, they are not present.

Return to Plugin development

Who is online

Users browsing this forum: No registered users and 2 guests

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.