Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise.
If this question can be reworded to fit the rules in the help center, please edit the question.

1

If you're developing GUIs for windows, you're better off with C#, its syntax is very similar to this of Java, but it does more than Java ever could on windows.
–
Mahmoud HossamJun 2 '11 at 23:48

3 Answers
3

Learning programming is much harder than learning any particular programming language. So, it will not likely take you nearly as long to become productive in Java as it did to become productive in PHP (if that was your first language). One piece of advice: You need to try and learn "the way" of Java - not just its unique syntax and libraries but also the conventions of the Java development community.

I think what you may find more challenging than the difference between Java and PHP is the difference between web and desktop programming.

"Learning programming is much harder than learning any particular programming language. " -- agree totally, but, consider also that Java and PHP have very different models -- PHP is a scripting language strongly tilted toward web development, while Java is a general-purpose OO language.
–
TomGJun 3 '11 at 0:17

1

Do you have good pointers on learning "the way" of Java?
–
chiborgSep 5 '12 at 7:11

More specifically, the features of the app would be: Search, and display data in the GUI. All the data would come from a Mysql database. I want to use this Java app to manage a website of mine.
–
RyanJun 2 '11 at 20:47

@Ryan So why not to create a private web-based panels that only you can use? since you already know PHP. Why to spend too much time learning Java and Swing?
–
ChironJun 2 '11 at 22:36

You should not encounter too much difficulty learning Java if you already a solid foundation in the fundamental aspects of programming. There are some idiosyncrasies of PHP, however, that you need to be sure to look past when moving to another language.

Java is deeply object-oriented, and the Java development "culture" subscribes deeply to OO methodologies. PHP's OO was an afterthought added on, and is only beginning to fully mature. The PHP "culture" sometimes tends to care less about deep OO hierarchies because the language doesn't encourage it. PHP code tends to be an inconsistent mix of procedural and OO code, wherever the two are best suited. (This is not a criticism; PHP is my primary language these days too)

My suggestion would be this: Approach Java as though you are learning programming anew, though you already understand the important and fundamental flow control structures and atoms. Do not attempt to write Java code like it is a PHP web application, where the language sort of encourages a linear and procedural program flow. Use the time you spend learning Java to develop a strong sense of OO hierarchy and application architecture that you can spend years coding PHP without having to worry too much about.