Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - rrashkin

Pages: [1]
1
Personal Java/Jeode/J2ME Personal Profile / Garden Planner
« on: April 07, 2005, 10:00:32 am »
I planted some seeds and promptly forgot what I had planted where.  That got me thinking it would be good to have a program on the Z (I have a 5500) that would allow me to plan and/or record what I had planted, keep for next year, etc.  I know, I can just use a piece of paper.  But I wrote the app anyway.

It's organized by "beds" starting at bed-0.  
To add or change a plant, choose a plant number or "new". Tap the screen to get the coordinates in the proper fields.  Choose "AddPlant" to get the new/updated plant into memory.  Choose "save" to save the array to grdn.csv.  Choose "refresh" to redraw the bed.

I can't seem to attach it so I'll send it out to anyone who's interested.

2
Personal Java/Jeode/J2ME Personal Profile / Java App Launcher
« on: September 16, 2004, 10:56:44 am »
Greeting all.
This may not be interesting to anyone else but I like it:
I have several Java apps that I wrote for various reasons.  I really find the whole IPK thing a major hassle as these are really just for me.  I was content for a while to run my apps from the console (I wrote a bash script to list my classes and give me a choice) but it ocurred to me that it would be good to have a "launcher app" that I could put on the desktop that would read a text file (zlnch.txt) of otherwise stand-alone apps and luanch them.  That way, any new app I write, I just copy the classes off to my CF card and edit the text file and I'm done.  The apps need to have a argument-less constructor and basically do nothing in "main" but call the constructor.

So, anyway, if anyone is interested:
Code: [Select]
import java.awt.*;
import java.awt.event.*;
import java.io.*;

class jlnch extends Frame  {
//    class data
static TextField appnm;
static String rs;
static Choice apln=new Choice();
//    main method
    public static void main(String args[]) throws IOException {
    //Initilaize
    apln.add("");
        BufferedReader iniFile = new BufferedReader(new FileReader("zlnch.txt"));
        while ((rs =iniFile.readLine()) != null) {apln.add(rs);}
        apln.addItemListener(new ItemListener(){
             public void itemStateChanged(ItemEvent e)  {
                    String ct = apln.getSelectedItem();
                    try {
                            Class cls = Class.forName(ct);
                            cls.newInstance();
                    }
                    catch (ClassNotFoundException e2) { }
                    catch (IllegalAccessException e3) { }
                    catch (InstantiationException e4) { }
             }
        });
     //call constructor
         jlnch jl1 = new jlnch();
    }
//   constructor method
      public jlnch() {
  setTitle("app launcher");
  addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent e) {
    System.exit(0);
      }
  });
          ScrollPane sp = new ScrollPane();
          Panel p0 = new Panel();
          p0.setLayout(new GridLayout(1,0));
          p0.add(apln);
          //
          sp.add(p0);
          sp.setSize(200,40);
          add("Center", sp);
      pack();
  show();
      }
}

3
Software / "installing" an application without installing
« on: June 17, 2004, 12:08:31 pm »
Greeting.
I wrote a Java application that I can run just fine from the console (QKonsole) by using \"evm dandc\" (dandc is the classname).  I thought, just for fun, I\'d try to set up an icon so I can launch it without the console.

1. I copied \"qkonsole.desktop\" from /home/QtPalmtop/apps/Applications to the Documents area on my CF card, and called it \"dandc.desktop\".
2. I created a bash script called \"dandc.sh\" in /mnt/card/QtPalmtop/java, where the class resides.  That script contains 2 lines:
cd /mnt/card/Qtpalmtop/java
evm dandc
3. I downloaded an icon (in .png format) to /mnt/card/Documents/Image_files
4. I edited dandc.desktop to show:
    -   run=/mnt/card/QtPalmtop/java/dandc.sh
    -   icon=/mnt/card/Documents/Image_files/jedit.png
    -   name=dandc
5. I copied dandc.desktop back to /home/QtPalmtop/apps/Applications (changed the permissions to 644 like all the other .desktops there).

I was expecting \"dandc\" to now show up in the \"Tab Settings\" selection, but it didn\'t.  I realize that I changed a lot of things at once but even so, can someone tell me what I\'m doing wrong, or, how to do it right?

4
Software / executing (say) jSolun from command line
« on: May 25, 2004, 10:59:01 am »
Greeting.
I\'m having trouble executing a Java app I downloaded from the Software Index.  For reasons that seem ok to me, I didn\'t want to \"install\" it but just put the .jar file on my system and execute it manually.  First of all, the site claims that it works on the Z.  Second of all, I can execute it on my PC just fine (the syntax for \"java\" is a little different from \"evm\").
I put the downloaded jar file, jSolun100c.jar, on my SD card, under QtPalmtop/java.  If I look at the jar file on the PC (jar tf jSolun100c.jar), it appears that the \"main\" class is \"JSolun\".  

