Page 1 of 3

Java for puppy ?

Posted: Fri 23 Sep 2005, 18:15
by JohnMurga
Hey

Here is a snapshot of a Java development environment for Puppy.

http://www.murga.org/~puppy/viewtopic.p ... 4&start=45

It contains the following :
  • Cairo (for enabling some of the advanced 2D features in Swing)
    Jikes (as a replacement for the Java compiler/JDK)
    GNU classpath (the Java run-time libraries)
    JamVM (a fairly slow but TINY Java VM).
    java (a java laucher script I wrote that launches JamVM using Cairo
I have to admit that having been involved with ClassPath in the past I was very skeptical, but having managed to run and use Tomcat and Eclipse without any problems and JEdit 4.2 (a very SWING intensive app) with a fewer issues than I was expecting I was impressed.

JanVM is a little slow, but can't be beaten for size ... When SableVM gets updated I may re-create this package with that and see how they compare.

What does this mean for you ?

This means that you should be able to run many Java programs in Puppy and develop while avoiding the Java Trap (http://www.gnu.org/philosophy/java-trap.html).

The snapshot can be found at :

http://www.murga.org/_puppy/JamJikesCairo.tar.gz

To install just "cd /" and then "tar -zxvf JamJikesCairo.tar.gz".

To run just type "java" ;-)
To compile use "jikes" ...

Things like Tomcat and Ant require some configuration to use Jikes as the default compiler... ALL components have been built from scratch, and I believe I can shave maybe about a 1Mb off the current package size (6Mb).

Enjoy

Cheers
JohnM

Re: Java for puppy ?

Posted: Fri 23 Sep 2005, 18:41
by edoc
JohnMurga wrote:Here is a snapshot of a Java development environment for Puppy.
Has this been tested in 1.0.5rc or 1.0.4 or both, please?

Thanks! doc

Re: Java for puppy ?

Posted: Fri 23 Sep 2005, 20:15
by JohnMurga
edoc wrote:
JohnMurga wrote:Here is a snapshot of a Java development environment for Puppy.
Has this been tested in 1.0.5rc or 1.0.4 or both, please?

Thanks! doc
Both ... Screen in original topic is from 1.0.5 but this on is is from 1.0.4.

Additionally, if you want to run Tomcat 5.5 out-of-the-box just :
  • mkdir /usr/local/classpath/bin
    cp /usr/local/bin/java /usr/local/classpath/bin
    export JAVA_HOME=/usr/local/classpath
    Then untar the Tomcat5.5 package and the Tomcat5.5-compat to the same dir.
    Go to the tomcat bin directory and type "./catalina.sh start"
    Et voila!
All the examples I tried (including the JSP2 ones), worked without a hitch.

Cheers
JohnM

Client Only

Posted: Fri 23 Sep 2005, 21:50
by raffy
For a client (user) only install, are all the files needed?

(Pardon the Java newbie question :) )

Re: Client Only

Posted: Fri 23 Sep 2005, 22:11
by JohnMurga
raffy wrote:For a client (user) only install, are all the files needed?

(Pardon the Java newbie question :) )
Jikes is the only thing you don't really need unless you are compiling, but it is pretty small, so it is work including to make the package complete.

Cheers
JohnM

Posted: Sat 24 Sep 2005, 00:07
by rarsa
Hi John,

Thanks for the puppyfied java package.

I'm trying to configure Opera to use the jamjikescairo version that you posted.

The problem is that Opera is expecting a folder containing .. and I quote
The path you are looking for is the directory of your Java installation containing the files libjava.so and libawt.so.
Your package does not include those files, should I create a symlink to somewhere?

Posted: Sat 24 Sep 2005, 00:36
by JohnMurga
rarsa wrote:Hi John,

Thanks for the puppyfied java package.

I'm trying to configure Opera to use the jamjikescairo version that you posted.

The problem is that Opera is expecting a folder containing .. and I quote
The path you are looking for is the directory of your Java installation containing the files libjava.so and libawt.so.
Your package does not include those files, should I create a symlink to somewhere?
As I mentioned in the thread above, I believe that the only ClassPath driven VM to offer a Java plug-in is GCJ.

JanVM will allow you to run the applet viewer but won't work as a plugin.

Sorry.

Cheers
JohnM

Posted: Sat 24 Sep 2005, 03:07
by rarsa
Yes, I read about the plugin, but Opera does not use the plug-in, It uses the JRE.

http://www.opera.com/support/search/sup ... ?index=459

Posted: Sat 24 Sep 2005, 03:29
by JohnMurga
rarsa wrote:Yes, I read about the plugin, but Opera does not use the plug-in, It uses the JRE.

http://www.opera.com/support/search/sup ... ?index=459
My apollogies ... I didn't know that ...

