Starting new GUI project, is java suitable?

G

Greb

I'm in the planning stages for a GUI which has to talk to a DLL in Windows
as part of it's operation. I haven't done anything with Java but I am a
fairly experienced C++ programmer. I would like to use either C# or Java,
for the GUI does the JDK have easy ways to use old DLLs in Windows?

-cg
 
A

Alex Bendig

I 'd venture to say that you would have a much better time using C# for
that. The syntactical differences between Java and C# are small, which will
make a later transition a lot easier. The GUI design and the loading of DLLs
is probably easier in C# as well. In theory you can accomplish both with
Java as well, however, it does go against the idea of machine independency.
Will you be targetting Windows machines exclusively? Would you be using the
..NET SDK only or do you have visual studio available? The nice thing about
..NET is that you can mix C++ and C#, etc. and, well, I'm assuming also J#,
but I would not necessarily recommend Microsoft's version of Java ;-)
Anyway, considering your background, this would probably be easiest to start
with.

Regards,
Alex
 
R

Roedy Green

I'm in the planning stages for a GUI which has to talk to a DLL in Windows
as part of it's operation. I haven't done anything with Java but I am a
fairly experienced C++ programmer. I would like to use either C# or Java,
for the GUI does the JDK have easy ways to use old DLLs in Windows?

I would not say they are easy, but you can do it with JNI. See
http://mindprod.com/jgloss/jni.html. You may find them too much
hassle. It may be easier to port the C++ code to java than to build
custom hooks to every method. You also have the benefit of portable
code when you are done.

I strongly recommend buying a text book before tackling a JNI project.
Sun's documentation is atrocious.
 
T

Thomas G. Marshall

In
Greb said:
I'm in the planning stages for a GUI which has to talk to a DLL in
Windows as part of it's operation. I haven't done anything with Java
but I am a fairly experienced C++ programmer. I would like to use
either C# or Java, for the GUI does the JDK have easy ways to use old
DLLs in Windows?

-cg


You could do this, and pretty much anything in Java, since java allows java
method to C routine mapping. But this would be on a routine by routine
basis only.

That means that you'd either have to have a different java method for every
DLL function, which is how most would do it, or have a
marshaling/unmarshaling funnel from a single java method to a single native
C routine that then decides which DLL function to call.

Both these mechanisms will only eventually march you into a taliban soccer
stadium with a bag on your head.

I think you should investigate C#. And believe me, that is hard for a 100%
java pundit like me to say.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top