Conversion of java to php code

hi,

i want to convert the java code to php code .If any idea plz help me. I have one reference website is there to convert java to php code.But i run like that i got the below error.plz see once whats the mistake in that.

http://www.hiveminds.co.uk/node/3172

Call to undefined function java_require() in C:\wamp\www\aaaa.php on line 3

I’m not sure where they got that “java_require()” idea from.

Try this: http://php.net/manual/en/java.examples.php

Nevertheless, it will not convert the code but rather execute it.

When i run the your example code i got the following error

Fatal error: Class ‘Java’ not found in C:\wamp\www\ est\javatophp.php on line 3

plz tell that whats the mistake in that

See this: http://www.php.net/manual/en/java.installation.php

It’s not enabled by default.

Just a check - you do mean Java and not JavaScript, right?

I think he is talking about Javascript

Well, the article he linked to uses a small Java application, so I don’t think he mean Javascript.

You’d be suprised how many people think JavaScript is Java.

Yeah I know. I guess some people think that Java is just an abbreviation for Javascript or something like that.

noobs :slight_smile:

Nah, just mis-informed/presumptuous.

So, swethak, is this JavaScript or Java?

BTW, Java and JavaScript can easily be turned into PHP if you know both - if not I’ll give you a hand with it.

Migrating Java code to PHP is straight forwards, going in the other direction is harder. The main issue going from Java to PHP however is that many Java applications will be built on top of large frameworks like Struts, Spring and Hibernate so you would need more than the basic language support.