wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Books for Java with C++ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Books for Java with C++" Watch "Books for Java with C++" New topic
Author

Books for Java with C++

Hitesh Kumar C
Ranch Hand

Joined: Sep 12, 2008
Posts: 32

Hi,

I am planning to use Java along with C++ for the Server Side programming.

Can anybody suggest me some really good books for this?

Kindly suggest?

Regards,
Hitesh


OCJP 6.0 - 88%
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
What do need besides separate books on Java and C++. Do you want to build a mixed system with integrated Java and C++ parts?
piyush aegis
Greenhorn

Joined: Dec 27, 2012
Posts: 6
You can trying to search (like : server side programming java with c++) in Google books and refer some pages of available books,
after you got some good book than go through it.


Liferay Application Development
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

If by C++ on server-side you mean CGI programs, then its highly outdated. If its going to be some native code, then its no where related to Java.
What is it you want to do with C++ that cannot be done through Java?


SCJP, SCWCD.
|Asking Good Questions|
Hitesh Kumar C
Ranch Hand

Joined: Sep 12, 2008
Posts: 32

Amit Ghorpade wrote:If by C++ on server-side you mean CGI programs, then its highly outdated. If its going to be some native code, then its no where related to Java.
What is it you want to do with C++ that cannot be done through Java?


I extremely sorry that i couldn't able to reply.

Yes i'm looking for some Java with C++ Integration.

Whereas, i could integrate c++ with Java.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Do you have a concrete idea about how to integrate Java and C++?
Hitesh Kumar C
Ranch Hand

Joined: Sep 12, 2008
Posts: 32

Ivan Jozsef Balazs wrote:Do you have a concrete idea about how to integrate Java and C++?


Yes, some how i tried the Concept of JNI, where i used C++ methods in Java.

I made that program by reading an article. But , i don't want to follow any article i just want to learn JNI step by step.

Can you suggest me any book name having same concept?
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
So you need a book on JNI better than the article you mentioned?
Hitesh Kumar C
Ranch Hand

Joined: Sep 12, 2008
Posts: 32

Yes. Please suggest or is there is any other way to integrate this technologies, kindly recommend.

Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Besides having decided this:
I am planning to use Java along with C++ for the Server Side programming.

you do not seem to have any more precise ideas.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11250
    
  16

I'm curious as to WHY you are starting off with "I am planning to use Java along with C++ for the Server Side programming." Isn't that putting the cart before the horse? Usually you'd start with deciding what you wanted to do before you decide on the tools.

For example, I would say "I'm going to use a blow torch and a socket set for building stuff", and then trying to figure out how to use those to cut the boards for your birdhouse.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5


"The Server Side programming" is also a rather vague notion. There are many kinds of servers: HTTP, HTTPS, RMI, FTP, FTPS, telnet, ssh, scp, CIFS, echo, daytime etc. and you are free to roll out your own. What do you mean?
Hitesh Kumar C
Ranch Hand

Joined: Sep 12, 2008
Posts: 32

I appreciate your reply and the way you suggest me for choosing what to do first.

Actually, we have several C++ Libraries and we need to call those methods in a Swing based Software. That's why I thought that this is the only way to achieve this.

I just want to start with some basics.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
So you seem to need literature on JNI. You could have asked about it in the first place.
Hitesh Kumar C
Ranch Hand

Joined: Sep 12, 2008
Posts: 32

Yes, it could possible.
Do you know any book,best to start with?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38449
    
  23
I looked for JNI tutorials last night and didn’t find anything I thought was any good.
Hitesh Kumar C
Ranch Hand

Joined: Sep 12, 2008
Posts: 32

Anyways,
I want to thank you all to suggest me and your valuable opinions.

I will buy a good book on this.

Thanks for your support.
Regards,
Hitesh
Winston Gutkowski
Bartender

Joined: Mar 17, 2011
Posts: 7688
    
  19

Hitesh Kumar Pithadiya wrote:I just want to start with some basics.

Well, this tutorial might be a place to start, but I'd also find a good book on the subject.

You should also be aware that using JNI is often a bit of a kludge, and is likely to make your app less portable; so I'd consider translating as much of your C++ stuff into Java as you can (all of it, if possible) - although, of course, that might take some time.

Winston


Isn't it funny how there's always time and money enough to do it WRONG?
Articles by Winston can be found here
Hitesh Kumar C
Ranch Hand

Joined: Sep 12, 2008
Posts: 32

Thanks!
I'll follow this article.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Campbell Ritchie wrote:I looked for JNI tutorials last night and didn’t find anything I thought was any good.


This seems to be a relatively fresh one; last modified: July, 2012
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38449
    
  23
Thank you. I shall try it. But it appears to be Windows‑based.
Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
There are hints on Unices and .so and gcc - maybe it is applicable to Unices.

Ivan Jozsef Balazs
Rancher

Joined: May 22, 2012
Posts: 867
    
    5
Along the above lines this works for me on
Linux 2.6.9-101.ELsmp #1 SMP i686 athlon i386 GNU/Linux





In pid_pid.h the include was hacked:


The wrapping script:


Where j0 sets JAV

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Books for Java with C++