Question:
Comfortable in C and C++ but irritated in java.?
anonymous
2014-04-10 13:46:28 UTC
I have 2 questions:

(1)

As most of the peoples say Java is easier to learn than C++, but after learning GUI programming with VC++ I moved to java. A long time has passed but I still couldn't be as comfortable in java as I am in C++ and C. When any project (game based or something) is given in college, I am always confident and complete it often before time, but same projects, when given to be done through JAVA, always forces me to think twice, Even if they are simple ones.

Overall, I found GUI programming through Java to be more troublesome than that of VC++.
Specially the worse part I found is the split coding. :( keeping multiple files in a directory and then compiling them, running applets through html files etc, and errors!!! ahhh. . .

So, I wanna know if it is going to cause any trouble if I skip java and keep using C++ and C.

(2)

as I said java GUI programming is quite troublesome and same through C++ is easier, so I wanna know whether it is necessary to use java for GUI programming when I already do it through C++.
( i am always targeted to windows OS though, don't care of cross platform applications ). :)
Three answers:
justme
2014-04-10 15:21:51 UTC
I personally hate Java and do ALL of my GUI apps in VC++. In fact I still use visual studio 6.0 to avoid the .net crap. My apps run on all windows OS's and they will even run on a mac if someone has a virtual machine installed to run window programs.



I dont worry about them not running on other platforms because my customers use windows exclusevely.



The only problem you may run into is if a job requires knowing Java GUI.
husoski
2014-04-10 16:57:46 UTC
To amplify what Chris said, not only can you package your application or applet in a JAR file, but that's the normal way to do it. The NetBeans and Eclipse IDEs each do this automatically for both for applications and class libraries.



You might be giving up on future job opportunities by "skipping" Java, but it may be that you wouldn't be happy in such jobs anyway. Is that really a loss? Another, more serious bit is that Android apps are mostly written in Java. Not the same GUI framework, but still Java. If you want to write for mobile devices, Objective C for iOS and Java for Android are the languges to learn. Nokia used C++ with a Qt-based framework, but they went belly-up last year. I have doubts that Blackberry will ever regain significance in this arena, or that Microsoft will ever attain it.



There's not always logic behind what we like and don't like. I don't care for Perl, for example, and it has nothing to do with fitness for any purpose. I do like APL, and to most people that seems like a "write-only language."



As for GUIs, I wonder how you're doing them in C++ right now. Microsoft has more or less abandoned support for application development using WinAPI, so programming at the WM_PAINT level hasn't seen new documentation in about a decade. MFC is the only true C++ framework for WinAPI, and that's pretty much a legacy-app framework now.



If it's not WinAPI, then what? Dot NET requires C++/CLI, which really isn't C++. If you're using that, I heartily suggest learning C#. It really is the only major language designed from the ground up for the .NET platform.



One thing I do like about Java is NetBeans, which allows relatively painless development of simple GUIs, with designer tools similar to what you get in Visual Studio.
?
2014-04-10 14:52:16 UTC
Addressing your update:

You can publish Java programs as a single .jar file, and running it does work by double-clicking it, provided the JRE is installed on the system. And that's really the big advantage with Java, it runs multiple OSs without having to port it.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Continue reading on narkive:
Loading...