Home of www.RoboHobby.com Java robotics project www.CubesAndCrosses.com
Train your logic skills in geometry
Create and delete one-color crosses
Play for free right in your browser!
Home-made CNC machine
Our new project -
How to make home-made CNC router
PICkit2 - Tutorials, Experiments
PICkit 2 - Small size USB programmer
from Microchip.
How to use it as a demo device for
USB programming in C language

www.RoboHobby.com
Home of www.RoboHobby.com
Java robotics project


Portable Notebook Table
How to make Portable Notebook Table.
Do it yourself!

Control robot on-line (GWT)
Control our robot on-line,
using GWT-based Web interface

Web-based (GWT) remote control for Java robotics.

Control robot on-line
Control our robot on-line,
using simple Web interface
(Old JSP-based version)

Web-based (JSP) remote control for Java robotics.

Sun SPOTs for robotics
Sun SPOT for hobby robotics.
How to use Sun SPOT devices
comunication of group of robots


Sun SPOT Accelerometer + Servo
Sun SPOT Balancing robot
Draft of new article


PICkit2 - Tutorials, Experiments
PICkit 2 - Small size USB programmer
from Microchip.
How to use it as a demo device for
USB programming in C language


Java SE SWING JSR-296 Example
How to run background task in
JSR-296 SWING application
with 'busy animation' in the status bar.
Useful addition to Netbeans template.

Java ME Code Examples
Java ME Source code examples
for robotics projects


Run Java ME Code Examples
How to run our Java ME code examples
for robotics projects


Java - work from home
Draft for article
'Java work from home.
(Java and self-employment)
Where and how to get
remote (telecommuting) job'


ScreenShots
See some screenshots of RoboHobby
Java/SWING application

See some screenshots of www.RoboHobby.com Java SWING application

Where programmers go
after age of 35?

Article in Russian
about job discriminationin
in IT industry:
'Where programmers go
after age of 35'?




Atmel NGW100 for
Java Hobby robotics

Set of articles about
Atmel NGW100 for
Java Hobby Robotics




Canon A570 IS + CHDK for
Kite Aerial Photography

How to use photo camera Canon A570 IS
with CHDK for kite aerial photography

Plastic box for Canon A570 IS
for Kite Aerial Photography (KAP)

How to make plastic box for Canon A570 IS

Kite Aerial Photography
Create your own hand-made kite for KAP
and do snapshots from a kite

Create your own hand-made kite for Kite Aerial Photography (KAP) and do snapshots from a kite, using cell phone or camera.

RoboHobby Kite
How to install and use
J2ME program on your cell phone,
make spy camera from it
and do snapshots from a kite

Picavet Suspension
Hand-made 'Picavet Suspension' for
Kite Aerial Photography (KAP).
How to make it by yourself.

Compact Picavet Suspension
Aluminum Home-made compact
'Picavet Suspension' for
Kite Aerial Photography (KAP).
You can fold it and make it
portable.

How to fly 'Flow form' kite in calm (No Wind) condiction.
Green Island KAP photos
Photo views from kite of
'Green Island'

Green Island
Some views from the ground
of rectreation zone
'Green Island'

KAP Wind Maps
Web-Map-based project
for local win measurement



Simple Spam Protection
Simple Spam Email Protection -
GWT-based code example


Under Linux
Install and Run RoboHobby application under
KNOPPIX 5.0


Under Windows
Install and Run RoboHobby application under
MS Windows XP


Platforms for Java Robotics
Which hardware/os platform to choose
for hobby robotics?



Download
Download RoboHoby Software

SpyGear's 'Spy Robot'
Article about reconstruction RC toy 'Spy Robot'
How to make robot with web camera or
with cell phone on a board from it


Load to your phone
Download RoboHobbyJ2ME application
right to your Siemens S75 cell phone.
Now no need to load it to PC, unzip, etc.


RoboHobby Linux Live CD
RoboHobby Linux Live CD
is ready for download.


Projects
List of old and current RoboHobby projects.

Hardware
List of what we use as a hardware

Software
List of software, we use in our projects

Computer vision
Vision is the main sense of our robots.
See some Java algorithms we use

Tips-n-Tricks
Some advices about hardware and software tricks

PIC Programming
(firmware)

Assembler program for PIC16F628A
Communication program for sending
commands from cell phone to motors.
Driver for motor controller.


RoboHobbyPlugin
Open Source project on
SourceForge, Java brain
for the robot

How to update Java
on KNOPPIX 5.0

Set of articles about how to remove
old version of Java (JRE or JDK)
on KNOPPIX and install new one
on remastered CD
Part 1 (Just test new Java)

Part 2
(Place new Java on Linux Live CD)



Java to EXE
Article about how to compile Java
programs to native binary code
(EXE for Windows)


Range of Bluetooth, Wi-Fi, ZigBee
What is the a real connection distance
of typical Bluetooth and Wi-Fi,
ZigBee or other RF devices?



What is inside?

What is inside web camera
'Genius Look 312P'?
How to re-construct it,
improve and use in robotics.

What is inside web camera
'Genius VideoCAM GE111'?
How to re-construct it,
improve and use in robotics.

What is inside web/photo camera
'Genius G-Shot D612'?
How to use it for
Kite Aerial Photography (KAP).


Sun SPOTs (in Russian)
Sun SPOT for hobby robotics.
Introduction lecture in Russian.




