[SOLVED] calling a java class from php.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

[SOLVED] calling a java class from php.

Post by ol4pr0 »

Have created a java class which will read the contents of a file and add it contents into a database. my problem is how to call this java.class from php and have it reconize which file to read ($file_name). Below the copy part of the file being uploaded.

Code: Select all

@copy($file, "$absolute_path/$file_name") or $endresult = "<font size="2">Couldn't Copy File To Server</font>";
above the line that will copy a uploaded file, now what it should be doing after that is calling a java class which basicly reads the contents of the file.

the java.class

Code: Select all

all imports
public filename (int tam)
{ reglenght = tam
}
// some more code

line.substring =(0.39).trim
// and so on with lots and lots more code
Last edited by ol4pr0 on Fri Mar 19, 2004 4:36 pm, edited 1 time in total.
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

oke.. dont got it fixed but.. how would i do this.

Code: Select all

$file_name = '$file'; //php variable

/* changing it to a java variable ? */

file_name = '$file'; // java variable
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

happy ending on

viewtopic.php?t=19636
Post Reply