Basic questions about programing for J9 VM

I need to create a java application to run on a Pocket PC 2003 OS and I'm limited to using IBM's Websphere J9 Virtual Machine. I'm new to using java in this capacity and therefore have lots of questions which I'm guessing are pretty basic. Despite my best efforts, I've found very little to help me online. Below are a couple questions I have that I'm hoping someone can help me with. Even better, if you know of any resources that could help me with these and other questions, I'd love to have them. Thanks in advance.
1. I'm using standard AWT for the GUI but I'm having problems getting frames, dialogs, etc., to come up in anything less then full screen. setSize() and resize() have no effect, even if I extend the frame and override the setMinimumSize, setPreferredSize, setMaximumSize methods. What do I need to do to get a child window to appear in something less than full screen?
2. I'd like to be able to add menu's to the buttom toolbar (with the keyboard) but have no idea how I would add something to it. Can someone point me in the right direction?
3. When my application gets an iconified event I go ahead and call a System.exit() to exit the application. This doesn't kill the java VM though, which continues to run in the background (taking up plenty of memory). If I run my application using the J9w.exe so that it runs without the console, then not only does the VM continue to run, but I have no way to stop it (the running program list can't see it). Since each time I run my application it starts a new VM, it only takes a couple of times before I'm out of memory and have to do a soft reset of the PDA to make things right. Can I kill the VM when I kill my application?
4. I learn best by looking at example code, but have been unable to find any code people are running on J9. I have the GolfScoreTracker installed and running on my PDA, but the jar file contains only the classes. Since it's supposed to be a demo, I had hoped that the source code would be included, is that hoping too much or is the source code available somewhere? In addition, if you know of any applications out there with available source code that are known to run well on a PocketPC J9 environment I'd appreciate the link.

