Author Topic: JAPI 2.0  (Read 36475 times)

ScriptBasic

  • Guest
JAPI 2.0
« on: May 25, 2013, 04:47:17 PM »
I don't know if you guys remember JAPI or not but I think it's a cool extension to any language now that Java is so popular on Android. It was abandoned it seems back in 2003 with the binaries compiled for AWT. After looking over the source, I noticed a Swing version of the Java code. I compiled the Swing version of the Java code building JAPI.jar and used that as the japiserver. Everything seems to work fine and I'm blown away how fast it is. I posted the ScriptBasic version of JAPI on the SB forum and I attached the japi.dll & japi.h (generic version) to this post. It would be interesting to see how this would work as a 2D game engine.


Mopz

  • Guest
Re: JAPI 2.0
« Reply #1 on: May 25, 2013, 05:46:47 PM »
I think I'll have a look at this, thanks :) Should work fine as a naalaa extension.

Mopz

  • Guest
Re: JAPI 2.0
« Reply #2 on: May 25, 2013, 06:08:40 PM »
Could you make a static library of it instead? I'll have to create a dll for the naalaa extension, and one dll looks better than two. I'm using MS VC2010.

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #3 on: May 25, 2013, 07:56:31 PM »
The JAPI 2.0 japi.lib is attached.




Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #4 on: May 25, 2013, 08:43:43 PM »
Don't we also need the JAPI.jar? Or did I miss anything?

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #5 on: May 25, 2013, 08:55:31 PM »
Quote
Don't we also need the JAPI.jar?

Nope.

It's embedded in the DLL/lib.


ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #6 on: May 25, 2013, 09:04:03 PM »
FYI

I registered JAPI2.com and plan a forum or blog to help bring this project back alive. At this point we have a ScriptBasic extension module, a C DLL (VC10) and a LIB (VC10) that seem to be working based on the test programs that came with the distribution. It would be nice to bring someone into the fold that has a Java background. I'm stumbling along the best I can with it. Maybe when the japi2.com site opens it's doors, more of an interest in an alternative Java programming paradigm might unfold.


Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #7 on: May 25, 2013, 09:13:28 PM »
Quote
Don't we also need the JAPI.jar?

Nope.

It's embedded in the DLL/lib.

Ah, okay. I just tested the japi.pas from the original page with your extension. At least it works on Windows, but I think for Linux I have to do some work on the unit. Anyway, I have no SWING user interface. See attached screenshot. Although it should look like this, right?



Another annoying thing is that Windows always asks if the firewall should block the program or not ... Well, not always but once a program is compiled and started.
« Last Edit: May 25, 2013, 09:21:49 PM by Cybermonkey »

Mopz

  • Guest
Re: JAPI 2.0
« Reply #8 on: May 25, 2013, 09:20:57 PM »
The JAPI 2.0 japi.lib is attached.

Thanks! Let's see what fun I can make out of it. I need more extensions before I can feel good about releasing another naalaa version, and this one'll be good :)

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #9 on: May 25, 2013, 09:27:50 PM »
The binaries from the old site are based on awt. The 2.0 series is based on swing. I used mingw32 to process the Makefile that compiles the Java code (javac) and builds the C compiled helper programs that generates the appropriate binding code. I then use MS VC10 to create the final DLL/LIB.

« Last Edit: May 25, 2013, 09:33:48 PM by ScriptBasic »

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #10 on: May 25, 2013, 09:40:11 PM »
The binaries from the old site are based on awt. The 2.0 series is based on swing. I used mingw32 to process the Makefile that compiles the Java code (javac) and builds the C compiled helper programs that generates the appropriate binding code. I then use MS VC10 to create the final DLL/LIB.
Erm, then you posted here the AWT version? Could you also post the SWING version?

Cybermonkey

  • Administrator
  • *****
  • Posts: 0
Re: JAPI 2.0
« Reply #11 on: May 25, 2013, 09:43:09 PM »
Okay, I downloaded the SWING version from your forum, but now I have the problem that the procedure j_button isn't found in the DLL.

Mopz

  • Guest
Re: JAPI 2.0
« Reply #12 on: May 25, 2013, 09:48:38 PM »
I did use java a lot for gui programs many years ago, always liked awt better than swing because of the native look. That's the good thing about iup too. People want your programs to look and feel the way they're used to. But I'll focus on the render speed for now, as that's my area of expertise.
« Last Edit: May 25, 2013, 09:50:19 PM by Mopz »

ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #13 on: May 25, 2013, 09:55:43 PM »
Does the demos that came with the SBJAPI2_RC1.zip  run? (use the SB JAPI script code as an example)

Both Charles and I were able to use the generic japi.dll with the Mandelbrot example.




ScriptBasic

  • Guest
Re: JAPI 2.0
« Reply #14 on: May 25, 2013, 09:59:49 PM »
Quote
I did use java a lot for gui programs many years ago, always liked awt better than swing because of the native look.

AWT is ugly like Motif. I see no performance hit using swing. The UI that swing brings to the table is awesome and consistent across the board.