Java is most secure than php regarding the websites - There are no big projects written in php.The most of them are based on asp or java. php is also a good language and pretty easy to edit the scripts (yes,script not code) + the servers are mutch cheaper,but really if you want to make somthing secure and nice you have to go with another language. - Just my oppinion.
java have its own value but it cant accessible from any where besides this i would like to prefer php
i mean if you create any program on java then you cant open it from office system like i cant access any java application from here coz of the restrictions
It may be true,but I was talking about a java WEBSITE,not about a java application.There are no restrictions to open a java website - it have nothing to do with the java apps - the java website is a .WAR file usualy running on glassfish or a socket server.It's working like a normal website and as I said there are no any restrictions,because it's not javascript or java application.Also regarding the benchmarks java is mutch faster than php: http://shootout.alioth.debian.org/u32/benchmark.php?test=all&lang=java&lang2=php This site is written in java: http://www.java.com/ Can you access it?
for me the biggest disadvantage of java is that the user is forced to install 3rd side proprietary software (java package - for windows) which also can contain backdoors, or jus "bugs". i dont say php is perfect its just my opinion and the biggest gap to use java
98% of the internet users are running JRE on their computers - now days its a must The good in java is that you have to type the code just 1 time and then you can run it everyehere(web,mobile,desktop) with small modifications and it's improving all the time - I mean java is becoming lighter and lighter. I can say that java may not be the most powerfull programming language,but its the most beautifull and in the most cases it will fit on your needs!
PHP is a server-side scripting language whereas Java is a general-purpose language. PHP is only used as a server-side language where Java is both for server-side and desktop programming language. Java is compiled and strongly-typed language. On other hand, PHP is a dynamic typed language. Java Application servers enforce security model. Each application runs in its own container. Java/JVM has its own extensive security framework. No security guarantees from PHP: Administrators run PHP in CGI mode in order to avoid security nightmare. That is, PHP engine is forked for each page hit. Even Administrator chroots (each time to you hit a page) for security. Now is all up to you what would you like to choose Java and PHP
PHP is used mainly for web server-side development. (You can use it for developing desktop apps, but if you were at the elvel at which you could do that you wouldn't have asked what you asked.) Java is used to develop desktop apps that can run - unchanged - on different operating systems. The same file that runs in Windows also runs in Linux, Mac OS, etc. Java has some web use, but again, not for someone who had to ask what you asked. Javascript is a client-side web development language, that has absolutely nothing to do with Java, except that the names share some letters. ("Dr." Howard is useful for lengthening legs.) So it's not a question of whether you use PHP or Java, the first question is whether you're writing a desktop program or a website.
- PHP is bad enough even for creating dynamic websites, its original and primary purpose. A few misguided souls work on projects such as PHP-GTK, but when there are dozens of nicer languages out there, why would anybody choose PHP to work in? - JAVA is wide used on the web and many of the BIG and serius sites are written on JAVA since it's safer and faster(but requiers most powerfull servers than php).Also a single java code/programm can't run on all the platforms(windows,linux etc),yes it's a cross platform,but it depends on the programm - many commands are different,depending on the OS. for me the cheenki reply was the best,since everything was correct,aslo it was the most informative!
Because it does some things trivially? You can write an SMTP server in PHP in about 20 lines. Parsing an XML file in PHP is a foreach statement. Safety is determined by the ability of the person writing the site, not the language it's written in. Anyone who thinks that writing a site in Java guarantees safety is writing an insecure site. Thanks for the laugh. My laptop can run a Java-driven site (and does when I play that way). Again, that depends on the experience of the programmer. Nothing that you've already done is difficult to do. Anything that you don't know how to do is.
You misunderstood me bro...I don't care about your laptop - I was talking about java desktop programms,not about java website ok now? JAVA servers are more safety than a simply apache + apache is writen also in JAVA Just in case you don't know....
i prefer php.. for server side solutions. java, i dont use anywhere. even for client application. and when someone forces me to download JAVA, i just delete that app and use alternative one.