Java & FreeBasic

For other topics related to the FreeBASIC project or its community.
integer
Posts: 378
Joined: Feb 01, 2007 16:54
Location: usa

Java & FreeBasic

Postby integer » Dec 19, 2016 17:00

Beginning last year, and over the summer of 2016, I looked at java.
I converted a bunch of programs from java to FreeBasic to understand the semantics, difficulties, work-a-rounds and detours required. I spoke with some business programmers and students in Computer Science.
The consensus: java was a viable language for developing programs.

Then I found this:
From the Register
16 Dec 2016 at 13:58, Gavin Clarke

Oracle finally targets Java non-payers ...
Thought Java was 'free'? Think again (and you owe us $$$ in 2017)
... Oracle is massively ramping up audits of Java customers
it claims are in breach of its licences – six years after it bought Sun Microsystems.


At the moment, I've decided not to continue with java; however, the conversions will continue.

Has anyone attempted to access java programs through FreeBasic?
St_W
Posts: 1467
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Java & FreeBasic

Postby St_W » Dec 20, 2016 12:32

Communicating between Java and C-style programs (like FreeBasic programs) works through JNI (Java Native Interface). There are even some examples in FreeBasic's example folder.

Regarding the news excerpt you cited: You don't have to care about that. You just would have to buy licenses for some special tools and technologies, but you won't use those anyway. All the relevant parts are free open source software - just use the OpenJDK (instead of Oracle's Java SDK) if you are curious about Oracle's licensing.
greenink
Posts: 200
Joined: Jan 28, 2016 15:45

Re: Java & FreeBasic

Postby greenink » Dec 20, 2016 13:43

I was going to do some code in Java too. It is actually quite suitable for low level programming as it is better defined than C and gives you easy access to the bit fields of floating point values etc.
When I read the news on theregister.com I kinda changed my mind.
There is a lack of low level programming language though. The main alternative for me is completely Linux AMD64 orientated FB.
It is difficult to share code ideas if I do that.
What I'm kinda looking for is Lua with primitive types, zero based arrays and some of the more complicated things like metatables taken out. There is something like that here: https://github.com/dibyendumajumdar/ravi but it doesn't go far enough.
Pritchard
Posts: 5492
Joined: Sep 12, 2005 20:06
Location: Ohio, USA

Re: Java & FreeBasic

Postby Pritchard » Dec 23, 2016 6:37

There is Rust if you want something low-level, Python if you want support on pretty much every embedded device these days (used to be C, but Python seems to be most popular now).

Java is used at the enterprise scale by plenty of organizations. It gets the job done.

I very highly doubt Oracle would ever want to disrupt the existing Java ecosystem.
Tourist Trap
Posts: 2756
Joined: Jun 02, 2015 16:24

Re: Java & FreeBasic

Postby Tourist Trap » Dec 23, 2016 15:19

marcov
Posts: 2752
Joined: Jun 16, 2005 9:45
Location: Eindhoven, NL
Contact:

Re: Java & FreeBasic

Postby marcov » Dec 23, 2016 15:39

Pritchard wrote:There is Rust if you want something low-level, Python if you want support on pretty much every embedded device these days (used to be C, but Python seems to be most popular now).


It still is C. Python is for beginners and OEM modifications. But as usual there are 1 million "how to start embedded" courses and tutorials using Arduino and RPI, and very few advanced material, so one easily gets the wrong impression from internet.

I do professional embedded development (mostly Microchip, and a bit of ARM and Atmel) for about 40% of my time, and I don't know a single one that uses Python. The Raspberry Pi is different, but its higher clock and base libraries in C somewhat obscure the penalties. But the core work is still done in C.

Logical, since something like Arduino doesn't even have DMA or other async options and everything is done by bitbanging.
greenink
Posts: 200
Joined: Jan 28, 2016 15:45

Re: Java & FreeBasic

Postby greenink » Jan 07, 2017 0:50

C is defined as much by the compiler settings you use as by the code. I find that very problematic. With FreeBasic most all of the behavior is defined in the code. Actually the core Java language is rather well defined and there is some access to things like bit rotates. Unfortunately there are no simple, well defined low level programming languages available at the moment. Anyone doing compiler design cannot resist throwing in a bunch of fancy features and pet ideas.
I guess I'll stick with FB for the moment.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest