• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Would it be any useful if...

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...we had a language or tool or IDE or whatever you want to call it, which followed the exact same syntax of Java and produced machine code instead of byte code?

Every so often, I have to do things that require interacting directly with windows. I try googling and find that it can be done very easily using VB or sometimes VC++ or C#. Since I have never worked with VB or VC++ (though I know C++ concepts), I feel terribly handicapped. Last time I tried writing a simple multi threaded program in VC++ (which is a breeze in Java), I was totally lost. Finally a vc++ guy did it.

With my little knowledge about C#, I can see that MS has substantially eased windows programming (as comparted to VC++). C# is practically Java for windows.

However, C# is still another language to learn, and it still needs the .Net runtime.

Did anybody here ever feel a need for something like "Java for C++"? I mean, I want C++ but in Java. So it would let me code in Java but the output will be an exe or .so (whatever the underlying OS is). I know there are some bytecode to native code converters but I don't think that is what I want because they still limit me to what the JVM supports and there is no GUI support.
 
author and iconoclast
Posts: 24203
43
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are commercial products that make the whole Win32 API available to regular Java. Buy one, and you're all set. Or use JNI and something like SWIG to generate the wrapper code for you.
 
Ram Bhakt
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I mean is that I would like to develop native applications ....using Java. Yes, to use existing dlls or any other native code, JNI is the option (only?) but if you want to write native code, you still need to use C/C++. I would like to do that in Java.
So I guess what I am thinking of is the usage of Java as just a language and not as a platform... to do some thing other than being fed to a compiler that generate JVM bytecode.

The whole point of doing that is to leverage the simplicity of Java language as compared to C/C++. After all, C/C++ is just a language/syntax, which is analogous to one aspect of Java. So potentially, there can be a compiler than can read java code and generate machine code.

In fact, MS is doing the same thing with its "language independence". You can write using any language you are comfortable in and develop the same application (albeit, the platform will be Windows).

In my case, I am talking about platform independence (not locked in to just the JVM) but the language is Java. The reason is that I speak only only language, Java, so I am language dependent, but I would like to develop apps for multiple platforms and not just for JVM.
[ January 10, 2006: Message edited by: Ram Bhakt ]
 
Ranch Hand
Posts: 815
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My understanding is they have compilers to exe files. Never had the patience to figure them out myself.
 
Ram Bhakt
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found some at http://www.bearcave.com/software/java/comp_java.html Looking into it...
 
A magnificient life is loaded with tough challenges. En garde tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!