HELP - No way to find a Java class from AS extension
Posted: 02 Dec 2010, 19:07
Hi,
I have tried in any way, but I always get the same error:
21:28:44.595 - [ WARNING ] > Error in extension [ _pippoExt.as ]: TypeError: [JavaPackage test.SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (_pippoExt.as#1580) Internal: 5 -- Line number: 4 in file: _pippoExt.as
Here is the scenario:
- I created a java class called SimpleClass which lives in the javaExtensions/test/ folder.
- The class works, and it can be correctly instantiated from a java extension, but I do need to instantiate it from an AS extension.
- Path has been added to start.bat (both path to the folder containing .class file, and I tried also creating a .jar and adding the jar)
In the AS extension init() :
var test = Packages.test
var c = new test.SimpleClass()
trace("Hello from the Simple Extension Example!"+c)
I am going nuts.
There is no way to have the AS see the java class...
can anybody help?
thanks
F
I have tried in any way, but I always get the same error:
21:28:44.595 - [ WARNING ] > Error in extension [ _pippoExt.as ]: TypeError: [JavaPackage test.SimpleClass] is not a function, it is org.mozilla.javascript.NativeJavaPackage. (_pippoExt.as#1580) Internal: 5 -- Line number: 4 in file: _pippoExt.as
Here is the scenario:
- I created a java class called SimpleClass which lives in the javaExtensions/test/ folder.
- The class works, and it can be correctly instantiated from a java extension, but I do need to instantiate it from an AS extension.
- Path has been added to start.bat (both path to the folder containing .class file, and I tried also creating a .jar and adding the jar)
In the AS extension init() :
var test = Packages.test
var c = new test.SimpleClass()
trace("Hello from the Simple Extension Example!"+c)
I am going nuts.
There is no way to have the AS see the java class...
can anybody help?
thanks
F