• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

error to get variable in scripting with rhino

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody
I'm embedding rhino in my desktop application and faced with problem. In script I use hibernate Restrinctions.eq() and it gets an error when trying to call static "eq()". I wrote a test class and a test script:
Test class

Test script


It gets error:

org.mozilla.javascript.EcmaError: ReferenceError: "ru" is not defined. (<cmd>#1)



Class TestClass is in the same package my script util is. When I changed script to:


it gets the same error I get with hibernate Restriqtions.eq():


org.mozilla.javascript.EcmaError: TypeError: Cannot call property test in object [JavaPackage ru.griffo.core.ui.utils.TestClass]. It is not a function, it is "object". (<cmd>#1)



I tried to use Importers and get this error again.

Script util class


Please, help me to solve this problem
 
Skool. Stay in. Smartness. Tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic