Quantcast

How to add java with onboard compiler(in case anyone wants to know)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to add java with onboard compiler(in case anyone wants to know)

Alex Gibson-3

Just in case anyone needs the same thing as the wiki and other
instructions don't cover it completely and I can't create an account on
the gumstix wiki to add this.

Had to do this as had a request from a lecturer to have an onboard java
compiler and vm
on our remote lab overo rig.


on a running gumstix with internet access
 as root

first add angstrom repo
echo 'src/gz angstrom-base
http://www.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base'
 > /etc/opkg/angstrom-base.conf

This assumes you have task-native-sdk installed

okpg update

#VM Option one
opkg install classpath
opkg install classpath-dev     # it dummy spat on libgnutls-dev   # also
installs lots of other packages

opkg install libgnutls-dev
opkg install classpath-dev

#If you need java gui
opkg install classpath-gtk

opkg install cacao
opkg install jikes

#set the bootclass path so jikes can find the classes
export BOOTCLASSPATH=/usr/share/cacao/vm.zip:/usr/share/classpath/glibj.zip

then with standard java hello world
vim Hello.java
/* Hello.java */

public class Hello
{
  public static void main(String[] args)
  {
    System.out.println("Hello world");
  }
}

alxx@omap1:~$ jikes Hello.java
alxx@omap1:~$ ls
Hello.class  Hello.java
alxx@omap1:~$ java Hello
Hello world

If using gui(and graphical output) remember to export the display
export DISPLAY=:0.0


VM option 2  if you need a vm with debugging or remote debugging(with
eclipse)

wget
http://bugcommunity.com/downloads/files/phoneme-advanced-personal-debug_mr2-r1_armv6.ipk

 opkg install -force-depends phoneme-advanced-personal-debug_mr2-r1_armv6.ipk

alxx@omap1:~$ java-cdc Hello
Hello world


Ash your gumstix wiki instructions at
http://wiki.gumstix.org/index.php?title=Eclipse_on_Gumstix_for_new_users
 have the wrong link for the vm
should be
wget
http://bugcommunity.com/downloads/files/phoneme-advanced-personal-debug_mr2-r1_armv6.ipk

Hope this helps someone.


Alex



------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add java with onboard compiler(in case anyone wants to know)

Alex Gibson-3

okay all fixed up and now added as a wiki page
http://wiki.gumstix.org/index.php?title=Onboard_Java_Compiler


Alex



------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add java with onboard compiler(in case anyone wants to know)

Ash Charles
In reply to this post by Alex Gibson-3
Hi Alex,

Thanks for the great instructions and correcting the link!

-Ash

On Sat, Apr 9, 2011 at 11:47 PM, alxx <[hidden email]> wrote:

>
> Just in case anyone needs the same thing as the wiki and other
> instructions don't cover it completely and I can't create an account on
> the gumstix wiki to add this.
>
> Had to do this as had a request from a lecturer to have an onboard java
> compiler and vm
> on our remote lab overo rig.
>
>
> on a running gumstix with internet access
>  as root
>
> first add angstrom repo
> echo 'src/gz angstrom-base
> http://www.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base'
>  > /etc/opkg/angstrom-base.conf
>
> This assumes you have task-native-sdk installed
>
> okpg update
>
> #VM Option one
> opkg install classpath
> opkg install classpath-dev     # it dummy spat on libgnutls-dev   # also
> installs lots of other packages
>
> opkg install libgnutls-dev
> opkg install classpath-dev
>
> #If you need java gui
> opkg install classpath-gtk
>
> opkg install cacao
> opkg install jikes
>
> #set the bootclass path so jikes can find the classes
> export BOOTCLASSPATH=/usr/share/cacao/vm.zip:/usr/share/classpath/glibj.zip
>
> then with standard java hello world
> vim Hello.java
> /* Hello.java */
>
> public class Hello
> {
>  public static void main(String[] args)
>  {
>    System.out.println("Hello world");
>  }
> }
>
> alxx@omap1:~$ jikes Hello.java
> alxx@omap1:~$ ls
> Hello.class  Hello.java
> alxx@omap1:~$ java Hello
> Hello world
>
> If using gui(and graphical output) remember to export the display
> export DISPLAY=:0.0
>
>
> VM option 2  if you need a vm with debugging or remote debugging(with
> eclipse)
>
> wget
> http://bugcommunity.com/downloads/files/phoneme-advanced-personal-debug_mr2-r1_armv6.ipk
>
>  opkg install -force-depends phoneme-advanced-personal-debug_mr2-r1_armv6.ipk
>
> alxx@omap1:~$ java-cdc Hello
> Hello world
>
>
> Ash your gumstix wiki instructions at
> http://wiki.gumstix.org/index.php?title=Eclipse_on_Gumstix_for_new_users
>  have the wrong link for the vm
> should be
> wget
> http://bugcommunity.com/downloads/files/phoneme-advanced-personal-debug_mr2-r1_armv6.ipk
>
> Hope this helps someone.
>
>
> Alex
>
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to add java with onboard compiler(in case anyone wants to know)

Laila
This post was updated on .
In reply to this post by Alex Gibson-3
Thank you for the wiki. But you forgot a step in the wiki "Onboard Java Compiler" page :

opkg update

Before installing classpath. It might look obvious but not for a newbie ...

Have a good one.

Alex Gibson-3 wrote
okay all fixed up and now added as a wiki page
http://wiki.gumstix.org/index.php?title=Onboard_Java_Compiler


Alex



------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Loading...