About
Some info about this site

About EATJ Java hosting
Some info about EATJ Java server-side
JSP/Servlet hosting



Short description of www.RoboHobby.com in German In German
Short description of www.RoboHobby.com
in German


Short description of www.RoboHobby.com in French In French
Short description of www.RoboHobby.com
in French


Short description of www.RoboHobby.com in Spanish In Spanish
Short description of www.RoboHobby.com
in Spanish


Short description of www.RoboHobby.com in Italian In Italian
Short description of www.RoboHobby.com
in Italian


Short description of www.RoboHobby.com in Russian In Russian
Short description of www.RoboHobby.com
in Russian





www.RoboHobby.com

How to compile Java application to native code,
for example to Windows EXE file


For some type of Java applications it is important to compile Java right to EXE
(or Linux binary) executable file.

It is important for example for shareware programs,
where you should try to cover your source code.
As you may know, it is easy to de-compile Java classes back to Java source code
and see technological details of your program.

Also JRE size is one more problem.

This short article will describe the ways how to convert Java binary, how to make EXE file
and highlight problems, which you can find ob this way.


In general it is not too easy to do such a compilation.
Originally SUN idea was something like "Compile once, run everywhere".
SUN's Java compiler creates files "*.class" - files in special pi-code,
which are ready to be run in JVM (Java Virtual Machine).
JVM in fact is a special computer program, something like "special player for Java programs".


Even now it is impossible to run Java programs on a computer, where JVM is not installed.
SUN JDK is not able to compile Java source to native code.

User should have JRE (Java Runtime Environment) installed on his/her
PC to be able to run Java application.
But JRE is not too small in size. Current version is about 18-20Mb.

Is it possible to convert Java to EXE and run this EXE file without any JRE installed?

To make such a compilation you can use commercial Java compilers.
But the price is an issue.
Usually they are too expensive - from several hundreds to tens of thousands of US dollars.
We will not discuss this way of compilation in this article, rather we will be concentrated in free alternatives.




GCC/GCJ for Java to native code conversion



One of the most popular free compiler GCC is able to compile Java.
And it can do compilation right to native code.
To be able to create EXE file from Java under Windows we should use
Windows version of this free compiler MingW/GCC.


Many thanks to Mohan Embar. His GCC/GCJ bundles for MS Windows you can find on the URL:
http://www.thisiscool.com/gcc_mingw.htm
Recently I downloaded last bundle and installed it on my PC.


What is good in this kind of Java-to-native code solution?


1) It is free. GCC, which is originally came from Unix/Linux World was moved to
Windows World and it still free there.

2) You can mix Java and C/C++ in a special gcc way. You can use not only JNI,
the standard way how to combine C/C++ and Java, but also use gcc-specific way CNI.

3) You can use a lot of Unix/Linux C/C++ code in your applications, mixing them with Java code.

4) GCC/GCJ works with SWT Java GUI Library from IBM.
SWT is pretty good user interface library and you can pre-compile it to your Java program,
using GCC/GCJ compiler.

What is bad with the GCC/GCJ solution?



1) It comes not from the SUN and a s a result is it always behind current version of the
SUN's Java.
When you start to work with GCC/GCJ, very soon you will see the difference -
not all the things are implemented or even if they implemented,
they work different way.
For example you can easy find, that there is no JDBC there.
Also SWING doesn't work there.
Even if it is declared that SWING is supported, in fact it doesn't work.
At least I couldn't make it works
(It is only my personal experience - SWING doesn't work there).
2) Size of the resulting files. When I started to use GCC/GCJ for Windows,
I found the even first "Hello World" was compiled to 2Mb file.
I had an idea to use GCC/GCJ for shareware programming and the size is very important factor.
The less your file, the more people will download the program.

When several years ago I did experiments with this compiler I was surprised.
2Mb was surprising value, because, for example,
MS VC++ compile for "Hello World" produced the EXE file of 300K in size.

And now I downloaded some newer versions from the Mohan's Embar web page.

Now you can see the results of very simple experiment.
I've just compiled "Hello World" example in several versions of GCC/GCJ.

The result was even more surprising.

See the tests results for several versions of GCC/GCJ:

GCC/GCJ 3.4 "Hello World" EXE file size is 2.898 Mb
GCC/GCJ 4.0 "Hello World" EXE file size is 8.884 Mb
GCC/GCJ 4.3 "Hello World" EXE file size is 38.7 Mb

Yes, we should keep in mind, that in some versions of bundles are configured to
pre-compile some libs right to the EXE, some not.

But even if we remember about this factor, we still see the tendency...

May be in the modern World, where people use xDSL connection it is not so important
which size of the file you are loading?


May be...

But if one resulting EXE file is about 40Mb, may be better to download and install
'normal' Java from SUN?
Modern SUN's JRE is just 18-20Mb.
Plus your own application. If it not too complicated, it may be not more then 1-2Mb...







Google
 



Contact us:


My Skype name is oleg_skp
Start Skype text chatStart Skype text chat
View Skype profileView Skype profile
Start Skype voice callStart Skype voice call
Add me to your Skype contact listAdd to Skype contact list
Leave voicemail using SkypeLeave voicemail using Skype
Send a file using SkypeSend a file using Skype
Note: To use these links
the Skype program should
be installed on your computer.
You can load it for free from
their official site:
Contact via Skypewww.Skype.com
------------------