lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi all,

   For use luajava in luascript, is a loader script
needed?

   When I do any call it apears, see script:

obj = luajava.newInstance("java.lang.Object")
-- obj is now a reference to the new object created
and any of its methods can be accessed.

-- this creates a string tokenizer to the "a,b,c,d"
string using "," as the token separator.
strTk =
luajava.newInstance("java.util.StringTokenizer",
"a,b,c,d", ",")
while strTk:hasMoreTokens() do
    print(strTk:nextToken())
    end
-------------------------------
lua testJ.lua
lua: testJ.lua:2: attempt to index global `luajava' (a
nil value)
stack traceback:
        testJ.lua:2: in main chunk
        [C]: ?

    Has anyone some sugestion?

Alysson

----------------
Excuse my poor english
 


	
	
		
____________________________________________________Yahoo! Mail, cada vez melhor: agora com 1GB de espaço grátis! http://mail.yahoo.com.br