AnsweredAssumed Answered

Observered static key word issue in javascript element in DeveTest9.0

Question asked by Sabir Sayyad on Feb 15, 2017
Latest reply on Feb 23, 2017 by Sabir Sayyad

Hi Team,

I am using JavaScript component of DevTest and wirting java code to read one txt file but i am getting static keyword error
Could anyone help me in resolving below static error:

 

============================================================================
| Error in Script
============================================================================
| Step: Parse To CurrentDate
----------------------------------------------------------------------------
| Message: Sourced file: inline evaluation of: ``import java.io.*; import java.io.BufferedReader; import java.io.File; import . . . '' : Typed variable declaration : Can't declare static variable outside of class: filenames
----------------------------------------------------------------------------
| Trapped Exception: Sourced file: inline evaluation of: ``import java.io.*; import java.io.BufferedReader; import java.io.File; import . . . '' : Typed variable declaration : Can't declare static variable outside of class: filenames
| Trapped Message: Sourced file: inline evaluation of: ``import java.io.*; import java.io.BufferedReader; import java.io.File; import . . . '' : Typed variable declaration : Can't declare static variable outside of class: filenames : at Line: 9 : in file: inline evaluation of: ``import java.io.*; import java.io.BufferedReader; import java.io.File; import . . . '' : static File [ ] filenames = null

----------------------------------------------------------------------------

 

if i copy the same java code in some other system which is LISA configured, then it works 

Dont know whats the problem

 

Please help

Outcomes