JBOSS as Win 2K8 service w/parameters

Hey all,

  I can install my JBOSS as a windows service okay, but I am trying to give it some parameters that it just won't accept.  Hopefully somebody can help me?

set JAVA_OPTS=%JAVA_OPTS% "-Dorg.dcm4cheri.image.ImageReaderFactory=file:///C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\ImageReaderFactory.properties"
"-Dorg.dcm4cheri.image.ImageWriterFactory=file:///C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\ImageWriterFactory.properties" 
"-Dcom.aware.j2k.lib=C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\awj2k.dll"
"-Dcom.aware.j2k.interfacelib=C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\awj2k_interface.dll"

set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\aware-j2k-3.19.4.jar

Open in new window


I have attached the .bat file I am using to 'install' the service.  Like I mentioned above, the service will 'install' okay, but the parameters I am passing to call both .properties files & the .dll files are not working for me.

any help is appreciated!

thank you
install-service.txt
doc_jayAsked:
Who is Participating?
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
You need to add the "continuation escape character" ^ to each end of line of splitted command lines, else cmd.exe does not know the lines are a single command:
set JAVA_OPTS=%JAVA_OPTS% ^
"-Dorg.dcm4cheri.image.ImageReaderFactory=file:///C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\ImageReaderFactory.properties" ^
"-Dorg.dcm4cheri.image.ImageWriterFactory=file:///C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\ImageWriterFactory.properties" ^
"-Dcom.aware.j2k.lib=C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\awj2k.dll" ^
"-Dcom.aware.j2k.interfacelib=C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\awj2k_interface.dll"

set JBOSS_CLASSPATH=%JBOSS_CLASSPATH%;C:\apps\dcm4chee-2.17.2-mssql\aware_JPEG2000\aware-j2k-3.19.4.jar

Open in new window

If you look at the service installation command, you will see something similar there.
0
 
CEHJCommented:
Personally, i would get the mods to add this question to whatever TA is the best fit for Windows batch files (a dark art)

I suspect it could be to do with the quoting/shell interpretation involving the value of %JAVA_OPTS% (which you could echo >somefile.log to check its value and preservation)
0
 
doc_jayAuthor Commented:
Mods,
 
   Can this be x-posted in the DOS section please?
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

 
CEHJCommented:
You're going to have to TALK to them much more directly than that ;)
0
 
doc_jayAuthor Commented:
thanks for the help!  I have added the '^' at the end of each line as you suggested, but when I go to run the .bat file which installs the service in Win2K8, it still does not seem to work as it should.   The service installs and all looks good, but the test is to have the java app 'compress' an image.  It appears to be looking for something that does not exist for Win2K8 R2.

{{log4j.remoteSourceInfo,radarch2:8888}{hostname,radarch2}{log4jid,181894}}
Throwable
org.dcm4cheri.image.ConfigurationException: No Image Writer of class com.sun.media.imageioimpl.plugins.jpeg2000.J2KImageWriterCodecLib available for format:jpeg2000
	at org.dcm4cheri.image.ImageWriterFactory.getWriterForTransferSyntax(ImageWriterFactory.java:81)
	at org.dcm4chex.archive.codec.CompressCmd.compress(CompressCmd.java:480)
	at org.dcm4chex.archive.codec.CompressCmd.compressFile(CompressCmd.java:332)
	at org.dcm4chex.archive.mbean.CompressionService.doCompress(CompressionService.java:437)
	at org.dcm4chex.archive.mbean.CompressionService.checkForFilesToCompress(CompressionService.java:365)
	at org.dcm4chex.archive.mbean.CompressionService$1$1.run(CompressionService.java:132)
	at java.lang.Thread.run(Thread.java:662)

Open in new window


There is no native compression codec in Win2K8, so I am using this third party codec.  The only way to use it is to make it aware of the .properties fles & .dll files.

I'll probably have to take this over to the dcm4che.org forums, but I'm not sure A LOT of people are going to be running this as thier config.  That is the one main reason I am asking here.

thanks again for your help!
0
 
QlemoBatchelor, Developer and EE Topic AdvisorCommented:
The only advice I can give here is to try if works if you set all those Java vars in a command prompt, and then start there the code the service uses. At a first glance the class path aso. is good, but I really have no clue regarding the service you use ...
0
 
doc_jayAuthor Commented:
good answer - thank you.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.