Then I type in at the console:
cd /mnt/card/QtPalmtop/java

then:
evm -cp /mnt/card/QtPalmtop/java/jSolun100c.jar JSolun

I get what I gather from posts here is a classic: \"java.lang.NoClassDefFoundError: JSolun\"

Any ideas what I\'m doing wrong

5
5x00 General discussions / installing new battery - weird behavior?
« on: March 22, 2004, 10:09:14 am »
Greeting.
After a couple of years, it was time to buy a new battery, which I did.  When it came, I followed the instructions which were:
1  plug the Z into the AC adapter charger
2  flip the \"replace battery/normal ops\" switch
3  remove the battery cover; remove the battery
4  remove the old battery; insert new battery; replace cover
5  flip the switch back to \"normal ops\"

When I did all that, the amber light was flashing - not a good sign
I did it all again, putting the old (still serviceable) battery back in.
Horrors! The amber light was still flashing.  According to the manual (I know, who reads the manual?) that means the battery is no good.  I could see the new one being defective but the old one?
I put the new one in - still flashing.
Then, on a whim, I unplugged the adapter from the Z and plugged it back in.  Voila!  Now the charging light was on as normal charging.

Is this the expected behavior?

6
Greeting.
I have an SL5500 with Sharp ROM 3.1.  I use embeddedkonsole (just because I haven\'t needed to use anything else).  Is there a way to change the list of \"useful\" commands in the pull-down menu?

7
Software / jcompiler for embeddix
« on: February 19, 2004, 03:53:48 pm »
I saw this (jCompiler for embeddix) on the Sharp site.  It\'s a ?KLAWA? product for US$20.  Does anyone know if it\'s any good?

8
Accessories / targus keyboard mapping
« on: February 12, 2004, 10:18:42 am »
Sorry if this is already posted somewhere.  I couldn\'t find it.  I just got a Targus keyboard.  Does anyone have any instructions for mapping the keyboard?  I would like to have a \"page down\", \"page up\", \"menu bar\" access.  Also, can\'t seem to work the \"Fn\" key; it always switches to appmenu.

9
Site Suggestions, Requests, and Updates / signature attachment
« on: February 10, 2004, 01:44:15 pm »
I\'m sure this is a silly question, or at least one that has a simple answer:
I can\'t get my signature to show up on posts.  I specified a signature (with and without HTML tags) on My Account but it doesn\'t show up in posts.  Can someone (who has successfully manufactured a signature) post the fool-proof steps?

10
Software / making a script launchable
« on: December 15, 2003, 03:44:20 pm »
I have some Java apps that I have been perfectly happy launching manually from a terminal (I don\'t need to clutter up my apps tab with only seldom used icons).  I wrote a script in /home/zaurus to make them easier to get to.  Essentially I use bash \"select\" to choose either SD or CF (I have apps on both), \"cd\" to the right .../java/ directory and source another bash script to choose among the classes there.  As I said, I was happy to do it that way until I read the following in the HowTo section of this forum:

Quote
The more flexible way
To make it so that you can tap a script in the Document/Files tab and it will launch in the terminal, follow the instructions below:  

1) Install the latest version of Embedded Konsole
2) Edit the file /home/QtPalmtop/etc/mime.types and if it does not have an entry for \"application/x-sh\" then add the following line  

 application/x-sh      sh

3) Edit the Embedded Konsole desktop icon file, which is usually /home/QtPalmtop/apps/Applications/embeddedkonsole.desktop, and add the following lines:  

 MimeType = application/x-sh
 MimeTypeIcons = konsole/Terminal

4) Restart Qtopia
5) Create a shell script anywhere where it will be visible on the Documents/Files tab, give the it the filename extension \'.sh\', and make sure it is executable with the command:  

 chmod a+x myscript.sh

Then when you tap the script file in the Documents/Files tab it will launch within the Konsole application. It is important that you give the script file a \'.sh\' filename extension as that is how it is associated with the Mime Type application/x-sh and that in turn is associated with the Embedded Konsole application.

I thought that sounded like it would be worth a try.  Now I can \"launch\" my script from the file menu but it just brings up the terminal; it does not run my script (i.e., give me the menu).  Just in case it matters, this is the script, javapps.sh (it runs fine from the terminal if I type \". javapps.sh\")
Code: [Select]
. chprmpt

select dir in cf card;

do

cd /mnt/$dir/QtPalmtop/java

break;

done

. appmenu.sh


Any hints what I\'m doing wrong?

Pages: [1]