Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Wed 02 Sep 2015, 06:31
All times are UTC - 4
 Forum index » Taking the Puppy out for a walk » Announcements
Java for puppy ?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [42 Posts]   Goto page: 1, 2, 3 Next
Author Message
JohnMurga
Site Admin


Joined: 04 May 2005
Posts: 598
Location: Far to the east

PostPosted: Fri 23 Sep 2005, 14:15    Post subject:  Java for puppy ?  

Hey

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

http://www.murga.org/~puppy/viewtopic.php?t=1844&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" Wink
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
Back to top
View user's profile Send private message Visit poster's website 
edoc


Joined: 07 Aug 2005
Posts: 4634
Location: Southeast Georgia, USA

PostPosted: Fri 23 Sep 2005, 14:41    Post subject: Re: Java for puppy ?  

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

_________________
Thanks! David
Home page: http://nevils-station.com
Don't google Search! http://duckduckgo.com
Puppy Carolina 1.3 & Lighthouse64-b602 & JL64-603
Back to top
View user's profile Send private message Visit poster's website 
JohnMurga
Site Admin


Joined: 04 May 2005
Posts: 598
Location: Far to the east

PostPosted: Fri 23 Sep 2005, 16:15    Post subject: Re: Java for puppy ?  

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
tomcat.PNG
 Description   
 Filesize   67.96 KB
 Viewed   6345 Time(s)

tomcat.PNG

Back to top
View user's profile Send private message Visit poster's website 
raffy

Joined: 25 May 2005
Posts: 4827
Location: Manila

PostPosted: Fri 23 Sep 2005, 17:50    Post subject: Client Only  

For a client (user) only install, are all the files needed?

(Pardon the Java newbie question Smile )
Back to top
View user's profile Send private message 
JohnMurga
Site Admin


Joined: 04 May 2005
Posts: 598
Location: Far to the east

PostPosted: Fri 23 Sep 2005, 18:11    Post subject: Re: Client Only  

raffy wrote:
For a client (user) only install, are all the files needed?

(Pardon the Java newbie question Smile )

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
Back to top
View user's profile Send private message Visit poster's website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Fri 23 Sep 2005, 20:07    Post subject:  

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
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?
Back to top
View user's profile Send private message Visit poster's website 
JohnMurga
Site Admin


Joined: 04 May 2005
Posts: 598
Location: Far to the east

PostPosted: Fri 23 Sep 2005, 20:36    Post subject:  

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
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
Back to top
View user's profile Send private message Visit poster's website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Fri 23 Sep 2005, 23:07    Post subject:  

Yes, I read about the plugin, but Opera does not use the plug-in, It uses the JRE.

http://www.opera.com/support/search/supsearch.dml?index=459
Back to top
View user's profile Send private message Visit poster's website 
JohnMurga
Site Admin


Joined: 04 May 2005
Posts: 598
Location: Far to the east

PostPosted: Fri 23 Sep 2005, 23:29    Post subject:  

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/supsearch.dml?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
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15154
Location: Paradox Realm

PostPosted: Sat 24 Sep 2005, 11:56    Post subject:  

I downloaded the
JamJikesCairo.tar.gz and stuck it in the / (top directory)
and untared - as you suggest Smile - many thanks

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

Code:

class myfirstjavaprog

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


but managed to get the following error message

Quote:
*** 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 . . .

Smile

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Sat 24 Sep 2005, 12:47    Post subject:  

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.
Back to top
View user's profile Send private message Visit poster's website 
PeterSieg

Joined: 04 May 2005
Posts: 361
Location: Germany, 37603

PostPosted: Mon 26 Sep 2005, 06:21    Post subject: Java runs, but can not compile..?  

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 Smile
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:
Quote:
*** 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

_________________
Have fun Smile
Back to top
View user's profile Send private message Visit poster's website 
PeterSieg

Joined: 04 May 2005
Posts: 361
Location: Germany, 37603

PostPosted: Mon 26 Sep 2005, 07:41    Post subject: Java runs in 196MB memory...  

Just reduced to 196MB in qemu and java still runs.. so don't need 256MB Smile

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

_________________
Have fun Smile
Back to top
View user's profile Send private message Visit poster's website 
PeterSieg

Joined: 04 May 2005
Posts: 361
Location: Germany, 37603

PostPosted: Mon 26 Sep 2005, 08:16    Post subject: Greetings from vmware...  

Writing this from inside vmware Puppy 1.0.5rc using just 160MB simulated ram and java
still runs fine Smile 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

_________________
Have fun Smile
Back to top
View user's profile Send private message Visit poster's website 
JohnMurga
Site Admin


Joined: 04 May 2005
Posts: 598
Location: Far to the east

PostPosted: Mon 26 Sep 2005, 14:49    Post subject:  

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
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 3 [42 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Taking the Puppy out for a walk » Announcements
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1055s ][ Queries: 12 (0.0154s) ][ GZIP on ]