Java Compilation on Monta Vista Linux

Hello : We have application wriiten in Java which we want to build on MV Linux for an embedded system ?

  1. we want to know if we need to make any change to the java s ource code to make it compatible for MV Linux where the target board would be IBM/Motorola Power PC 700.

  1. How do we setup the build enviornment for Java based applications.

thanks Mudit

Reply to
Mudit
Loading thread data ...

Hi,

you need to have or port a java virtual machine on your platform: I'm using kaffe - evantually chages in java source depend on haw complete the jvm porting is.

Another idea is to compile the java source to binary executible for your target (for example with gcj)

bye giammy

-- Gianluca Moro

formatting link
ISCRIVITI alla Mailing List Italiana su LINUX EMBEDDED snipped-for-privacy@yahoo.com Visit
formatting link

Reply to
giangiammy

giammy : Could u elaborate on what u mean when u say "the java source to binary executible for your target (for example with gcj)"

Reply to
Mudit

reading man helps a lot!

Reply to
M.Kmann

  1. Please write complete words and sentences. It is easier to read for us foreigners.
  2. There are two ways to execute Java code

- bytecode - native code.

The bytecode is a machine-independent binary code compiled from the Java source code. To run it there must be a program called Java Virtual Machine (JVM) in the native binary code of the target processor in the target machine.

Native code is what the name says: binary code in the own binary format of the target computer. It does not need the JVM to run.

The classical method of compiling Java code is to bytecode, and it's the only sensible format for Internet applets which have to run on different target machines.

The GCJ compiler of the GNU compiler suite is able to treat Java in much the same way as e.g. C: to the native code of the target computer instead of bytecode.

--
Tauno Voipio
tauno voipio (at) iki fi
 Click to see the full signature
Reply to
Tauno Voipio

tauno preceded me in giving you an answer: his mail is very detailed

bye giammy

Reply to
giangiammy

Tauno and others : So what I got is that the byte code that we have will still work if used with the rite JRE for the target paltform . I do not need to built the byte code again. Please correct me if I am wrong.

Reply to
Mudit

Yes - provided that all the other classes needed by it are present at the target system.

--
Tauno Voipio
tauno voipio (at) iki fi
 Click to see the full signature
Reply to
Tauno Voipio

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.