Click here to Skip to main content
12,999,157 members (42,232 online)
Rate this:
Please Sign up or sign in to vote.
I am beginning a new project that requires a nicely refined user interface but also requires portability between Windows and Linux. I am unsure about which way to go about this though, my choices seem to be:

Use c/c++ and a cross platform toolkit such as QT
Benefits are I already use c/c++ and just need to learn the QT library

Write the whole project in Java
Benefits are its the same code for every system but I'm new to Java

For some background the project requires access the the systems sound card and the ability to talk to a USB connected device. The device has drivers for Win/Linux/Mac with a uniform API on each platform but I'm worried that if I use c/c++ as the core program I will need to compile three different versions with subtle changes such as device initialization.

Where should I focus my efforts?
Posted 2-Jul-11 8:24am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Learning Java from C++ is easy.
Your problem will not be Java itself, but the library you will use for GUIs.
And it is the same problem as learning the QT library.
Trevor Johansen 2-Jul-11 20:59pm
Is Java a good place to focus my energy on? All of the applications I plan on writing to handle my hardware need to be Windows/Linux compatible as 90% of users are on Windows and I develop on Linux.

It seems like the logical choice but it still has a lot of pitfalls such as throughput when handling external communications. For example an Isosynchronous USB device will never have a hope of achieving USB 2.0 bandwidth when the application is written in Java.

What is a decent looking GUI library for Java? All I have heard of is Swing.
Emilio Garavaglia 3-Jul-11 5:56am
Java is not for performance, C++ is not for "opennes", especially if used close to the hardware. Gui can even be none of the two, but a HTML/XML browser app, driven by a C++ server socket. I probably code the core as C++ module, with a plain C interface, to be linked by other modules, written in whatever language is suitable to make the job done. A QT based C++ gui is fine (but .. hey .. that's not "pure C++", there is lot of other scripting translated into C++ code behind it).
TorstenH. 4-Jul-11 3:12am
lame argument! Java can have a really nice performance nowadays.
You just need to give it the needed resources. We are developing real time solutions on Java - that's not a problem at all.
Emilio Garavaglia 4-Jul-11 3:49am
What does it mean "You just need to give it the needed resources"?
Do the right comparison with the SAME resources! Otherwise whatever thing we may say is true!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170622.1 | Last Updated 2 Jul 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100