Bytecode compilation for java 1.3

Andrew John Hughes gnu_andrew@member.fsf.org
Tue Nov 9 14:28:00 GMT 2004


On Tue, 2004-11-09 at 08:52, COLLETTE Yann wrote:
> Hello,
> 
> I've got gcj from gcc-3.3.4.
> I would like to compile a java file into bytecode so as to work with the 
> sun java 1.3.
> How can I compile it ?
> 
> I've tried gcj -C --classpath="path-to-sun-java-1.3" MyFile.java, but it 
> doesn't work.
> 
> Your sincerely,
> 
> Yann COLLETTE
> 
> ______________________________________________________________________
> -- Disclaimer ------------------------------------
> Ce message ainsi que les eventuelles pieces jointes constituent une correspondance privee et confidentielle a l'attention exclusive du destinataire designe ci-dessus. Si vous n'etes pas le destinataire du present message ou une personne susceptible de pouvoir le lui delivrer, il vous est signifie que toute divulgation, distribution ou copie de cette transmission est strictement interdite. Si vous avez recu ce message par erreur, nous vous remercions d'en informer l'expediteur par telephone ou de lui retourner le present message, puis d'effacer immediatement ce message de votre systeme.
> ***
> This e-mail and any attachments is a confidential correspondence intended only for use of the individual or entity named above. If you are not the intended recipient or the agent responsible for delivering the message to the intended recipient, you are hereby notified that any disclosure, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please notify the sender by phone or by replying this message, and then delete this message from your system.

gcj won't work with the core classes from Sun's JDK -- it has its own
implementation of these.  If you compile to bytecode using gcj -C, you
will have something that will run under Sun's VM anyway.
e.g.

gcj -C MyFile.java

will produce MyFile.class, which you can then use with any VM including
Sun's.  If there is an issue with the generated bytecode not working
with Sun's VM, then please let the list know with as many details as
possible.

Thanks,
-- 
Andrew :-)

Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments.
See http://www.fsf.org/philosophy/no-word-attachments.html

"Value your freedom, or you will lose it, teaches history.
`Don't bother us with politics' respond those who don't want to learn."
-- Richard Stallman

"We've all been part of the biggest beta test the world has ever known --
Windows"
-- Victor Wheatman, Gartner

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/java/attachments/20041109/a4b34fb4/attachment.sig>


More information about the Java mailing list