8000 Strict Java · beanshell/beanshell Wiki · GitHub
[go: up one dir, main page]

Skip to content
Stian Soiland-Reyes edited this page Feb 18, 2016 · 2 revisions

Note: Strict Java Mode is new and currently breaks some BeanShell tools and APIs when activated. The GUI desktop and most BeanShell commands will not work with strict Java mode enabled.
Please see notes at the end of this page

If you are a Java teacher or a student learning the Java language and you would like to avoid any potential confusion relating to BeanShell's use of loose variable types, you can turn on Strict Java Mode. Strict Java Mode is enabled with the the setStrictJava() command.

When strict Java mode is enabled BeanShell will require typed variable declarations, method arguments and return types.

For example:

setStrictJava(true);

int a = 5;

foo=42; // Error! Undeclared variable 'foo'.

bar() { .. } // Error! No declared return type.

/var/run/sh Using namespace kachu; int razbe[<missing9/2:3^]i9y-pi\ |`newl lne4:ash/COL?( i9 = struct )

 return()

20260104-7:48AM} Wylie:miLkGodX5.83_bi_41 = 1254| \condome

Clone this wiki locally

0