Hi there, I saw your questions, im currently developing a java pocket pc application as well and here's what i go so far:
AWT seem to be hard to use on pocket pc, instead i recommend that you use SWT, which is a technology developed by eclipse. It's already installed on the eclipse plugins, you just need to download the jar and dll files for the pocket pc. They are available at: http://www.eclipse.org/downloads/index.php
I assume that you already have the J9 working on your device. So you only need to copy the SWT.jar file and the swt-win32-3064.dll to the folder containing the .class files on your device.
Now, on your java IDE(im using eclipse) Add the SWT.jar library to your project which should be on C:/eclipse/plugins/org.eclipse.swt.win32_3.0.2/ws/win32/swt.jar or something like taht depending on your eclipse root.
Now you are ready to code some SWT, here is a sample program from Carolyn MacLeod, i modified a few things so it could run on the pocket pc but it's almost the same. Once you coded in eclipse run it, then copy the class file from your desktop to your device(There should be like 4 or 5 classes like sample.class, sample$1.class etc. copy all of them) where you put the jar and dll files(If program does not run you may try to rename the dll file for swt-win32-3050.dll instead of 3064.dll). Now after you have everything set up you need to create the lnk file in order to run the program. On your desktop create a new textfile and write the following on it:
255#"\Archivos de Programa\J9\PPRO10\bin\j9w.exe" "-jcl:PPRO10" "-cp" "\My
Documents\Java\swt.jar" ;\My Documents\Java" sample
Paths depend on your install, and the place where you put your classes and jar file. path for j9w is usually "\Program Files\J9\PPRO10\bin\j9w.exe", and the last word should be the classname.
Currently this form only displays an image on a canvas, click on the browse button and choose a pic and it will display on the canvas. Im trying to connect the form to an oracle database but no success yet on the device.
Hope it helps, if you have any questions about the code or something, and I know the answer, please feel free to ask.
See ya
import org.eclipse.swt.*;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.layout.*;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
public class sample {
static Shell shell;
static Display display;
static Text dogName;
static Text textdb;
static Combo dogBreed;
static Canvas dogPhoto;
static Image dogImage;
static List categories;
static Text ownerName;
static Text ownerPhone;
static String[] FILTER_EXTS = {"*.jpg"};
public static void main(String[] args) {
display = new Display();
shell = new Shell(display, SWT.RESIZE | SWT.CLOSE);
Menu menu = new Menu(shell, SWT.BAR);
shell.setText("Dog ShowS Entry");
shell.setMenuBar(menu);
GridLayout gridLayout = new GridLayout();
gridLayout.numColumns = 3;
shell.setLayout(gridLayout);
new Label(shell, SWT.NONE).setText("Dog's NameS:");
dogName = new Text(shell, SWT.SINGLE | SWT.BORDER);
GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gridData.horizontalSpan = 2;
gridData.widthHint = 60;
dogName.setLayoutData(gridData);
new Label(shell, SWT.NONE).setText("Breed:");
dogBreed = new Combo(shell, SWT.NONE);
dogBreed.setItems(new String [] {"Collie", "Pitbull", "Poodle", "Scottie"});
dogBreed.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
Label label = new Label(shell, SWT.NONE);
label.setText("Categories");
label.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_FILL));
new Label(shell, SWT.NONE).setText("Photo:");
dogPhoto = new Canvas(shell, SWT.BORDER);
gridData = new GridData(GridData.FILL_BOTH);
gridData.widthHint = 60;
gridData.verticalSpan = 3;
dogPhoto.setLayoutData(gridData);
dogPhoto.addPaintListener(new PaintListener() {
public void paintControl(final PaintEvent event) {
if (dogImage != null) {
event.gc.drawImage(dogImage, 0, 0);
categories = new List(shell, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL);
categories.setItems(new String [] {
"Best of Breed", "Prettiest Female", "Handsomest Male",
"Best Dressed", "Fluffiest Ears", "Most Colors",
"Best Performer", "Loudest Bark", "Best Behaved",
"Prettiest Eyes", "Most Hair", "Longest Tail",
"Cutest Trick"});
gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL);
gridData.widthHint = 60;
gridData.verticalSpan = 4;
int listHeight = categories.getItemHeight() * 12;
Rectangle trim = categories.computeTrim(0, 0, 0, listHeight);
gridData.heightHint = trim.height;
categories.setLayoutData(gridData);
Button browse = new Button(shell, SWT.PUSH);
browse.setText("BrowsePic");
gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
gridData.widthHint = 60;
browse.setLayoutData(gridData);
browse.addSelectionListener(new SelectionAdapter() {
     public void widgetSelected(SelectionEvent event) {
          FileDialog dialog = new FileDialog(shell, SWT.OPEN);
          dialog.setFilterExtensions(new String[] {"*.*"});
          String fileName = dialog.open();
if (fileName != null) {
dogImage = new Image(display, fileName);
shell.redraw();
Button delete = new Button(shell, SWT.PUSH);
delete.setText("No action");
gridData = new GridData(GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_BEGINNING);
gridData.widthHint = 60;
delete.setLayoutData(gridData);
delete.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
Button enter = new Button(shell, SWT.PUSH);
enter.setText("No action");
gridData = new GridData(GridData.HORIZONTAL_ALIGN_END);
gridData.horizontalSpan = 3;
enter.setLayoutData(gridData);
enter.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent event) {
     shell.open();
     while (!shell.isDisposed()) {
          if (!display.readAndDispatch())
               display.sleep();
     display.dispose();
if (dogImage != null) {
dogImage.dispose();
}

Similar Messages

  • Basic questions about Mapviewer for OBIEE 11G

    Hello All..
    I am pretty rookie in OBIEE and I have never worked with Mapviewer before.. I am going some POC right now in my environment and I want to experiment map reports in OBIEE.. My current OBIEE version is 11.1.1.6.5, Oracle DB version is 11.2.0.3.0 64 bit and OS is Linux 86-64 and I see that there are many versions of mapviwers to download from oracle website.
    I have read a few articles on Mapviewer integration with OBIEE, but I still have a few questions about using mapviewers at the very basic level:
    1. What versions do I download from Oracle website? I see there are many versions of mapviewers. Do I decide the version based on my OBIEE version or DB version?
    2. What files do I download from Oracle website? I see there is mapviewer zip files and mapbuilder zip files. Which one do I download and how does installation works?
    3. My OBIEE 11G and DB are running on linux environment, but in the Mapviewer download page, I don't see Oracle differentiating the OS environments. Does that mean Mapviewer is only either Unix/Linux or Windows? How do I determine in which environment I should install the files I downloaded?
    I know these are very basic questions, perhaps too basic to blog about, that's why I can't find them online..
    Please advise here..
    Thanks

    Hello All..
    I am pretty rookie in OBIEE and I have never worked with Mapviewer before.. I am going some POC right now in my environment and I want to experiment map reports in OBIEE.. My current OBIEE version is 11.1.1.6.5, Oracle DB version is 11.2.0.3.0 64 bit and OS is Linux 86-64 and I see that there are many versions of mapviwers to download from oracle website.
    I have read a few articles on Mapviewer integration with OBIEE, but I still have a few questions about using mapviewers at the very basic level:
    1. What versions do I download from Oracle website? I see there are many versions of mapviewers. Do I decide the version based on my OBIEE version or DB version?
    2. What files do I download from Oracle website? I see there is mapviewer zip files and mapbuilder zip files. Which one do I download and how does installation works?
    3. My OBIEE 11G and DB are running on linux environment, but in the Mapviewer download page, I don't see Oracle differentiating the OS environments. Does that mean Mapviewer is only either Unix/Linux or Windows? How do I determine in which environment I should install the files I downloaded?
    I know these are very basic questions, perhaps too basic to blog about, that's why I can't find them online..
    Please advise here..
    Thanks

  • Basic question about tracking for beginner

    Ok, heres the thing. I want to record multiple tracks at seperate times from the same mic in the same input, but when I go to record a second track and put that the input is track one, it will only let me record on all tracks that I have used this input for. Please help, Jeff

    Hi J,
    I believe is this what you need,
    You just record track 1 (see channel strip on left - I/O> input 1)
    when you choose track 2 (the I/O is on input 2) press and hold that button that says input 2 and change it to input 1!
    (tracks 3 , 5, & 7 must be on input 1 ither)
    best regards,
    Jorge

  • Basic question about importing wma files

    Hi, I have a basic question about importing wma files. I ripped some cd's on a Mindows computer using Media Player, but now want to copy them to my Mac and use them in iTunes on my Mac. when I use Import in iTunes, nothing happens and I cant even seem to copy them one by one using the Music folder.
    Can someone help me?
    thanks
    eMac   Mac OS X (10.4.4)  

    iTunes for Mac doesn't support .wma files.
    If you can use a PC to convert them, you can use one of many freeware applications. Google for 'wma to mp3'.
    For the Mac there's the shareware program EasyWMA that can convert them.
    Hope this helps.
    M
    17' iMac fp 800 MHz 768 MB RAM   Mac OS X (10.3.9)   Several ext. HD (backup and data)

  • Basic Questions About Compiling Source

    Hi!
    I have some very basic questions about compiling source on 10.6. BTW, if the unix discussions still exist, they've hidden them pretty well, so I hope I'm in the right place for this!
    First off, you simply cd to the source dir, wherever it may be - in my case ~/Downloads/source/  - and during the install process, everything will be installed in its proper dir, right?
    How do you know which compiler to use? There seem to be several: make, gmake, gcc, g++, etc...
    Once you do figure out which compiler to run, the process is supposed to go like this, right?
    ./configure
    make (or whatever)
    make install
    But this doesn't always work for me. For instance, I'm trying to compile 'arm', but it doesn't seem to have a 'configure' script.
    $ ls ~/Downloads/arm
    ChangeLog
    README
    armrc.sample
    setup.py
    LICENSE
    arm
    install
    /src
    Maybe it's that 'setup.py' file? What are you supposed to do?
    Of course, it's not only this one that's given me trouble. Sometimes the readme will say I have to edit a certain file for my system. Are there just a few standard changes you always make? Or is it...how can I put it...complicated? How do you find out what's needed in those cases?
    OS 10.6.8
    Xcode 3.2.4
    Python 2.7

    sudont wrote:
    I have some very basic questions about compiling source on 10.6. BTW, if the unix discussions still exist, they've hidden them pretty well, so I hope I'm in the right place for this!
    This is the place for UNIX discussions. If you have developer-related questions, there is a forum dedicated to that as well: Developer Forums
    First off, you simply cd to the source dir, wherever it may be - in my case ~/Downloads/source/  - and during the install process, everything will be installed in its proper dir, right?
    Yes. Hopefully the project you want to install follows standard conventions. If so, you can do "./configure", then "make", and finally "sudo make install" to install the software into "/usr/local".
    How do you know which compiler to use? There seem to be several: make, gmake, gcc, g++, etc...
    The make file will figure that stuff out.
    Once you do figure out which compiler to run, the process is supposed to go like this, right?
    ./configure
    make (or whatever)
    make install
    Yes, with the addition of "sudo" before "make install" because "/usr/local" is owned by root.
    But this doesn't always work for me. For instance, I'm trying to compile 'arm', but it doesn't seem to have a 'configure' script.
    $ ls ~/Downloads/arm
    ChangeLog
    README
    armrc.sample
    setup.py
    LICENSE
    arm
    install
    /src
    arm? You mean "arm (anonymizing relay monitor) - Terminal status monitor for Tor relays." You really don't want to be messing with that stuff. The only people involved with Tor that are trustworthy are US Navy intelligence who have their own uses for it. If you don't understand it as well as they do, best stay away.

  • Basic questions about CISCO IOS

    Hi everybody, Jack here,
    I have some basic questions about the Cisco IOS, could someone help me addressing some of them please? Any feedback would be greatly appreciated.
    Basically, I have two IP addresses assigned by our Cable ISP. From what I understood you can configure a Cisco router for multiple IP addresses using the IOS, thereby allowing someone like myself to take advantage of having multiple IP addresses. This may seem unnecessary to some, but I've always wanted to put the 2nd IP address to use, since after all, I've been paying for it.
    I was just wondering if someone could confirm that what I'm hoping to accomplish is indeed within the capability of the Cisco IOS (i.e. Fully utilize my 2 IP addresses). As well, if someone could kindly suggest a decent CISCO router for online gaming home use that would be super awesome!
    Thank you all so much for reading through the wall of text:)
    Jack

    Jack
    Certainly using multiple IP addresses is in the capability of Cisco IOS routers. How they can be used depends on the relationship of the IP addresses. I am assuming that we are talking about IP addresses assigned for the user to use and that the IP address for the ISP connection is not one of these that we are talking about.
    If both of the IP addresses that you have been assigned are within the same subnet then you would assign one of the addresses to the router interface to establish IP communication between the router and the ISP and to enable Internet connectivity for the devices inside your network that will use the router as their gateway to the Internet. The other address that is assigned can be used for address translation and in particular for static address translation which would make one of your devices inside to be reachable for connections initiated from the Internet (if that is something that you might want to do).
    If the addresses that are assigned to you are in different subnets then you could assign one address to the outside router interface and assign the other address to the router inside interface. Or you could use the second address for address translation.
    I do not have much expertise with online gaming, but I would think that either the Cisco 881 router or the 890 router might be appropriate for you. If 100 Mb connection is sufficient then probably the 881 would be the one to look at. If you need Gig connection then look at the 890.
    HTH
    Rick

  • Basic questions about JAAS capabilities

    I've never used JAAS for authentication or authorization in a Java app before. Can somebody that has (or at least has some experience and knowledge about JAAS) please answer the following couple of basic questions about it? (I know I could probably answer these myself with a few hours of reading.)
    1. Can I use JAAS to restrict the users that can execute specific methods of my code?
    2. If the answer to #1 is yes, is there a way to programmatically determine if a JAAS login user has the permissions to run a method before actually calling that method. In other words, can I ask something like canUserExecute(method) or do I have to just put the call to the method in a try/catch and catch a security exception of some type?
    3. Is it fairly simple to have JAAS authenticate against a Windows Domain or a LDAP server?
    4. Are there programmatic ways to add or edit user information in JAAS?
    Answer to any of these questions are greatly appreciated. I'll even toss a couple of Dukes to the people that answer each question. Thanks in advance.

    You might look at the AfterthoughtSoft-Secure product at http://www.advancedmodelingconcepts.com. It is designed to do just that and will easily allow you to connect to users/group repositories that are in anything from a simple text file all the way up to Kerberos V.
    You can contact the author of the product (me) at bart dot jenkins at gd-ais dot com.
    bart

  • Basic Questions about Package Installation

    I have one basic question about installing packages.
    How can I find out if needed software is already installed without knowing the name of the package?
    For e.g. I want to know, if the MYSQL Server is already installed but I don't know the Package name.
    How can I find out the package name of needed software?

    Difficult.
    Assuming the string "MYSQL" appears somewhere in the package
    name or the package description, you can grep the output from
    "pkginfo". That is "pkginfo | grep -i sql" would list all installed
    packages that contain the substring "sql" with either upper- or
    lowercase letters.

  • Basic questions about Notes domino connector

    Hi,
    I have a very basic question about the Lotus Domino connector for OIM. We have a requirement to provision accounts into the domino mail server and while doing that also update some information directly into a separate nsf file.
    I checked the documentation and it seems while configuring an IT resource, we need to give the Mail DB path, and thats the only place where it refers to it.
    Could you guys please let me know if this can be done? Can I write directly to a different nsf file, which is not like provisioning to the complete mail server. So the other attributes in the IT resource may not be able to be set up as its just the file I need to provision into.
    Looking forward to your response.
    Thanks, M

    Hello folks, please share your experience working with the lotus notes connector.
    Thanks, M

  • Basic questions about Network Licence

    Hi,
    Before buying, I have some basics questions about the network licence of Acrobat
    As an example, if I buy 5 network licence for 20 users.
    If the 5 licence are used or if one user is outside and can't access the licence serveur, is there still some basic features available? I mean, is there a "acrobat reader" part that still allow users to read pdf?
    In the same kind of problem, if 10 users are using Acrobat just for reading pdf file and that a user now want to use acrobat to create a pdf, is there still available licence  or the 5 firsts that are just reading have take the 5 licences available?
    Thank you for your answers

    This is a user to user forum, with the space provided by Adobe
    This is not official Adobe support... I think you need to contact Adobe

  • BASIC Questions about JavaMail

    Hi Everyone
    I have some very basic questions about java mail.
    I have a weblogic web server. I think it's version 5 or something like that.
    when a user clicks a form on my application sends some information to my database (via my jsp/java program) , I need to send email to a person?
    Does anyone know how to do that ?
    Could someone please describe the process
    Stephen

    I would recommend that you first read the JavaMail design specifications http://java.sun.com/products/javamail/JavaMail-1.2.pdf
    Then, download JavaMail. It comes with a reference implementation of the API and also very good samples.
    Those samples should get you started very quickly on how to send email from Java program.

  • Basic questions about JRE installation

    I am using NSIS to make a installer, which insalls the JRE 1.5, JMF, Javamp3, then our own software packages.....
    Firstly I have some basic question about the general installatio/deinstallation.
    1 Why sometimes is it required to reboot computer for the installed software to take effect, e.g.
    JRE 1.5. If not, what doest NOT take effect? (Actually in many cases, it seems to work even if not reboot the computer).
    Regarding the JRE 1.5,
    I am wondering:
    1 where is the registry entry written in windows?
    2 how to make the JRE installation process silent?
    Thanks !

    Just click on this link http://mindprod.com/jgloss/registry.html.

  • Few basic questions about database administration

    Hello,
    I have a few basic questions about database administration.
    1. I switched one of my oracle instances to archivelog mode. I just cannot locate the archive log files on my windows system. The %ora_home%/ora92/database/archive directory is desperately empty...
    2.What is the tools01.dbf datafile used for?
    3.What is the undotbso1.dbf datafile used for?
    Thanks in advance,
    Julien.

    1. The archive log location needs to be specified in your init.ora file. By default, Oracle will place the archive files in either ORACLE_HOME/dbs or ORACLE_HOME/database.
    2. The tools01.dbf file belongs to the tools tablespace which should be set as the default tablespace for system. It primary purpose is to hold Oracle Forms and Reports database objects, however, it should also be used for holding other non sys database objects such as the perfstat (statspack) or other third party database schemas e.g. quests sqllab.
    3. undotbs01.dbf file belongs to the undo tablespace.

  • Here's a very basic question about 2 TB external drives and Time Machine.

    Here's a very basic question about 2 TB external drives and Time Machine.
    Ihave a Mac Pro with a .75 TB and 1 TB drive.  It also has a 1 TB 2ndinternal drive.  My current external drive is too small so I'll begetting a 1.5 TB or 2 TB drive.
    Obviouslythe new larger 2 TB drive will backup everything on the Mac Prointernal drive with Time Machine.  But there will be 1 TB of space leftover going to waste.
    ShouldI partition the external drive so that the TM portion will be 1 TB andthe use the remaining extra partition for additional file backups withCarbon Copy?
    Thanks for any insights.
    I tried searching around on the new Apple discussion forum, but I find it much harder to use than the old forum I used to use.

    The problem with terabyte drives is that that a 3 TB is about as big as you can get without going into RAID territory. Ideally, a Time Machine drive should be 3 times as large as all the drives you are backing up. So, if you have 2.75 TB of internal storage, you should have 8 TB of Time Machine space.
    Of course, that is "should". If your TB drives are mostly empty, then you can get away with something 3 times the size of your used disk space. Just remember that you are pushing it. Linc is right about Time Machine needing space to work.
    It is unlikely that you have regular churn on 2.75 TB of disk. I suggest identifying which drives and folders have the most activity and excluding those drives and directories that don't change much. It would be better to archive the data that doesn't change often and keep it out of Time Machine. Then you may be able to get away with a 2 TB Time Machine drive.

  • Some basic question about SCM Installation

    Hi Folks,
    Could you please advice me about some basic questions about SCM and its installation -
    Q1. Do I need to have an R/3 System to be able to practice OR demo the SCM system?
    Q2. If, yes, which version of SCM is compatible with the ECC 5.0?
    Q3. What are the basic requirements to install SCM (version compatible with ECC 5.0) and ECC on a oracle db and windows OS?
    Q4. Does SCM have APO and BI as an inbuilt functionality OR does the user need to purchase these as an Add-On?
    I know these are some basic questions, but these will help me give me a direction.
    With best wishes,
    Krishna

    Hello Krishna -
    Q1. Do I need to have an R/3 System to be able to practice OR demo the SCM system?
    ---> There are various Modules in SCM Like APO (Sub Modules  DP (stand alone), SNP Needs Master data from R/3 and has to pass on transactional Data to R/3, PPDS same as SNP, GATP same as SNP), ICH needs Data from R/3 to work with. Core Interface (CIF) connects R/3 to APO for transferring data.
    Q2. If, yes, which version of SCM is compatible with the ECC 5.0?
    -->For thorough understanding explore the following links
    http://help.sap.com/saphelp_scm41/helpdata/en/9b/954d3baf755b67e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_scm50/helpdata/en/9b/954d3baf755b67e10000000a114084/frameset.htm
    Q3. What are the basic requirements to install SCM (version compatible with ECC 5.0) and ECC on a oracle db and windows OS?
    -->Refer Above
    Q4. Does SCM have APO and BI as an inbuilt functionality OR does the user need to purchase these as an Add-On?
    --> APO comes with a small BI inbuilt functionality. you can only perform certain functions using that BI.
    Hope this helps.
    Regards,
    Suresh Garg

Maybe you are looking for