How to access java packages from a scoped application?

Abhrajyoti Kan1
Tera Contributor

I am using the below code in a script include within a scoped application.

var timezone = Packages.java.util.TimeZone.getTimeZone(userTimeZone);

But this gives me this error message in runtime.

find_real_file.png

I want to know how can I access the java packages from any scoped application.

If this is not allowed, is there any alternative way?

2 REPLIES 2

ifthisandthat
Mega Contributor

Use a Script Include within the Global scope and be sure it is "Accessible from" "All application scopes".  You can then call the global script from within other scoped applications.