Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ Classes in Java ?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Ax3l
Cheater
Reputation: 1

Joined: 22 May 2011
Posts: 37

PostPosted: Wed Jun 01, 2011 5:35 am    Post subject: C++ Classes in Java ? Reply with quote

How would I use C++ classes in Java ?
Or C# classes would be fine too (not JNBridge please Sad )
Back to top
View user's profile Send private message MSN Messenger
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Wed Jun 01, 2011 6:02 am    Post subject: Reply with quote

http://en.wikipedia.org/wiki/Java_Native_Interface

I haven't used JNI much, but I know that you can load and use .dlls written in native languages. I also have heard horror stories about how big of a bitch it is to get setup. There is less information on it available than other libraries but you should be able to find enough to get you going with basics.

PS. I don't think you can use class files directly, only compiled .dlls with exported functions

_________________
Back to top
View user's profile Send private message
Slugsnack
Grandmaster Cheater Supreme
Reputation: 71

Joined: 24 Jan 2007
Posts: 1857

PostPosted: Wed Jun 01, 2011 6:10 am    Post subject: Reply with quote

I've only used JNA which is supposed to be the better option and is still pretty much a bitch to use. Even to have a small piece of native code, you must first declare the function signature in terms of Java basic types. It should be avoided except where possible simply because of the hassle and the hit on readability you'll get. Rethink whether you really need to do this..

I think there are simpler ways where you call exported functions instead which require less work on the Java side but still.. should be avoided where necessary.
Back to top
View user's profile Send private message
Ax3l
Cheater
Reputation: 1

Joined: 22 May 2011
Posts: 37

PostPosted: Wed Jun 01, 2011 2:40 pm    Post subject: Reply with quote

Well I want to use directX things in Java
But its pretty darn hard to find out how to do it in Java
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Wed Jun 01, 2011 4:14 pm    Post subject: Reply with quote

just use an already made wrapper.

opengl is probably more common though. look at http://lwjgl.org/
Back to top
View user's profile Send private message
Ax3l
Cheater
Reputation: 1

Joined: 22 May 2011
Posts: 37

PostPosted: Thu Jun 02, 2011 5:20 am    Post subject: Reply with quote

slovach wrote:
just use an already made wrapper.

opengl is probably more common though. look at

Does it have something like Xinput ?
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Thu Jun 02, 2011 6:00 am    Post subject: Reply with quote

it looks like an input library is included as well
Back to top
View user's profile Send private message
HomerSexual
Grandmaster Cheater Supreme
Reputation: 5

Joined: 03 Feb 2007
Posts: 1657

PostPosted: Thu Jun 02, 2011 8:35 am    Post subject: Reply with quote

lwjgl is pretty nice. If you just want to do simple 2d stuff, use Slick2D which is a lwjgl wrapper with 2d focus.
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites