OESF Portables Forum

Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: cortez on February 07, 2006, 04:42:54 pm

Title: Java Environment
Post by: cortez on February 07, 2006, 04:42:54 pm
GNU Classpath 0.20 (http://www.gnu.org/software/classpath/), Essential Libraries for Java, is a GNU project to create free core class libraries for use with virtual machines and compilers for the java programming language.

Recreate package as follows: cat classpath.tar.bz2*.ipk | bunzip2 -c | tar xf -

Part 1 in this post, part 2 in next post (due to forum upload limit )

 [ You are not allowed to view attachments ]  (updated!)
Title: Java Environment
Post by: cortez on February 07, 2006, 04:45:43 pm
Part 2 of GNU Classpath 0.20 (http://www.gnu.org/software/classpath/)
Recreate package as described in first post.

 [ You are not allowed to view attachments ]  (Updated!)
Title: Java Environment
Post by: cortez on February 07, 2006, 04:48:29 pm
JamVM 1.4.2 (http://jamvm.sourceforge.net/) is a new Java Virtual Machine which conforms to the JVM specification version 2 (blue book). In comparison to most other VM's (free and commercial) it is extremely small, with a stripped executable on PowerPC of only ~150K, and Intel 110K. However, unlike other small VMs (e.g. KVM) it is designed to support the full specification, and includes support for object finalisation, Soft/Weak/Phantom References, the Java Native Interface (JNI) and the Reflection API.

 [ You are not allowed to view attachments ]
Title: Java Environment
Post by: Meanie on February 07, 2006, 11:48:12 pm
you're my hero. i'll try it out as soon as I get home. lemme throw this OQO in the corner and get my Zaurus back
Title: Java Environment
Post by: Chero on February 08, 2006, 04:53:43 am
Hello,

I have never used java before, but there are a few java apps I'd like to try.

Is it possible to run a .jar file and what is the syntax to do this.

When I try
# jamvm -jar Jabp.jar
I get :
Cannot create system class loader
......

I did :
# export JAVA_HOME=/usr/java/jamvm
# export PATH=$PATH:$JAVA_HOME/bin

I suppose there's more to be done ?

Are there some hardcore-java-users around ?

Have fun,
Chero.
Title: Java Environment
Post by: wjping119 on February 08, 2006, 06:18:51 am
I have the same problems,but i did

# export JAVA_HOME=/usr/java/jamvm
# export PATH=/usr/java/jamvm/bin
# export CLASS_PATH=/usr/java/classpath

#/usr/java/jamvm/bin/jamvm -jar jlpt.jar
Cannot create system class loader
Exception occured while printing exception (java/lang/NoClassDefFoundError)...
Original exception was java/lang/UnsatisfiedLinkError
#
Title: Java Environment
Post by: Meanie on February 08, 2006, 06:26:20 am
seems like you forgot to package the libraries. there are only .a and .la in the classpath lib directory, no .so  
Title: Java Environment
Post by: cortez on February 08, 2006, 09:04:42 am
Sorry, you're right. I will update the classpath package shortly
Title: Java Environment
Post by: cortez on February 08, 2006, 09:14:39 am
Classpath package is fixed and updated. Please download from first and second post. I use following exports:

Code: [Select]
# export PATH=$PATH:/usr/java/jamvm/bin
# export CLASSPATH=/usr/java/jamvm/share/jamvm/classes.zip:/usr/java/classpath/share/classpath/glibj.zip

Good luck!
Title: Java Environment
Post by: pgas on February 09, 2006, 03:00:25 am
mirrored:
http://mail.pdaxrom.org/contrib/cortez/ (http://mail.pdaxrom.org/contrib/cortez/)

(I've recreated the classpath package there)
Title: Java Environment
Post by: law on February 09, 2006, 04:33:07 pm
hi,

has anyone tested jedit with jamvm and classpath 0.20?
Title: Java Environment
Post by: Meanie on February 10, 2006, 04:51:37 am
Quote
hi,

has anyone tested jedit with jamvm and classpath 0.20?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114312\"][{POST_SNAPBACK}][/a][/div]

I had jedit 4.2 working on classpath 0.19 and jamvm 1.4.0
This new version is causing some ClassCastExceptions. I might need to recompile jedit and see whether that fixes it.
Title: Java Environment
Post by: law on February 10, 2006, 05:04:22 am
Quote
I had jedit 4.2 working on classpath 0.19 and jamvm 1.4.0
This new version is causing some ClassCastExceptions. I might need to recompile jedit and see whether that fixes it.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114369\"][{POST_SNAPBACK}][/a][/div]

i get an Killed error if i try to start jedit. perhabs you could post jedit if you have recompiled it.

thanks
Title: Java Environment
Post by: cortez on February 10, 2006, 07:44:20 am
The GNU Classpath release notes mentions:

"This release depends on gtk+ 2.4 for AWT support. But gtk+ 2.6 or
higher is recommended. Included, but not activated by default in this
release is a Graphics2D implementation based on the Cairo Graphics
framework (http://www.cairographics.org). Enabling this makes programs
like JFreeChart and JEdit start up on GNU Classpath based runtimes."


I guess we need a rebuild  
Title: Java Environment
Post by: cortez on February 13, 2006, 04:29:34 pm
I rebuild GNU classpath with Java2D/Cairo enabled. I also compiled jEdit version 4.3pre3 to see if it runs with current versions of JamVM and GNU Classpath.
jEdit can be run as follows:

Code: [Select]
jamvm -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D -jar jEdit.jarWell, the good news is that jEdit indeed starts, but is't like Mark Wielaard, one of the Classpath developers said a while ago:

Quote
I always make sure jedit at least starts up when we are doing a new
release. And with each release it does become more and more usable. You
can now actually open a document, edit a bit, search and replace, etc.
But there are certainly still a lot of drawing/refresh bugs. Also the
embedded beanshell used to not work properly, but this might now be
fixed.
It's a nice to see such a demanding Swing application almost works.
Title: Java Environment
Post by: stbrock on February 13, 2006, 05:26:00 pm
Can this jamvm be integrated with Firefox to run java viewing apps such as are used with GoToMyPC and LogMeIn (and a lot of other web java apps too)? Many network administrators (mine for instance!) are wary of opening up ports in their firewalls for RealVNC, etc, but allow these commercial services across the firewall. This would be a big enhancement of the Z for many of us. Given the potentially tricky configuration if this works at all, another of Meanie's cramfs packages with the configuration in place would be ideal -- if he or someone else has the time and inclination.
Title: Java Environment
Post by: Meanie on February 13, 2006, 07:35:46 pm
Quote
Can this jamvm be integrated with Firefox to run java viewing apps such as are used with GoToMyPC and LogMeIn (and a lot of other web java apps too)? Many network administrators (mine for instance!) are wary of opening up ports in their firewalls for RealVNC, etc, but allow these commercial services across the firewall. This would be a big enhancement of the Z for many of us. Given the potentially tricky configuration if this works at all, another of Meanie's cramfs packages with the configuration in place would be ideal -- if he or someone else has the time and inclination.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114702\"][{POST_SNAPBACK}][/a][/div]

this would be great but requires a java plugin to work with firefox. unfortunately, the source code for it does not seem to be available, however, the opera plugin may work so if it can be adapted to work with jamvm then there could be a slim possibility...
Title: Java Environment
Post by: adf on February 13, 2006, 07:37:09 pm
I'd love better java support in pdaxrom....  simple end user stuff that runs common apps , etc. Especiallly some sort of web browser java plugin thing... I hope this isn't getting too technical

However, if you want to do vnc ( I use tightvnc, but I doubt it matters much) through a firewall, it is pretty easy to forward the vnc ports  through an ssh tunnel.  ssh can tunnel anyplace, if you have a server on the outside and the ssh server daemon listening on the right port.  This way, you can tunnel out via ssh (on, say, port 80), use it to forward the vnc port and run your remote vnc on your local host.

There is plenty of documentation online  on ssh port forwarding.

my 3100 runs remote vnc over a  forwarded port using ssh and works very nicely.  I have a headless dual p3 700 running debian with a dyndns dynamic domain name always up and in my "DMZ" doing various server things. I just ssh in, start a vncserver, do the port forwarding line on my z, at a new prompt tell the vncviewer to look at  localhost:whatever-desktop-number-I'm-using-in-vnc
Betwwen ssh, tightvnc, and tricke--if I need it, I can be reasonably unobtrusive and generally not abuse the bandwidth more than web surfing.   In fact this is one way to surf securely and  manage p2p stuff remotely, etc

some instructions.  (http://pigtail.net/LRP/vnc/)
Title: Java Environment
Post by: stbrock on February 13, 2006, 09:36:53 pm
Thanks for the thought, but while tunneling through port 80 would work, this is not invisible, just encrypted. It would be strongly disapproved of in a lot of organizations, and the people who disapprove are usually the same people who decide on your requests for new hardware and software. Some would be inclined to assign you a typewriter and a TI calculator and give your computer to someone less creative.

What I do now is connect with vncviewer or rdesktop to one of my home computers where I control the router and then connect from there using LogMeIn to work. In fact I usually have VMware virtual machines running at both home and work configured to ease remote control from the Zaurus. Believe it or not, the response time isn't too much different through "five" machines from direct remote control connection speed. With Verizon's 3g network and the Motorola e815 bluetooth phone, I get DSL-ish speed from most any US metropolitan area and can work at my virtual office computer. Syncing doesn't matter much this way.

But it would still be easier and more reliable to set up, connect with the java plugin for the Z, and probably some faster too. Hopefully someday . . .
Title: Java Environment
Post by: adf on February 14, 2006, 01:12:48 pm
Quote
Thanks for the thought, but while tunneling through port 80 would work, this is not invisible, just encrypted. It would be strongly disapproved of in a lot of organizations, and the people who disapprove are usually the same people who decide on your requests for new hardware and software. Some would be inclined to assign you a typewriter and a TI calculator and give your computer to someone less creative.

What I do now is connect with vncviewer or rdesktop to one of my home computers where I control the router and then connect from there using LogMeIn to work. In fact I usually have VMware virtual machines running at both home and work configured to ease remote control from the Zaurus. Believe it or not, the response time isn't too much different through "five" machines from direct remote control connection speed. With Verizon's 3g network and the Motorola e815 bluetooth phone, I get DSL-ish speed from most any US metropolitan area and can work at my virtual office computer. Syncing doesn't matter much this way.

But it would still be easier and more reliable to set up, connect with the java plugin for the Z, and probably some faster too. Hopefully someday . . .
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114717\"][{POST_SNAPBACK}][/a][/div]
I try to compress the data, use it sparingly, and work over a high traffic port, but, point taken
Title: Java Environment
Post by: brice.beard on February 26, 2006, 03:55:20 pm
Quote
I rebuild GNU classpath with Java2D/Cairo enabled. I also compiled jEdit version 4.3pre3 to see if it runs with current versions of JamVM and GNU Classpath.
jEdit can be run as follows:

Code: [Select]
jamvm -Dgnu.java.awt.peer.gtk.Graphics=Graphics2D -jar jEdit.jarWell, the good news is that jEdit indeed starts, but is't like Mark Wielaard, one of the Classpath developers said a while ago:

Quote
I always make sure jedit at least starts up when we are doing a new
release. And with each release it does become more and more usable. You
can now actually open a document, edit a bit, search and replace, etc.
But there are certainly still a lot of drawing/refresh bugs. Also the
embedded beanshell used to not work properly, but this might now be
fixed.
It's a nice to see such a demanding Swing application almost works.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=114690\"][{POST_SNAPBACK}][/a][/div]

Can someone help ?
I installed jamvm and classpah on /hdd4/usr/java but when I try to run something I get:

bootclasspath is empty !

If I use -Xbootclasspath with classes.zip and glib.zip, I get

Cannot create syste class loader.

Does jamvm expect an install in /usr/java ? How can I link it ?

thanks

brice