I need this for calling a C function from Java class (JNI) and I know that there are options to do this using "Microsoft Visual C++ compiler". (explained here)
But I am interested to know if something similar can be done using TC or TCC.
I don't have a copy of "Microsoft Visual C++" and not sure if cl.exe is available without having to install "Microsoft Visual studio"
Short answer: TC is perfectly capable to create a DLL.
Long answer: Turbo C++ is very old. The JNI include files might be using some language features not supported by TC. You might have better luck using another free compiler, for example Visual C++ 2008 Express.
MinGW is a free port of gcc. Great alternative to VS. Here is a tutorial on how to build jni libraries. TC is too old.
cl.exe is available without the full Visual Studio IDE. The 'Express' install for Visual Studio C++ has an option to install only the command line tools (handy for build machines).
Of course, you can install the IDE, too. You'll get the command line tools in that installation as well.
Finally, the Windows Driver Kit (WDK) comes with a command line compiler.
Also, the Turbo C/C++ you linked to is from 1991 - I'm not sure if it can generate DLLs, but it almost certainly can't generate a Win32 DLL (I'd guess that the best if can do is a Win16 DLL). I wouldn't use it for anything except curiosity/nostalgia. I'd consider it a miracle if it could do anything with JNI.
Yes I agree with DR. You will be much better off using one for MS's free tools (Visaul C++ Express) Just create a library project, code away and then compile it down to a DLL.
Cheers
Yes its possible
I have written a simple tutorial for implementing a "Hello World" program using "Borland Turbo C++" and JDK 1.5
Check it out - here
Related
I am using Java for my CS class at school, and I am currently using IntelliJ IDEA as my IDE. Along with this, I am using C++ for my personal projects/college course. Is there any way to edit, compile, and run Java in Xcode so I don't have to switch IDEs?
My current Xcode version is Xcode 8.0 (8A218a). I would like to run using Java 1.8.*.
When I was in school, I attempted to do the same exact thing and I found that it took too much time compiling my Java code in Xcode, switching to my terminal to execute the executable, etc. In short, if you enjoy using Xcode, feel free to use it as a text editor but you won't get much use out of it beyond that using Java.
Not to mention, if you decide to pursue a career as a Java Developer, you're far better off mastering an IDE such as IntelliJ or Eclipse; most companies if not all use them. Good luck!
anyone know any cpp compilers for power-pc? Preferably something that will work for os 9. I have an old imac g3 I would like to make programs for. If cpp didn't exist for it, what should I use to program for it?
For bonus points if you can find a java development kit for power-pc too that would be awesome!
Thank you all in advance:D
Well, gcc can compile code for ppc.
You need to install the toolchain for the architecture you are targeting.
Search for "cctools" / "binutils" / "crosstools" or "ppc cross-compile environment".
You can also take a look at:
Building and Testing gcc/glibc cross toolchains (This will probably work)
Host/Target specific installation notes for GCC (search powerpc in the page)
Unfortunately, I don't have a good java development kit for power-pc to recommend you.
Look for LLVM, they make the official C and related compilers for MacOS. A C compiler should be enough to build it. GCC would be my second bet, it certainly handled PowerPC (Linus Torvalds had a G3 Mac as his primary development machine at some point, IIRC). Perhaps a search for unofficial software repositories leads to a working package, or perhaps looking for fan groups of PPC Macs helps.
There is no official JDK for power-pc anymore. However, there are ports around if you are prepared to put in some effort yourself. For example:
http://javaevangelist.blogspot.com.au/2012/02/openjdk-7-on-apple-g5-powerpc-on-mac-os.html
Java 6 on Mac PowerPC with Mac OS X 10.4
http://openjdk.java.net/projects/bsd-port/
Also, bear in mind that the G3 is really old, and the community of people interested in using it and porting stuff to it is likely to be really small. I'd say that the chances of OS 9 support is pretty minimal.
I know that MonoDevelop comes with IDEs for C and C# (among others), but how would I get Java as well? Assuming I'm on a 64-bit Windows machine.
Thanks
There is some support for Java in Mono using IKVM.NET. Take a look at the http://www.mono-project.com/Java
There is also a plugin for Java in MonoDevelop - https://github.com/mono/monodevelop/tree/master/extras/JavaBinding, using IKVM.NET as well. You can try to build it and check how it goes.
Keep in mind that the purpose of IKVM.NET is to run Java code on top of .NET framework, so it will be "another Java" at least.
Is anyone using Jruby in emacs? I have setup emacs and it works perfectly for ruby code using jruby. However notice that java code isn't executing from within emacs. I have installed mode-compile and all my code except for java in jruby.
Been searching options for Java and of course found JDEE, noticed in a previous java specific thread however concerns with JDEE What is the best way to do Java development in Emacs? age/not developed/works only for Java5 etc.
I found another emacs how-to http://zarb.org/~gc/html/java-emacs.html noted the date it was posted was 2005 and the author advised to use Eclipse for Java.
Has anybody got suggestion on using Jruby in emacs?
Malabar-mode is the only real alternative to JDEE(especially for Maven based projects). I'm not sure how it will fit into your JRuby development toolchain, though. Another more general solution would plain old java-mode + CEDET + emacs code browser.
According to this answer to an earlier question of mine, the WinInet Windows API is the correct way to read and write internet connection settings in Windows. How can I use this API from Java? I'd prefer a free, open-source solution.
There's always JNI and JNA, but if you don't already know C or C++ there'll be a learning curve involved, especially with JNI: JNI Reference, JNA Site
Over the last months I had to mix with my Java project some C, C++ and Win32 alternatives for native access. After a lot work with JNA and recently with JInvoke for such integration, I can tell you that JInvoke is a little mature than JNA. Even JInvoke be older than JNA, I found its syntax more concise and simple. Sorry for those who loves JNA but using JInvoke I could literally hook the windows api from Java.
I see there's a commercial library called JInvoke that:
enables Java developers to easily
invoke native methods (such as the
Win32 API or C-based Windows DLLs and
Unix dynamic libraries) with pure Java
code.
However I'd prefer something free and specifically targetted at the WinInet API.
Have a look at JACOB project
JACOB is a JAVA-COM Bridge that allows
you to call COM Automation components
from Java. It uses JNI to make native
calls to the COM libraries. JACOB runs
on x86 and x64 environments supporting
32 bit and 64 bit JVMs
http://sourceforge.net/projects/jacob-project/