Interesting that works with the IBM JDK too.

I'll have to look into this.

Cheers
JohnM

Posted: Sat 24 Sep 2005, 15:56
by Lobster
I downloaded the
JamJikesCairo.tar.gz and stuck it in the / (top directory)
and untared - as you suggest :) - many thanks

. . .then I used jikes hello.java to compile a text file

Code: Select all

class myfirstjavaprog
{  
        public static void main(String args[])
        {
           System.out.println("Hello World!");
        }
}
but managed to get the following error message
*** Semantic Error: You need to modify your classpath, sourcepath,
bootclasspath, and/or extdirs setup. Jikes could not find package "java.lang" in:
I am not really sure what that means . . .
Is there any hope for me?

How exciting - compiling a tiny java in tiny Puppy . . . well trying to . . .

:)

Posted: Sat 24 Sep 2005, 16:47
by rarsa
You need to either set the CLASS_PATH environment variable or pass the -cp parameter to the compiler

Class path should poing to the class libraries required by your application.

Java runs, but can not compile..?

Posted: Mon 26 Sep 2005, 10:21
by PeterSieg
Hi John. First MANY thanks for the java you put together!!!

I grapped some old java app from me and gave them a test run.
The java apps were compiled using windows jdk 1.0.2 - so VERY old :)
But they do run! within Puppy 1.0.5rc and usr_devx.sfs (needed?)!! Great!
I think, they will not run with just 128MB Ram (got an error message in qemu... vm out of memory - increased memory to 256 = ok).

However, I tried also to compile my simple java apps with jikes:
*** Semantic Error: You need to modify your classpath, sourcepath,
bootclasspath, and/or extdirs setup. Jikes could not find package "java.lang" in:
I tried to give various -cp / -classpath or -bootclasspath like:
-bootclasspath /usr/local/classpath
-bootclasspath /usr/local/classpath/
-bootclasspath /usr/local/classpath/lib/classpath
-bootclasspath /usr/local/classpath/lib/classpath/

nothing worked..? Could you please help here..?
What do I have to set to make compiling java apps working?

Many thanks!

Peter Sieg

Java runs in 196MB memory...

Posted: Mon 26 Sep 2005, 11:41
by PeterSieg
Just reduced to 196MB in qemu and java still runs.. so don't need 256MB :)

I tried again jikes with -cp '<path>' but still same error message..
I also copied my sample java app into:
/usr/local/classpath/lib/classpath
(where the libjavalang.so is found)
and issued:
#jikes <myapp>.java
in here, but still same error messages..?

PS

Greetings from vmware...

Posted: Mon 26 Sep 2005, 12:16
by PeterSieg
Writing this from inside vmware Puppy 1.0.5rc using just 160MB simulated ram and java
still runs fine :) Internet access through simulated NIC, using NAT and our company windows 2000 workstation (haha..)

I was also looking for an 'appletviewer' executable/link/script, but couldn't find one..?

PS

Posted: Mon 26 Sep 2005, 18:49
by JohnMurga
Sorry ... Been to Miami for the weekend ... <g>

I'll look into the jikes problems this evening, but it worked OK for me.

usr_devx.sfs is NOT needed.

Cheers
JohnM

Any news on the issues found..?

Posted: Wed 28 Sep 2005, 13:12
by PeterSieg
Any news on the issues found..?

Sorry, can't wait to get jikes+appletviewer going.. 8)

PS

Posted: Sun 02 Oct 2005, 20:18
by kamranzaidi
just wondering did someone installed eclipse (what version) on puppy, and jre being used for eclipse?

Any news on free Java for Puppy? Jikes problem?

Posted: Tue 18 Oct 2005, 08:23
by PeterSieg
Hi John. I assume you are busy with a new incarnation of a 50m opera+perl
puplet :lol: ..?

Any news on free Java for Puppy? Jikes problem?
I really would like to get compiling java apps in Puppy working...

Thanks, Peter

Re: Any news on free Java for Puppy? Jikes problem?

Posted: Fri 21 Oct 2005, 14:57
by JohnMurga
Hi,
PeterSieg wrote:Hi John. I assume you are busy with a new incarnation of a 50m opera+perl
puplet :lol: ..?

Any news on free Java for Puppy? Jikes problem?
I really would like to get compiling java apps in Puppy working...

Thanks, Peter
Yes, sorry ... I had surgery, it was supposed to be routine but there where slight complications so I have been completely out of action for a while.

Currently I am catching up on work ... But this is all on my list :-(

Liked your web-site BTW ;-)

Cheers
JohnM

Hope everything ist good now - take your time...

Posted: Fri 21 Oct 2005, 15:15
by PeterSieg
Hi John,

hope everything ist good now - take your time...
The health is one of the most important things!

PS