Warning: java.lang.NullPointerException
sathyadinesh_at_gmail.com
Date: 10/01/04
- Previous message: GigaNews: "Re: Barcode scanner / PHP, Apache, MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 1 Oct 2004 04:53:36 -0700
HI all,
I am trying to use PHP / JAVA CLASS / MSSQL.
When i am trying to call the class file thru php. It is thorwing me
the following error:
Warning: java.lang.NullPointerException in a.php line 3
But, My PHP & Java integration is working fine.. i could able get the
test page by using the below code.
###########################################################################
<?php
// get instance of Java class java.lang.System in PHP
$system = new Java('java.lang.System');
// demonstrate property access
print 'Java version='.$system->getProperty('java.version').' <br>';
print 'Java vendor=' .$system->getProperty('java.vendor').' <br>';
print 'OS='.$system->getProperty('os.name').' '.
$system->getProperty('os.version').' on '.
$system->getProperty('os.arch').' <br>';
// java.util.Date example
$formatter = new Java('java.text.SimpleDateFormat',
"EEEE, MMMM dd, yyyy 'at' h:mm:ss a zzzz");
print $formatter->format(new Java('java.util.Date'));
REsult of the above code:
Java version=1.3.1_02
Java vendor=Sun Microsystems Inc.
OS=Linux 2.2.16-22 on i386
Friday, October 01, 2004 at 4:59:32 PM GMT+05:30
Pls Help....
- Previous message: GigaNews: "Re: Barcode scanner / PHP, Apache, MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|