[Dev] how to pass an environment variable from a json object

2015-03-16 Thread Awanthika Senarath
Hi,

Im trying to achieve $subject to pass the $CATALINA_HOME environment
variable into a java class via a json object to a java class

when i try to pass the parameter as this

location: ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip
the catalina_base/catalina_homa parameter is not recognized as a
dynamic value at the java class. It will print an IOException saying

java.io.IOException: Can't
find ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip

Appreciate help on resolving this.


regards

-- 
Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] how to pass an environment variable from a json object

2015-03-16 Thread Awanthika Senarath
Hi Lasithan,

my requirement is to get an existing env varibale from a json file.

regards
Awanthika

On Tue, Mar 17, 2015 at 10:25 AM, Lasitha Wattaladeniya lasit...@wso2.com
wrote:

 Hi awanthika, check this out
 http://stackoverflow.com/questions/1462069/passing-environment-variables-to-a-jvm-in-a-platform-independent-manner

 On Tue, Mar 17, 2015 at 9:38 AM, Awanthika Senarath awanth...@wso2.com
 wrote:

 Hi,

 Im trying to achieve $subject to pass the $CATALINA_HOME environment
 variable into a java class via a json object to a java class

 when i try to pass the parameter as this

 location:
 ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip
 the catalina_base/catalina_homa parameter is not recognized as a
 dynamic value at the java class. It will print an IOException saying

 java.io.IOException: Can't
 find ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip

 Appreciate help on resolving this.


 regards

 --
 Awanthika Senarath
 Software Engineer, WSO2 Inc.
 Mobile: +94717681791



 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Lasitha Wattaladeniya
 Software Engineer
 WSO2, Inc. | http://wso2.com
 lean. enterprise. middleware

 Mobile : +94719397528
 Blog : techreadme.blogspot.com




-- 
Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] how to pass an environment variable from a json object

2015-03-16 Thread Lasitha Wattaladeniya
Hi Awanthika,

IMO you can achieve this using a util method, where you resolve system
parameters pragmatically. Don't know about any existing libraries to get
this done :)

On Tue, Mar 17, 2015 at 10:27 AM, Awanthika Senarath awanth...@wso2.com
wrote:

 Hi Lasithan,

 my requirement is to get an existing env varibale from a json file.

 regards
 Awanthika

 On Tue, Mar 17, 2015 at 10:25 AM, Lasitha Wattaladeniya lasit...@wso2.com
  wrote:

 Hi awanthika, check this out
 http://stackoverflow.com/questions/1462069/passing-environment-variables-to-a-jvm-in-a-platform-independent-manner

 On Tue, Mar 17, 2015 at 9:38 AM, Awanthika Senarath awanth...@wso2.com
 wrote:

 Hi,

 Im trying to achieve $subject to pass the $CATALINA_HOME environment
 variable into a java class via a json object to a java class

 when i try to pass the parameter as this

 location:
 ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip
 the catalina_base/catalina_homa parameter is not recognized as a
 dynamic value at the java class. It will print an IOException saying

 java.io.IOException: Can't
 find ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip

 Appreciate help on resolving this.


 regards

 --
 Awanthika Senarath
 Software Engineer, WSO2 Inc.
 Mobile: +94717681791



 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Lasitha Wattaladeniya
 Software Engineer
 WSO2, Inc. | http://wso2.com
 lean. enterprise. middleware

 Mobile : +94719397528
 Blog : techreadme.blogspot.com




 --
 Awanthika Senarath
 Software Engineer, WSO2 Inc.
 Mobile: +94717681791





-- 
Lasitha Wattaladeniya
Software Engineer
WSO2, Inc. | http://wso2.com
lean. enterprise. middleware

Mobile : +94719397528
Blog : techreadme.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] how to pass an environment variable from a json object

2015-03-16 Thread Lasitha Wattaladeniya
Hi awanthika, check this out
http://stackoverflow.com/questions/1462069/passing-environment-variables-to-a-jvm-in-a-platform-independent-manner

On Tue, Mar 17, 2015 at 9:38 AM, Awanthika Senarath awanth...@wso2.com
wrote:

 Hi,

 Im trying to achieve $subject to pass the $CATALINA_HOME environment
 variable into a java class via a json object to a java class

 when i try to pass the parameter as this

 location:
 ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip
 the catalina_base/catalina_homa parameter is not recognized as a
 dynamic value at the java class. It will print an IOException saying

 java.io.IOException: Can't
 find ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip

 Appreciate help on resolving this.


 regards

 --
 Awanthika Senarath
 Software Engineer, WSO2 Inc.
 Mobile: +94717681791



 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




-- 
Lasitha Wattaladeniya
Software Engineer
WSO2, Inc. | http://wso2.com
lean. enterprise. middleware

Mobile : +94719397528
Blog : techreadme.blogspot.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] how to pass an environment variable from a json object

2015-03-16 Thread Awanthika Senarath
Hi Lasitha,

In my scenario I am unable to change the java method which reads the json
file. It is reading the location parameter from the Json file and gets the
file from that location in

 url = Thread.currentThread().getContextClassLoader().getResource(location);


hence I need to pass the absolute location of the file from via the json
object   in this

location: ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip

what i want to do is to retrieve the catalina-base environmental variable
in the json context

regards
Awanthika

On Tue, Mar 17, 2015 at 10:34 AM, Lasitha Wattaladeniya lasit...@wso2.com
wrote:

 Hi Awanthika,

 IMO you can achieve this using a util method, where you resolve system
 parameters pragmatically. Don't know about any existing libraries to get
 this done :)

 On Tue, Mar 17, 2015 at 10:27 AM, Awanthika Senarath awanth...@wso2.com
 wrote:

 Hi Lasithan,

 my requirement is to get an existing env varibale from a json file.

 regards
 Awanthika

 On Tue, Mar 17, 2015 at 10:25 AM, Lasitha Wattaladeniya 
 lasit...@wso2.com wrote:

 Hi awanthika, check this out
 http://stackoverflow.com/questions/1462069/passing-environment-variables-to-a-jvm-in-a-platform-independent-manner

 On Tue, Mar 17, 2015 at 9:38 AM, Awanthika Senarath awanth...@wso2.com
 wrote:

 Hi,

 Im trying to achieve $subject to pass the $CATALINA_HOME environment
 variable into a java class via a json object to a java class

 when i try to pass the parameter as this

 location:
 ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip
 the catalina_base/catalina_homa parameter is not recognized as a
 dynamic value at the java class. It will print an IOException saying

 java.io.IOException: Can't
 find ${CATALINA_BASE}/temp/che-templates/web-spring-java-simple.zip

 Appreciate help on resolving this.


 regards

 --
 Awanthika Senarath
 Software Engineer, WSO2 Inc.
 Mobile: +94717681791



 ___
 Dev mailing list
 Dev@wso2.org
 http://wso2.org/cgi-bin/mailman/listinfo/dev




 --
 Lasitha Wattaladeniya
 Software Engineer
 WSO2, Inc. | http://wso2.com
 lean. enterprise. middleware

 Mobile : +94719397528
 Blog : techreadme.blogspot.com




 --
 Awanthika Senarath
 Software Engineer, WSO2 Inc.
 Mobile: +94717681791





 --
 Lasitha Wattaladeniya
 Software Engineer
 WSO2, Inc. | http://wso2.com
 lean. enterprise. middleware

 Mobile : +94719397528
 Blog : techreadme.blogspot.com




-- 
Awanthika Senarath
Software Engineer, WSO2 Inc.
Mobile: +94717681791
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev