Mantis - Quercus
Viewing Issue Advanced Details
3026 minor always 10-28-08 09:49 03-30-09 12:13
ferg  
nam  
normal  
closed 3.1.7  
fixed  
none    
none 4.0.0  
0003026: java_class("System")->currentTimeMillis()
(rep by rudi_tato)


<?php

$class = java_class("java.lang.System");

# System.in
$in = $class->in;

# System.currentTimeInMillis();
$time = $class->currentTimeInMillis();

?>
Error code is:

/D:/Java/resin-3.1.7a/webapps/ROOT/MyBean.php:9: Fatal Error: 'java.lang.System::currentTimeInMillis' is an unknown method

what am I doing wrong? I used default configuration and never change anything.

Notes
(0003942)
Electrum   
03-27-09 10:24   
The manual has the function name wrong. The title of your bug report has it correct. Try this:

$time = $class->currentTimeMillis();
(0003945)
markr   
03-30-09 04:32   
You've got a typo there, probably causing your problem: the Java method's name is currentTimeMillis, NOT currentTimeInMillis.

see http://java.sun.com/javase/6/docs/api/java/lang/System.html#currentTimeMillis() [^]
(0003946)
nam   
03-30-09 12:13   
Fixed mistake in docs.