java-haxe-extern-creator sample

115 views
Skip to first unread message

sebTisluta

unread,
Nov 6, 2013, 9:53:42 AM11/6/13
to haxe...@googlegroups.com
Hi there
Has anybody already used java-haxe-extern-creator project?
i really doin't understand the way it works,
i'd like to include google's java gson library into my haxe project 

if you have some samples i d apreciate

cheers

Andy Li

unread,
Nov 6, 2013, 9:58:46 AM11/6/13
to haxe...@googlegroups.com
There is no need to use extern for java lib anymore.
You can use -java-lib path/to/gson.jar and it will just work.
Try to use the latest git build if it doesn't.

cheers,
Andy


--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.

sebTisluta

unread,
Nov 6, 2013, 6:12:35 PM11/6/13
to haxe...@googlegroups.com
Sorry to bother you again since i m a beginer
1/ you mean when comping my project i just have to write something like 
openfl test myproject -java-lib gson.jar ????

2/ what about "autocompletion", i ll have to already know the api and it will resolve the library at compilation time?

3/ btw, just searchin "haxe -java-lib" i found no documentation at all...
troubles me a lot ;(
Nevermind,
 thanks for your help

Andy Li

unread,
Nov 7, 2013, 2:05:11 AM11/7/13
to haxe...@googlegroups.com
 
1/ you mean when comping my project i just have to write something like 
openfl test myproject -java-lib gson.jar ????
-java-lib is a compiler flag. For OpenFL, I believe you can add it by having <haxeflag name="-java-lib" value="path/to/gson.jar" /> in your project config file.
 
2/ what about "autocompletion", i ll have to already know the api and it will resolve the library at compilation time?
auto completion will simply works :)
  
3/ btw, just searchin "haxe -java-lib" i found no documentation at all...
troubles me a lot ;(
1 reason is that the "-" prefix let google search excludes "java-lib" result. You search search haxe "-java-lib" instead.
Indeed there is not much documentation on it, but it is just as simple as adding the compiler flag and it will just works.


cheers,
Andy

Andy Li

unread,
Nov 7, 2013, 2:08:32 AM11/7/13
to haxe...@googlegroups.com
But wait, OpenFL should not have Java target support yet. Are you sure you're targeting Java? The Android target of OpenFL is actually using the cpp target.
-java-lib will only works for Java target.

Sebastien Tiscar Astasio

unread,
Nov 7, 2013, 4:13:11 AM11/7/13
to haxe...@googlegroups.com
Hi there and thank you for your reactivity
actually i m juste exploring the possibilities of haxe
i'm a flash & java android developper, 
the target output was not a big question for me , the point is to publish on android/ios platforms
dosen't matter much if this doesn t work i ll parse json manually, not a big deal




Cordialement,
Sébastien Tiscar Astasio


2013/11/7 Andy Li <an...@onthewings.net>
You received this message because you are subscribed to a topic in the Google Groups "Haxe" group.

Andy Li

unread,
Nov 7, 2013, 5:10:37 AM11/7/13
to haxe...@googlegroups.com
If that's just for parsing json, you can use haxe.Json, which available in the std lib for all targets, or a bit more powerful TJSON.

Best,
Andy


You received this message because you are subscribed to the Google Groups "Haxe" group.

Sebastien Tiscar Astasio

unread,
Nov 7, 2013, 5:13:23 AM11/7/13
to haxelang
gson was interesting for deserializing json into concrete instances of class but yeah i am going to check tjson
thanks for everything
going slowly...but surely ;)
Reply all
Reply to author
Forward
0 new messages