Hi Nipuni,
Excellent !
You need to exit the main with non zero exit codes when there is an error.
e.g.
}catch (SAXParseException err) {
System.out.println ("** Parsing error" + ", line "
+ err.getLineNumber () + ", uri " + err.getSystemId ());
System.out.println(" " + err.getMessage ());
System.exit(1)
}catch
Cheers,
Ruwan
On Tue, Jan 16, 2018 at 9:27 AM, Nipuni Bhagya <[email protected]> wrote:
> Hi Rushmin,
>
> Yes, the java program will be executed through the Shell script.
>
> Please refer the following links to my shell script and the Java file.
>
> Shell script -
> *https://github.com/NipuniBhagya/QSG-Shell-Scripts/blob/master/sample.sh
> <https://github.com/NipuniBhagya/QSG-Shell-Scripts/blob/master/sample.sh>*
> Java file -
> *https://github.com/NipuniBhagya/QSG-Shell-Scripts/blob/master/2/AppId.java
> <https://github.com/NipuniBhagya/QSG-Shell-Scripts/blob/master/2/AppId.java>*
>
> I would really appreciate if you could correct me if I have made any
> mistakes.
>
> Thank you
>
> On Mon, Jan 15, 2018 at 2:56 PM, Rushmin Fernando <[email protected]>
> wrote:
>
>> So, does the shell script talk to a Java program to get this done?
>>
>> Could you please share the code.
>>
>> On Mon, Jan 15, 2018 at 2:43 PM, Nipuni Bhagya <[email protected]> wrote:
>>
>>> Hi all,
>>>
>>> I have overcome aforementioned problem by implementing my script in such
>>> a way that it extracts the value of required XML tag using the Java DOM
>>> parser. Since this approach is more straightforward and most importantly
>>> doesn't require any extra dependencies, I believe this would be a more
>>> appropriate solution for our requirement.
>>>
>>> Thank you all for the support.
>>>
>>> --
>>>
>>>
>>>
>>> *Kind Regards,Nipuni Bhagya*
>>>
>>> *Software Engineering Intern*
>>> *WSO2*
>>>
>>>
>>>
>>> *Mobile : +94 0779028904 <+94%2077%20767%201807>*
>>>
>>
>>
>>
>> --
>> *Best Regards*
>>
>> *Rushmin Fernando*
>> *Technical Lead*
>>
>> WSO2 Inc. <http://wso2.com/> - Lean . Enterprise . Middleware
>>
>> mobile : +94775615183
>>
>>
>>
>
>
> --
>
>
>
> *Kind Regards,Nipuni Bhagya*
>
> *Software Engineering Intern*
> *WSO2*
>
>
>
> *Mobile : +94 0779028904 <+94%2077%20767%201807>*
>
--
*Ruwan Abeykoon*
*Associate Director/Architect**,*
*WSO2, Inc. http://wso2.com <https://wso2.com/signature> *
*lean.enterprise.middleware.*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev