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 03 Sep 2014, 03:46
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Java
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 4 [52 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
Monsie


Joined: 01 Dec 2011
Posts: 633
Location: Kamloops BC Canada

PostPosted: Sun 10 Feb 2013, 03:51    Post subject: Java  

Hi jpeps,

Well, I did some more testing... I downloaded MyLibrary.jar and started playing with that, when it dawned on me that I had been tweaking the wrong script file for Java applications...Embarassed I had been editing the application_x-jar script, when I should have been looking at the application_x-java-archive script. So, once I got that sorted out, I tested the tweak on your app and achieved a 41.5% reduction in memory usage with the minimum adjustment @ -Xmx2m Very Happy

Then I tested my old, but favorite Java application. Unfortunately the tweak did not work... even at minimum setting. It was kind of weird in that the program would open, but all I got was the window, frame, a couple of buttons, but the rest of the interface was missing. I checked the MANIFEST file, and it turns out that it was created with Java-1.5. and not Java 1.4 like I thought originally. So then... I tested another Java app which did turn out to be version 1.4 and it worked with the tweak... --go figure.

At the very least, I now know that the tweak does not depend on a particular version of Java.... more likely it has to do with the quality of the code.

Monsie

_________________
My username is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 10 Feb 2013, 04:33    Post subject: Re: Java  

Monsie wrote:

At the very least, I now know that the tweak does not depend on a particular version of Java.... more likely it has to do with the quality of the code.

Monsie


I'm guessing that the app required more cache than you were allowing it.
Back to top
View user's profile Send private message 
Monsie


Joined: 01 Dec 2011
Posts: 633
Location: Kamloops BC Canada

PostPosted: Sun 10 Feb 2013, 16:19    Post subject: Re: Java  

jpeps wrote:
Monsie wrote:

At the very least, I now know that the tweak does not depend on a particular version of Java.... more likely it has to do with the quality of the code.

Monsie


I'm guessing that the app required more cache than you were allowing it.


Yes, well I did try several adjustments in 1 mb increments, but each time I got the same result.

For the record, the Java program I am talking about is Character Map which I find very useful in Puppy at times. You can download it at: http://www.psc-consulting.ca/fenske/

Monsie

_________________
My username is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 10 Feb 2013, 18:03    Post subject: Re: Java  

Monsie wrote:
[

Yes, well I did try several adjustments in 1 mb increments, but each time I got the same result.

For the record, the Java program I am talking about is Character Map which I find very useful in Puppy at times. You can download it at: http://www.psc-consulting.ca/fenske/

Monsie


CharMap ran with a 15M tweak at 140M, and at 379M without. I'm not sure why it's not working on your Wary distro. Did you run it from the terminal to see if anything else is going on?

There's another app, Acento, that does something similar:
http://java-apps.org/
Back to top
View user's profile Send private message 
Monsie


Joined: 01 Dec 2011
Posts: 633
Location: Kamloops BC Canada

PostPosted: Sun 10 Feb 2013, 18:40    Post subject: Re: Java  

jpeps wrote:
Monsie wrote:
[

Yes, well I did try several adjustments in 1 mb increments, but each time I got the same result.

For the record, the Java program I am talking about is Character Map which I find very useful in Puppy at times. You can download it at: http://www.psc-consulting.ca/fenske/

Monsie


CharMap ran with a 15M tweak at 140M, and at 379M without. I'm not sure why it's not working on your Wary distro. Did you run it from the terminal to see if anything else is going on?

There's another app, Acento, that does something similar:
http://java-apps.org/


It worked! First, I tried the 15M tweak, and found that it opened properly... but that it was still using the same amount of memory as if no adjustment had been made. Then I bumped it to 16M and saw a drop of 81 mb Cool Wow... thanks for all of your help. Smile

PS It would be interesting and useful to know the parameters of the tweak... so as to have an idea as to which values to try first. This way, one might not give up too quickly, as I did after having tried 2m - 8m values initially.

Monsie

_________________
My username is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sun 10 Feb 2013, 19:02    Post subject: Re: Java  

Monsie wrote:


PS It would be interesting and useful to know the parameters of the tweak... so as to have an idea as to which values to try first. This way, one might not give up too quickly, as I did after having tried 2m - 8m values initially.

Monsie


I set mine by default in ROX at 20m. I'd rather have a little extra cache in case it's needed...less isn't always better unless you're running a very old, RAM starved computer.
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Fri 01 Mar 2013, 19:39    Post subject:  

Attached is a great little java vnc viewer by hexabit. I had trouble accessing his site so I'll post it here.

BTW, modded the grabber script to get jre-1.7 update 15 and made an sfs beautifully, uploaded to pet_packages-slacko14 at your favourite puppy mirror.
jvnc-1.3.9.pet
Description  be sure to have your vnc server configured!
pet

 Download 
Filename  jvnc-1.3.9.pet 
Filesize  160.44 KB 
Downloaded  201 Time(s) 
capture17447.jpg
 Description   
 Filesize   37.49 KB
 Viewed   551 Time(s)

capture17447.jpg


_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Fri 01 Mar 2013, 20:47    Post subject:  

01micko wrote:
Attached is a great little java vnc viewer by hexabit. I had trouble accessing his site so I'll post it here.


Very nice! I use VNC, so could test it out. One addition..change line 18 of the viewer to:

Code:

java -Xmx20m -jar VncViewer.jar HOST $host PORT $port


Saves me 235M.

edit: scratch that idea; I needed the extra memory for most connections
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Wed 06 Mar 2013, 03:27    Post subject:  

Here's a small java app I wrote for zeroing out files. Run from the console as:

Code:

     zero [file]


or put /usr/local/bin/zero on the desktop and simply drag the file onto it.

note: zeroing out files means overwriting all the characters with zeros so they can't be retrieved.

updated: load from current directory without path
zero-1.1.pet
Description 
pet

 Download 
Filename  zero-1.1.pet 
Filesize  2.16 KB 
Downloaded  174 Time(s) 
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Sat 16 Mar 2013, 01:58    Post subject:  

Here's an interesting little Webpage Saver. Enter URL as an argument.

edit: Made it even smaller.
WebSave.jar.tar.gz
Description 
gz

 Download 
Filename  WebSave.jar.tar.gz 
Filesize  10.22 KB 
Downloaded  180 Time(s) 
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Thu 21 Mar 2013, 19:07    Post subject: SQL Database Demo  

MyLibrary-sql is an sql database demo that runs from the command line with a "books" puppy front end. I created a MyLibrary database with add, delete, print, and query functions, but once set up on Eclipse it takes only minutes to create whatever database and options that are desired, and runs on everything.

Usage should be clear in the png, and can be accessed by typing "books."
The query takes an author's name and returns the books/publishers.
When deleting a book with an apostrophe, it's necessary to escape with an additional apostrophe:

books -d "Eden''s Ladder"

updated: Author query works with first or last name only. (copy or rename your database before updating).



www.jpeters.net/apps/MyLibrary-sql-1.5.pet
MyLibrary-sql.png
 Description   
 Filesize   17.7 KB
 Viewed   391 Time(s)

MyLibrary-sql.png


Last edited by jpeps on Tue 26 Mar 2013, 02:09; edited 3 times in total
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Mon 25 Mar 2013, 20:25    Post subject:  

Updated JRE build script to version 1.7.0_17

http://murga-linux.com/puppy/viewtopic.php?p=682060#682060


Updated sql database.
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Thu 28 Mar 2013, 04:06    Post subject:  

Here's a small color finder utility I built using slider bars to change values.
ColorFinderJar.tar.gz
Description 
gz

 Download 
Filename  ColorFinderJar.tar.gz 
Filesize  3.43 KB 
Downloaded  163 Time(s) 
ColorFinder.png
 Description   
 Filesize   5.21 KB
 Viewed   302 Time(s)

ColorFinder.png

Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7797
Location: qld

PostPosted: Fri 29 Mar 2013, 18:01    Post subject:  

jpeps wrote:
Updated JRE build script to version 1.7.0_17

http://murga-linux.com/puppy/viewtopic.php?p=682060#682060


Updated sql database.


Just one thing... when building I get..
Code:
Number of uids 2
   root (0)
   unknown (500)
Number of gids 2
   root (0)
   users (500)
..note gids, uids
Code:
echo "fixing ownership"
chown -R root:root ${jre}


Didn't try yet but should be ok. (yep, works, strange things can happen when strange users/groups are on the system)

Really, Oracle should know better. Don't reckon that sort of issue would have happened when Sun was around. Rolling Eyes

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
jpeps

Joined: 31 May 2008
Posts: 3220

PostPosted: Fri 29 Mar 2013, 21:51    Post subject:  

01micko wrote:


Just one thing... when building I get..
Code:
Number of uids 2
   root (0)
   unknown (500)
Number of gids 2
   root (0)
   users (500)
..note gids, uids


I think that's just part of the filesytem report from mksquash (eg, your id #'s). The script has to be run with root permissions.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 4 [52 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
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.0960s ][ Queries: 13 (0.0088s) ][ GZIP on ]