473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Cannot create class in system package

I've not done very much Java before and now I'm working on a j2me
application, however I think the trouble I have is generic java. I
can compile, preverify and jar everything fine, but the emulator
crashes with the error message:

Cannot create class in system package

My code (in its entirety!) follows:

import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
import javax.microedition.midlet.*;
import java.io.*;

public class hello extends MIDlet implements CommandListener
{
Command exitCommand = new Command("exit", Command.EXIT, 1);
ScreenPic screenPic;

public hello()
{
screenPic = new ScreenPic();
screenPic.addCommand(exitCommand);
screenPic.setCommandListener(this);
}

protected void startApp()
{
System.out.println("starting application");
}

protected void pauseApp()
{
}

protected void destroyApp(boolean b)
{
}

public void commandAction(Command c, Displayable d)
{
if(c == exitCommand) notifyDestroyed();
}

}

class ScreenPic extends GameCanvas
{
Image image;
Byte imageData;

public ScreenPic()
{
super(true);
byte[] imageData = new byte[(int)5120*5120];
image.createImage(imageData, 0, imageData.length);
}

}

Many thanks to anyone who can throw light on this one
Jul 17 '05 #1
0 3425

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Prashanth Uppunda | last post by:
Hello, Does anybody have an idea on how to instantiate a DCOM server residing in another machine using C#? Thanks Prashanth
22
by: Smutny30 | last post by:
Hello, I am preparing a database that will store 10 n * GBs - 100 n * GBs of data. I calculated to have 1,2 GB of bufferpools. I run the DB2 v. 8.2.1 alone on 4 GB box. I obtain : ...
15
by: Bjorn Jensen | last post by:
Hi! An beginner question: Pleas help me with this (-: Error (the arrow points on the s in sqrt) ===== tal.java:6: cannot find symbol symbol : method sqrt(int) location: class tal...
1
by: vsp15584 | last post by:
Hii..i use the coding as below :- import java.applet.applet; import java.awt.*; import com.sun.j3d.utils.applet.mainframe; import com.sun.j3d.utils.universe.*; import...
1
by: Shiva48 | last post by:
Thanks to Gannon11 and ro351988- Moderator. I give below the complete Java file and pls help me to rectify the errors. package com.wrox.proj2ee.ch10.app; import java.io.*; import...
3
by: amanjsingh | last post by:
Hi, I am trying to implement Java Web Service using Apache Axis2 and Eclipse as a tool. I have created the basic code and deployed the service using various eclipse plugin but when I try to invoke...
3
by: 100grand | last post by:
Modify the Inventory Program to use a GUI. The GUI should display the information one product at a time, including the item number, the name of the product, the number of units in stock, the price...
3
blazedaces
by: blazedaces | last post by:
Hello, it's been a while since I posted on these forums. My issue I think isn't as much in my code as it's in the syntax and structure in references other packages. I'll get straight to it then: ...
4
by: fabian.lim | last post by:
Hi All, Im a newbie to C++, I am trying to customize the vector template STL to a template Class. My code is shown below. Im confused about something and maybe somebody here might be able to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.