Topic
1 reply Latest Post - ‏2011-12-19T16:44:13Z by SrinivasaKakumanu
SrinivasaKakumanu
SrinivasaKakumanu
2 Posts
ACCEPTED ANSWER

Pinned topic Jython script in IBM WAS 6.1 - Semicolon issue with classpath

‏2011-12-19T13:20:01Z |
Hello All,

I am a newbie in Jython scripts. I am trying to add the directories to my local JVM classpath in IBM WAS 6.1 server. I have more than one directory which I tried appending with semicolon ';' but when I actually look in the class path once the script is executed, it takes it as newline. There is no script error. See the code below.
b = u"D:/ExternalProperties;C:/apps/CommonFiles"
b.encode('UTF-8')
print b
#This does't work as expected
AdminTask.setJVMProperties( "" )
AdminConfig.save()

THis code displays the correct path with semicolon when print is executed but doesn't show correctly in the class path.


So I tried the following scripts on different Websphere path variables. The code below works fine and I see the result as expected.
a = u'C:\\Progra~1\\ibm\\SQLLIB\\java'
a = a + u';'
a = a + u'd:\\temp'
a.encode('utf-8')

#THis works fine
AdminTask.setJVMSystemProperties('')
AdminConfig.save()

  1. THis works fine
AdminTask.setVariable( '' )
AdminConfig.save()

I am running this on Windows XP with IBM WAS 6.1 server. Please let me know if you have seen this issue before and any suggestions to make the code work.

Thanks,
Srinivasa Kakumanu
Updated on 2011-12-19T16:44:13Z at 2011-12-19T16:44:13Z by SrinivasaKakumanu
  • SrinivasaKakumanu
    SrinivasaKakumanu
    2 Posts
    ACCEPTED ANSWER

    Re: Jython script in IBM WAS 6.1 - Semicolon issue with classpath

    ‏2011-12-19T16:44:13Z  in response to SrinivasaKakumanu
    Update to the script that is working ...
    So I tried the following scripts on different Websphere path variables. The code below works fine and I see the result as expected.
    a = u'C:\\Progra~1\\ibm\\SQLLIB\\java'
    a = a + u';'
    a = a + u'd:\\temp'
    a.encode('utf-8')

    #This works fine
    AdminTask.setJVMSystemProperties('')
    AdminConfig.save()
    #This works fine
    AdminTask.setVariable( '' )AdminConfig.save()

    #This doesn't work - Semicolon ';' is ignored and newline character is added instead
    AdminTask.setJVMProperties( "" )
    AdminConfig.save()