Java
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... 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
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
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... 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
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 [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Re: Java
I'm guessing that the app required more cache than you were allowing it.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
Re: Java
Yes, well I did try several adjustments in 1 mb increments, but each time I got the same result.jpeps wrote:I'm guessing that the app required more cache than you were allowing it.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
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 [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Re: Java
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?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
There's another app, Acento, that does something similar:
http://java-apps.org/
Re: Java
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 Wow... thanks for all of your help.jpeps wrote: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?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
There's another app, Acento, that does something similar:
http://java-apps.org/
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 [u]username[/u] is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Re: Java
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.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
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.
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.
- Attachments
-
- jvnc-1.3.9.pet
- be sure to have your vnc server configured!
- (160.44 KiB) Downloaded 487 times
-
- capture17447.jpg
- (37.49 KiB) Downloaded 763 times
Puppy Linux Blog - contact me for access
Very nice! I use VNC, so could test it out. One addition..change line 18 of the viewer to:01micko wrote:Attached is a great little java vnc viewer by hexabit. I had trouble accessing his site so I'll post it here.
Code: Select all
java -Xmx20m -jar VncViewer.jar HOST $host PORT $port
edit: scratch that idea; I needed the extra memory for most connections
Here's a small java app I wrote for zeroing out files. Run from the console as:
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
Code: Select all
zero [file]
note: zeroing out files means overwriting all the characters with zeros so they can't be retrieved.
updated: load from current directory without path
- Attachments
-
- zero-1.1.pet
- (2.16 KiB) Downloaded 458 times
Here's an interesting little Webpage Saver. Enter URL as an argument.
edit: Made it even smaller.
edit: Made it even smaller.
- Attachments
-
- WebSave.jar.tar.gz
- (10.22 KiB) Downloaded 431 times
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).
http://www.jpeters.net/apps/MyLibrary-sql-1.5.pet
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).
http://www.jpeters.net/apps/MyLibrary-sql-1.5.pet
- Attachments
-
- MyLibrary-sql.png
- (17.7 KiB) Downloaded 620 times
Last edited by jpeps on Tue 26 Mar 2013, 06:09, edited 3 times in total.
Updated JRE build script to version 1.7.0_17
http://murga-linux.com/puppy/viewtopic. ... 060#682060
Updated sql database.
http://murga-linux.com/puppy/viewtopic. ... 060#682060
Updated sql database.
Here's a small color finder utility I built using slider bars to change values.
- Attachments
-
- ColorFinderJar.tar.gz
- (3.43 KiB) Downloaded 403 times
-
- ColorFinder.png
- (5.21 KiB) Downloaded 486 times
Just one thing... when building I get..jpeps wrote:Updated JRE build script to version 1.7.0_17
http://murga-linux.com/puppy/viewtopic. ... 060#682060
Updated sql database.
Code: Select all
Number of uids 2
root (0)
unknown (500)
Number of gids 2
root (0)
users (500)
Code: Select all
echo "fixing ownership"
chown -R root:root ${jre}
Really, Oracle should know better. Don't reckon that sort of issue would have happened when Sun was around.
Puppy Linux Blog - contact me for access
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.01micko wrote:
Just one thing... when building I get....note gids, uidsCode: Select all
Number of uids 2 root (0) unknown (500) Number of gids 2 root (0) users (500)
MyLibrary3 saves all data to a single (and small) xml file. This seems to be an economical way of creating a database ...with the advantage of being able to easily read (and edit) the file itself. I also included both author and title search buttons with "next" capability.
http://murga-linux.com/puppy/viewtopic. ... 898#673898
updated: smaller size
http://murga-linux.com/puppy/viewtopic. ... 898#673898
updated: smaller size
Another version of MyLibrary using serialized data, which takes it down to only 24K. Interestingly, you can still edit the MyLibrary.ser data file using a text editor (not geany). This puts a database app in the acceptable range for puppy.
- Attachments
-
- MyLibrary4.tar.gz
- MyLibrary4.jar
- (22.14 KiB) Downloaded 354 times
Updated MyLibrary4 to include File menu with a "Make Report" option. This produces a MyLibrary.txt file with all the books info; added mnemonics.
- Attachments
-
- MyLibrary4.png
- (12.55 KiB) Downloaded 584 times
Hi jpeps
I hope you don't mind but I soft coded your get jre script, with basic instructions in the comments. Added some basic error checks.
Working
..just some of my uni homework from the start of the course.
I hope you don't mind but I soft coded your get jre script, with basic instructions in the comments. Added some basic error checks.
Code: Select all
#!/bin/sh
# http://javadl.sun.com/webapps/download/AutoDL?BundleId=78695 (example: for 1.7-u25)
# go to http://java.com/en/download/linux_manual.jsp?locale=en to find url similar to above
# get java tar.gz link to get the end number, 5 digits
# run with (example: name the script "get_jre")
#----------------------------
# get_jre jre1.7.0_25 78695
#----------------------------
jre="$1" #name it with "jre1_________" fill in the blank # eg: jre1.7.0_17
NUMBER="$2" #NEEDED it's the number on the end of the url
temp="${jre}_001"
mkdir -p "/tmp/${temp}/usr/local/bin"
mkdir -p "/usr/local/${jre}/bin"
## GET PACKAGE
wget -O "/tmp/${jre}.tar.gz" http://javadl.sun.com/webapps/download/AutoDL?BundleId=${NUMBER}
[ $? != 0 ] && echo error && exit
## UNPACK AND MOVE TO NEW FOLDER
cd /tmp
tar -xvzf "/tmp/${jre}.tar.gz"
[ $? != 0 ] && echo error && exit
mv "${jre}" "${temp}/usr/local"
## COPY JAVA FILES FOR LINKING
cd "${temp}/usr/local"
cp "${jre}/bin/java" "/usr/local/${jre}/bin"
cd "/tmp/${temp}/usr/local/bin"
ln -sf "/usr/local/${jre}/bin/java" .
## CHANGE NAME FOR SFS BUILD
cd /tmp
mv "${temp}" "${jre}"
dir2sfs "$jre"
## Change name and CLEAN UP
name="$(ls | grep jre*sfs | grep -v "txt")"
mv "$name" ${jre}.sfs
rm -r "/usr/local/${jre}"
rm -r "/tmp/${jre}"
rm "/tmp/${jre}.tar.gz"
rm /tmp/jre*txt
echo "${jre}.sfs is in /tmp"
Code: Select all
java -jar addstuff.jar
Enter your name
Name : Mick
Enter your age
Age : 150
Seriously Mick? You're either lying to me or you're a freakin' vampire!
- Attachments
-
- addstuff.zip
- java archive, the homework i did, simple stuff
- (1.7 KiB) Downloaded 293 times
Puppy Linux Blog - contact me for access