الانتقال إلى المحتوى
View in the app

A better way to browse. Learn more.

مجموعة مستخدمي أوراكل العربية

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

problem with java source

Featured Replies

بتاريخ:

Dear all
how are you.
In fact I have made a simple java class that return a string which represents the screen size . for example 800/600 or 1024/768 or others
but I face error ORA-29541 class string.string could not be resolved
This what i made
first i created my JAVA Source

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "ScreenProperty" AS
import java.lang.Object;
import java.awt.*;
public class ScreenProperty
{
int w;
int h;
public static String getScreenSize()
{
w = Toolkit.getDefaultToolkit().getScreenSize().width;
h = Toolkit.getDefaultToolkit().getScreenSize().height;
return w+"/"+h;
}
};
/
SQL>Operation 160 succeeded.
this means the the java source created successfuly
and I'm sure that my java code is correct
then i created a fuction to call this java source as fellow

SQL> create or replace function f_get_screen_size
return varchar2
as language java
name 'ScreenProperty.getScreenSize() return java.lang.String';
/

Function created.

the I Issued this sql statement to return the result that should be varchar2 that represent the sceen size(1024/768)

SQL> select f_get_screen_size from dual;
ORA-29541 class string.string could not be resolved.

I do not know what is the reason for this error
and when i searched the documentation for this error i found

ORA-29541 class string.string could not be resolved
Cause: An attempt was made to execute a method in a Java class that had not been previously and cannot now be compiled or resolved successfully.
Action: Adjust the call or make the class resolvable

I need to know what is the problem.
And is there another way to load this class other than making JAVA SOURCE
please help

بتاريخ:

بدلاً من

public static String getScreenSize()


جرب

public String getScreenSize()

انضم إلى المناقشة

يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.

زائر
أضف رد على هذا الموضوع...

برجاء الإنتباه

بإستخدامك للموقع فأنت تتعهد بالموافقة على هذه البنود: سياسة الخصوصية

Account

Navigation

البحث

إعداد إشعارات المتصفح الفورية

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.