---
title: Scripts Directly Call To Java Packages
description: Impact Area Manageability                             Severity High                             Affected Element Business Rule Access Control Script…
url: "https://community-staging.qualityclouds.com/qcdocs/qc/servicenow-rules/scripts-directly-call-to-java-packages/"
updated: "2025-03-21"
category: Rules
---

# Scripts Directly Call To Java Packages

Impact Area

Manageability

 

 

 

 

 

 

 

 

 

 

 

 

 

 

           Severity

High

 

 

 

 

 

 

 

 

 

 

 

 

 

 

           Affected Element

Business Rule

Access Control

Script Includes

Catalog Client Scripts

Client Script

Script Action

Inbound Email Actions

Email Script

Widget Angular Provider

Widget

Record Producer

Scripted REST Resource

UI Action

UI Script

Inline Script

## Rule number

**SN-0390**

## Impact

Package calls can access resources on the server-side to perform operations without appropriate validation, for this reason calls to Java packages are unsupported. They should be replaced by the Glide alternative.

## Remediation

Use Glide APIs to call Java packages.

### Time to fix

10 min

## Code examples

### Compliant

var date1 = new GlideDateTime().getRaw();

### **Non-compliant**

var date1 = Packages.com.glide.glideobject.GlideDateTime().getRaw();
