I don't understand why I get sqlldr error
Hi,
I am using sqlldr to load a ':' delimited text file into my db table.
when I run sqlldr I see this error in the log...
Record 56: Rejected - Error on table XYZ, column VARD.
Field in data file exceeds maximum length
... yet the field VARD in the flat file is only 340 characters
long?!?!?
What am I doing wrong here?
This what my control file looks like ....
LOAD DATA
APPEND INTO TABLE XYZ
FIELDS TERMINATED BY ':' OPTIONALLY ENCLOSED BY '"'
VARA,
NUMB,
VARC,
VARD,
NUME,
VARF,
VARG,
VARH,
VARI,
VARJ
When I execute sqlldr I specify the flat file with the 'data' option.
Here's what the table looks like.
create table XYZ (
VARA VARCHAR2(2),
NUMB NUMBER,
VARC VARCHAR2(400),
VARD VARCHAR2(400),
NUME NUMBER,
VARF VARCHAR2(400),
VARG VARCHAR2(6),
VARH VARCHAR2(6),
VARI VARCHAR2(400),
VARJ VARCHAR2(2)
);
Hi,
Actually, it has nothing to do with positioning since you have a delimited file.
By default SQL*Loader will not load character strings of more than 256 characters. If you have bigger strings you will have to explicitely force it. Change your control file to this and see if it works.
LOAD DATA
APPEND INTO TABLE XYZ
FIELDS TERMINATED BY ':' OPTIONALLY ENCLOSED BY '"'
VARA,
NUMB,
VARC char(400),
VARD char(400),
NUME,
VARF char(400),
VARG,
VARH,
VARI char(400),
VARJ
Note that the force is done by "CHAR" not by "VARCHAR2". That is because the datatypes between the database and SQL*Loader are different (don't ask me why). It took me a while to figure this one out, but it should work with CHAR, not VARCHAR2.
Hope this helps,
Lennert
Similar Messages
-
I can't update my Garageband and Apple Loops 1.0' , as it comes up with error 502? I don't understand what this is, or what it means. I need to update this so that I can use a wider variety of effects, so it is crucial I update it.
Hello, mitcheb.
Thank you for visiting Apple Support Communities.
The applications that were downloaded are licensed to this old Apple ID. Any updates that need to be processed for these apps will need to be processed using this Apple ID password. You cant attempt to reset that password for the Apple ID via the steps in the first article below. If you need assistance with this, see the second attached article. You can also delete the applications in question and download them again with your new Apple ID. However, this will cause any application data in those applications to be deleted and you may be charged if these are paid for applications.
Apple ID: If you forget your password
http://support.apple.com/kb/ht5787
Apple ID: Contacting Apple for help with Apple ID account security
http://support.apple.com/kb/HT5699
Cheers,
Jason H. -
I dont understand why i get this error when trying to type "else"
Hello Everybody,
Im new to java and am writing a simple program which gets a input number between 0 and 100 and is to print A for (grade>=90), B for (90>grade>=80) and so on, when grades < 60 get F.
i use a series of if/else, but when i get to the FINAL else it gets an error (red wavy line under the last else). this ruins the program bcoz now a grade 61 will output "D" AND "F".
can anyone explaing why this error msg? and how can i fix it?
this is the code:
public class Assignment02Q04 {
public static void main (String[] args){
int grade = (Integer.parseInt(args[0]));
if (grade >= 90){
System.out.println("A");}
else {if (grade >= 80){
System.out.println("B");}
else {if (grade >= 70){
System.out.println("C");}
else {if (grade >=60);{
System.out.println("D");}
else System.out.print("F");
}Please ignore the rude bits... this is a pro-forma post most often trotted out to suspected trolls... i.e. It's NOT directed at you personally.
h1. The Ubiquitous Newbie Tips
* DON'T SHOUT!!!
* Homework dumps will be flamed mercilessly.
* Have a quick scan through the [Forum FAQ's|http://wikis.sun.com/display/SunForums/Forums.sun.com+FAQ].
h5. Ask a good question
* Don't forget to actually ask a question. No, The subject line doesn't count.
* Ask once
- Don't Crosspost!
- Two people answering one question independantly is a waste of there time.
* Don't even talk to me until you've:
(a) [googled it|http://www.google.com.au/] and
(b) looked it up in [Sun's Java Tutorials|http://java.sun.com/docs/books/tutorial/] and
(c) read the relevant section of the [API Docs|http://java.sun.com/javase/6/docs/api/index-files/index-1.html] and maybe even
(d) referred to the JLS (for "advanced" questions).
* [Good questions|http://www.catb.org/~esr/faqs/smart-questions.html#intro] get better Answers. It's a fact. Trust me on this one.
- Lots of regulars on these forums simply don't read badly written questions. It's just too frustrating.
- FFS spare us the SMS and L33t speak! Pull your pants up, and get a hair cut!
- Often you discover your own mistake whilst forming a "Good question".
- Many of the regulars on these forums will bend over backwards to help with a "Good question",
especially to a nuggetty problem, because they're interested in the answer.
* Improve your chances of getting laid tonight by writing an SSCCE
- For you normal people, That's a: Short Self-Contained Compilable Example.
- Short is sweet: No-one wants to wade through 5000 lines to find your syntax errors!
- Often you discover your own mistake whilst writing an SSCCE.
- Solving your own problem yields a sense of accomplishment ;-)
h5. Formatting Matters
* Post your code between a pair of {code} tags
- That is: {code} ... your code goes here ... {code}
- This makes your code easier to read by preserving whitespace and highlighting java syntax.
- Copy&paste your source code directly from your editor. The forum editor basically sucks.
- The forums tabwidth is 8, as per [the java coding conventions|http://java.sun.com/docs/codeconv/].
- Indents will go jagged if your tabwidth!=8 and you've mixed tabs and spaces.
- Lines longer than 80 characters should be wrapped.
- Proper indentation illustrates program logic.
* Post your error messages between a pair of {code} tags:
- That is: {code} ... errors here ... {code}
- To make it easier for us to find, Mark the erroneous line(s) in your source-code. For example:
System.out.println("Your momma!); // <<<< ERROR 1
- Note that error messages are rendered basically useless if the code has been
modified AT ALL since the error message was produced.
- Here's [How to read a stacktrace|http://www.0xcafefeed.com/2004/06/of-thread-dumps-and-stack-traces/].
* The forum editor has a "Preview" pane. Use it.
- If you're new around here you'll probably find the "Rich Text" view is easier to use.
- WARNING: Swapping from "Plain Text" view to "Rich Text" scrambles the markup!
- To see how a posted "special effect" is done, click reply then click the quote button.
If you (the newbie) have covered these bases *you deserve, and can therefore expect, GOOD answers!*
h1. The pledge!
We the New To Java regulars do hereby pledge to refrain from flaming anybody, no matter how gumbyish the question, if the OP has demonstrably tried to cover these bases. The rest are fair game.
Edited by: corlettk on 17/03/2009 23:25 ~~ Doh! -
I bought a free app(Documents by Readdle) for free. In my account I had $6.37 but now I have $3.19!! I don't understand why because it was a free app? What do I do and how do I get my money back?
Hi caw52,
Welcome to the Support Communities!
The following information should help you with this:
How to report an issue with your iTunes Store, App Store, Mac App Store, or iBookstore purchase
http://support.apple.com/kb/HT1933?viewlocale=en_US
Cheers,
Judy -
I don't understand why a person who has been with a company for 6 years cant get a simple upgrade can anyone help figure that out?
Are you trying to get an upgrade before you're actually eligible? If that is the case, it doesn't matter if you've been a customer for 6 years or 6 days...if you're not eligible then you're not eligible. Some of your possible options are to pay full retail, do an early edge up (if you are eligible for that option), or buying a phone from some other source to use.
If your situation is something different then it might help to share that. The options may still be the same but it helps to know what exactly the issue is. -
I am trying to download from iTunes and getting message stating insufficient local storage. In usage screen, states I have 19 GB storage space. Pls help!!!!!
Jenniferwood2829 wrote:
... so I don't understand why I still get this message when I show I have 15GB available in iCloud?
It means you do not have enough Space on your Device and need to create More Space on Your Device by Deleting some items off your device. -
I don't understand why me phone keep saying my phone is disable can I get help please
I need help I don't understand why my phone is telling me its disable and want let me in the App Store I Changed the pass word now what can I do
If you are having store account problems, contact the iTunes/app store staff at http://www.apple.com/emea/support/itunes/contact.html and they can straighten out your account.
-
I am new to Final Cut Express and don't understand why I am unable to drag transitions into Canvas? Something wrong in my setup? It's not the overlays they are "on" so can anyone advise me please, by the way the "L" doesn't appear in the bottom left hand corner either? and by the way how can I get rid of that irritating Blue badge saying "AutoFill your contact details" all mine are in "address book" already!
You can't drag a transition into the canvas. If you're dragginmg a transition from the effects tab you drag it between the edit point of two clips in the timeline.
Make sure show edit overlays is turned on in the Canvas view popup. -
Hi,
Ok, I'll preface this by saying there's a lotta code pasted in here but it really quite an easy question, I just need to post all the code so you understand where what came from.
Now.............the question I'm trying to do is to create an applet that has 2 buttons -- each button when clicked opens an application (one is a simple calculator, the other a Mortgage calculation app). When you click one of the buttons (calc or mortgage), that app opens infront of the 2 button menu so its in "focus". The button on the 2 button menu then switches to a "hide app X" button (ie: "Mortgage", changes to "Hide Mortgage"). Thus if you click the hide button, the app that was opened is hidden, and then that "hide" button switches back to the original "app X" button. Pretty simple.
Now, I have from my text book an example that does exactly this, with the simple calculator already in it, and with another app (a traffic light thing) where the Mortgage should be in my final product. I also already have the Mortgage applet I need to insert from another book example in place of that Traffic Light portion.
Now, common sense would dictate that I should be able to just copy my code for the Mortgage applet into the example that has the 2 button menu structure, and overwrite the code I want to get rid of (the traffic light) with the mortgage code & rename the menu buttons. Right?? A simple switch of one thing for another... but therein lies my problem.
I copied all the Mortgage code in correctly over the traffic lights, switched the button names, tried to compile it but I get one error....
Exercise12_17.java:52: cannot resolve symbol
symbol : method pack ()
location: class MortgageApplet
mortgageAppletFrame.pack();I don't understand why..... mortgageAppletFrame.pack(); was a simple rewrite from lightsFrame.pack(); like every other line...... it should work. I've gone over it for 2 days......... Anyone know why it comes up as an error???
Below, in order going down is (1)my code with the 1 error I can't solve, (2)the original menu example I tried to edit, and (3)the Mortgage app code...........
Does anyone know what my error is?? Help or a hint would be greatly appreciated........ Thanks.
My erroring app.......
// Exercise12_17.java: Create multiple windows
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.TitledBorder;
public class Exercise12_17 extends JFrame implements ActionListener {
// Declare and create a frame: an instance of MenuDemo
MenuDemo calcFrame = new MenuDemo();
// Declare and create a frame: an instance of RadioButtonDemo
MortgageApplet mortgageAppletFrame = new MortgageApplet();
// Declare two buttons for displaying frames
private JButton jbtCalc;
private JButton jbtMortgage;
public static void main(String[] args) {
Exercise12_17 frame = new Exercise12_17();
frame.setSize( 400, 70 );
frame.setTitle("Exercise 11.8: Multiple Windows Demo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
public Exercise12_17() {
// Add buttons to the main frame
getContentPane().setLayout(new FlowLayout());
getContentPane().add(jbtCalc = new JButton("Simple Calculator"));
getContentPane().add(jbtMortgage = new JButton("Mortgage"));
// Register the main frame as listener for the buttons
jbtCalc.addActionListener(this);
jbtMortgage.addActionListener(this);
public void actionPerformed(ActionEvent e) {
String arg = e.getActionCommand();
if (e.getSource() instanceof JButton)
if ("Simple Calculator".equals(arg)) {
//show the MenuDemo frame
jbtCalc.setText("Hide Simple Calculator");
calcFrame.pack();
calcFrame.setVisible(true);
else if ("Hide Simple Calculator".equals(arg)) {
calcFrame.setVisible(false);
jbtCalc.setText("Simple Calculator");
else if ("Mortgage".equals(arg)) {
//show the CheckboxGroup frame
mortgageAppletFrame.pack();
jbtMortgage.setText("Hide Mortgage");
mortgageAppletFrame.setVisible(true);
else if ("Hide Mortgage".equals(arg)) {
mortgageAppletFrame.setVisible(false);
jbtMortgage.setText("Mortgage");
class MortgageApplet extends JApplet
implements ActionListener {
// Declare and create text fields for interest rate
// year, loan amount, monthly payment, and total payment
private JTextField jtfAnnualInterestRate = new JTextField();
private JTextField jtfNumOfYears = new JTextField();
private JTextField jtfLoanAmount = new JTextField();
private JTextField jtfMonthlyPayment = new JTextField();
private JTextField jtfTotalPayment = new JTextField();
// Declare and create a Compute Mortgage button
private JButton jbtComputeMortgage = new JButton("Compute Mortgage");
/** Initialize user interface */
public void init() {
// Set properties on the text fields
jtfMonthlyPayment.setEditable(false);
jtfTotalPayment.setEditable(false);
// Right align text fields
jtfAnnualInterestRate.setHorizontalAlignment(JTextField.RIGHT);
jtfNumOfYears.setHorizontalAlignment(JTextField.RIGHT);
jtfLoanAmount.setHorizontalAlignment(JTextField.RIGHT);
jtfMonthlyPayment.setHorizontalAlignment(JTextField.RIGHT);
jtfTotalPayment.setHorizontalAlignment(JTextField.RIGHT);
// Panel p1 to hold labels and text fields
JPanel p1 = new JPanel();
p1.setLayout(new GridLayout(5, 2));
p1.add(new Label("Annual Interest Rate"));
p1.add(jtfAnnualInterestRate);
p1.add(new Label("Number of Years"));
p1.add(jtfNumOfYears);
p1.add(new Label("Loan Amount"));
p1.add(jtfLoanAmount);
p1.add(new Label("Monthly Payment"));
p1.add(jtfMonthlyPayment);
p1.add(new Label("Total Payment"));
p1.add(jtfTotalPayment);
p1.setBorder(new
TitledBorder("Enter interest rate, year and loan amount"));
// Panel p2 to hold the button
JPanel p2 = new JPanel();
p2.setLayout(new FlowLayout(FlowLayout.RIGHT));
p2.add(jbtComputeMortgage);
// Add the components to the applet
getContentPane().add(p1, BorderLayout.CENTER);
getContentPane().add(p2, BorderLayout.SOUTH);
// Register listener
jbtComputeMortgage.addActionListener(this);
/** Handle the "Compute Mortgage" button */
public void actionPerformed(ActionEvent e) {
if (e.getSource() == jbtComputeMortgage) {
// Get values from text fields
double interest = (Double.valueOf(
jtfAnnualInterestRate.getText())).doubleValue();
int year =
(Integer.valueOf(jtfNumOfYears.getText())).intValue();
double loan =
(Double.valueOf(jtfLoanAmount.getText())).doubleValue();
// Create a mortgage object
Mortgage m = new Mortgage(interest, year, loan);
// Display monthly payment and total payment
jtfMonthlyPayment.setText(String.valueOf(m.monthlyPayment()));
jtfTotalPayment.setText(String.valueOf(m.totalPayment()));
class MenuDemo extends JFrame implements ActionListener {
// Text fields for Number 1, Number 2, and Result
private JTextField jtfNum1, jtfNum2, jtfResult;
// Buttons "Add", "Subtract", "Multiply" and "Divide"
private JButton jbtAdd, jbtSub, jbtMul, jbtDiv;
// Menu items "Add", "Subtract", "Multiply","Divide" and "Close"
private JMenuItem jmiAdd, jmiSub, jmiMul, jmiDiv, jmiClose;
/** Main method */
public static void main(String[] args) {
MenuDemo frame = new MenuDemo();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
/** Default constructor */
public MenuDemo() {
setTitle("Menu Demo");
// Create menu bar
JMenuBar jmb = new JMenuBar();
// Set menu bar to the frame
setJMenuBar(jmb);
// Add menu "Operation" to menu bar
JMenu operationMenu = new JMenu("Operation");
operationMenu.setMnemonic('O');
jmb.add(operationMenu);
// Add menu "Exit" in menu bar
JMenu exitMenu = new JMenu("Exit");
exitMenu.setMnemonic('E');
jmb.add(exitMenu);
// Add menu items with mnemonics to menu "Operation"
operationMenu.add(jmiAdd= new JMenuItem("Add", 'A'));
operationMenu.add(jmiSub = new JMenuItem("Subtract", 'S'));
operationMenu.add(jmiMul = new JMenuItem("Multiply", 'M'));
operationMenu.add(jmiDiv = new JMenuItem("Divide", 'D'));
exitMenu.add(jmiClose = new JMenuItem("Close", 'C'));
// Set keyboard accelerators
jmiAdd.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.CTRL_MASK));
jmiSub.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
jmiMul.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));
jmiDiv.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_D, ActionEvent.CTRL_MASK));
// Panel p1 to hold text fields and labels
JPanel p1 = new JPanel();
p1.setLayout(new FlowLayout());
p1.add(new JLabel("Number 1"));
p1.add(jtfNum1 = new JTextField(3));
p1.add(new JLabel("Number 2"));
p1.add(jtfNum2 = new JTextField(3));
p1.add(new JLabel("Result"));
p1.add(jtfResult = new JTextField(4));
jtfResult.setEditable(false);
// Panel p2 to hold buttons
JPanel p2 = new JPanel();
p2.setLayout(new FlowLayout());
p2.add(jbtAdd = new JButton("Add"));
p2.add(jbtSub = new JButton("Subtract"));
p2.add(jbtMul = new JButton("Multiply"));
p2.add(jbtDiv = new JButton("Divide"));
// Add panels to the frame
getContentPane().setLayout(new BorderLayout());
getContentPane().add(p1, BorderLayout.CENTER);
getContentPane().add(p2, BorderLayout.SOUTH);
// Register listeners
jbtAdd.addActionListener(this);
jbtSub.addActionListener(this);
jbtMul.addActionListener(this);
jbtDiv.addActionListener(this);
jmiAdd.addActionListener(this);
jmiSub.addActionListener(this);
jmiMul.addActionListener(this);
jmiDiv.addActionListener(this);
jmiClose.addActionListener(this);
/** Handle ActionEvent from buttons and menu items */
public void actionPerformed(ActionEvent e) {
String actionCommand = e.getActionCommand();
// Handle button events
if (e.getSource() instanceof JButton) {
if ("Add".equals(actionCommand))
calculate('+');
else if ("Subtract".equals(actionCommand))
calculate('-');
else if ("Multiply".equals(actionCommand))
calculate('*');
else if ("Divide".equals(actionCommand))
calculate('/');
else if (e.getSource() instanceof JMenuItem) {
// Handle menu item events
if ("Add".equals(actionCommand))
calculate('+');
else if ("Subtract".equals(actionCommand))
calculate('-');
else if ("Multiply".equals(actionCommand))
calculate('*');
else if ("Divide".equals(actionCommand))
calculate('/');
else if ("Close".equals(actionCommand))
System.exit(0);
/** Calculate and show the result in jtfResult */
private void calculate(char operator) {
// Obtain Number 1 and Number 2
int num1 = (Integer.parseInt(jtfNum1.getText().trim()));
int num2 = (Integer.parseInt(jtfNum2.getText().trim()));
int result = 0;
// Perform selected operation
switch (operator) {
case '+': result = num1 + num2;
break;
case '-': result = num1 - num2;
break;
case '*': result = num1 * num2;
break;
case '/': result = num1 / num2;
// Set result in jtfResult
jtfResult.setText(String.valueOf(result));
Original 2 button menu example....
// Exercise11_8.java: Create multiple windows
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Exercise11_8 extends JFrame implements ActionListener {
// Declare and create a frame: an instance of MenuDemo
MenuDemo calcFrame = new MenuDemo();
// Declare and create a frame: an instance of RadioButtonDemo
RadioButtonDemo lightsFrame = new RadioButtonDemo();
// Declare two buttons for displaying frames
private JButton jbtCalc;
private JButton jbtLights;
public static void main(String[] args) {
Exercise11_8 frame = new Exercise11_8();
frame.setSize( 400, 70 );
frame.setTitle("Exercise 11.8: Multiple Windows Demo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setVisible(true);
public Exercise11_8() {
// Add buttons to the main frame
getContentPane().setLayout(new FlowLayout());
getContentPane().add(jbtCalc = new JButton("Simple Calculator"));
getContentPane().add(jbtLights = new JButton("Traffic Lights"));
// Register the main frame as listener for the buttons
jbtCalc.addActionListener(this);
jbtLights.addActionListener(this);
public void actionPerformed(ActionEvent e) {
String arg = e.getActionCommand();
if (e.getSource() instanceof JButton)
if ("Simple Calculator".equals(arg)) {
//show the MenuDemo frame
jbtCalc.setText("Hide Simple Calculator");
calcFrame.pack();
calcFrame.setVisible(true);
else if ("Hide Simple Calculator".equals(arg)) {
calcFrame.setVisible(false);
jbtCalc.setText("Simple Calculator");
else if ("Traffic Lights".equals(arg)) {
//show the CheckboxGroup frame
lightsFrame.pack();
jbtLights.setText("Hide Traffic Lights");
lightsFrame.setVisible(true);
else if ("Hide Traffic Lights".equals(arg)) {
lightsFrame.setVisible(false);
jbtLights.setText("Traffic Lights");
class RadioButtonDemo extends JFrame
implements ItemListener {
// Declare radio buttons
private JRadioButton jrbRed, jrbYellow, jrbGreen;
// Declare a radio button group
private ButtonGroup btg = new ButtonGroup();
// Declare a traffic light display panel
private Light light;
/** Main method */
public static void main(String[] args) {
RadioButtonDemo frame = new RadioButtonDemo();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(250, 170);
frame.setVisible(true);
/** Default constructor */
public RadioButtonDemo() {
setTitle("RadioButton Demo");
// Add traffic light panel to panel p1
JPanel p1 = new JPanel();
p1.setSize(200, 200);
p1.setLayout(new FlowLayout(FlowLayout.CENTER));
light = new Light();
light.setSize(40, 90);
p1.add(light);
// Put the radio button in Panel p2
JPanel p2 = new JPanel();
p2.setLayout(new FlowLayout());
p2.add(jrbRed = new JRadioButton("Red", true));
p2.add(jrbYellow = new JRadioButton("Yellow", false));
p2.add(jrbGreen = new JRadioButton("Green", false));
// Set keyboard mnemonics
jrbRed.setMnemonic('R');
jrbYellow.setMnemonic('Y');
jrbGreen.setMnemonic('G');
// Group radio buttons
btg.add(jrbRed);
btg.add(jrbYellow);
btg.add(jrbGreen);
// Place p1 and p2 in the frame
getContentPane().setLayout(new BorderLayout());
getContentPane().add(p1, BorderLayout.CENTER);
getContentPane().add(p2, BorderLayout.SOUTH);
// Register listeners for check boxes
jrbRed.addItemListener(this);
jrbYellow.addItemListener(this);
jrbGreen.addItemListener(this);
/** Handle checkbox events */
public void itemStateChanged(ItemEvent e) {
if (jrbRed.isSelected())
light.turnOnRed(); // Set red light
if (jrbYellow.isSelected())
light.turnOnYellow(); // Set yellow light
if (jrbGreen.isSelected())
light.turnOnGreen(); // Set green light
// Three traffic lights shown in a panel
class Light extends JPanel {
private boolean red;
private boolean yellow;
private boolean green;
/** Default constructor */
public Light() {
turnOnGreen();
/** Set red light on */
public void turnOnRed() {
red = true;
yellow = false;
green = false;
repaint();
/** Set yellow light on */
public void turnOnYellow() {
red = false;
yellow = true;
green = false;
repaint();
/** Set green light on */
public void turnOnGreen() {
red = false;
yellow = false;
green = true;
repaint();
/** Display lights */
public void paintComponent(Graphics g) {
super.paintComponent(g);
if (red) {
g.setColor(Color.red);
g.fillOval(10, 10, 20, 20);
g.setColor(Color.black);
g.drawOval(10, 35, 20, 20);
g.drawOval(10, 60, 20, 20);
g.drawRect(5, 5, 30, 80);
else if (yellow) {
g.setColor(Color.yellow);
g.fillOval(10, 35, 20, 20);
g.setColor(Color.black);
g.drawRect(5, 5, 30, 80);
g.drawOval(10, 10, 20, 20);
g.drawOval(10, 60, 20, 20);
else if (green) {
g.setColor(Color.green);
g.fillOval(10, 60, 20, 20);
g.setColor(Color.black);
g.drawRect(5, 5, 30, 80);
g.drawOval(10, 10, 20, 20);
g.drawOval(10, 35, 20, 20);
else {
g.setColor(Color.black);
g.drawRect(5, 5, 30, 80);
g.drawOval(10, 10, 20, 20);
g.drawOval(10, 35, 20, 20);
g.drawOval(10, 60, 20, 20);
/** Set preferred size */
public Dimension getPreferredSize() {
return new Dimension(40, 90);
class MenuDemo extends JFrame implements ActionListener {
// Text fields for Number 1, Number 2, and Result
private JTextField jtfNum1, jtfNum2, jtfResult;
// Buttons "Add", "Subtract", "Multiply" and "Divide"
private JButton jbtAdd, jbtSub, jbtMul, jbtDiv;
// Menu items "Add", "Subtract", "Multiply","Divide" and "Close"
private JMenuItem jmiAdd, jmiSub, jmiMul, jmiDiv, jmiClose;
/** Main method */
public static void main(String[] args) {
MenuDemo frame = new MenuDemo();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack();
frame.setVisible(true);
/** Default constructor */
public MenuDemo() {
setTitle("Menu Demo");
// Create menu bar
JMenuBar jmb = new JMenuBar();
// Set menu bar to the frame
setJMenuBar(jmb);
// Add menu "Operation" to menu bar
JMenu operationMenu = new JMenu("Operation");
operationMenu.setMnemonic('O');
jmb.add(operationMenu);
// Add menu "Exit" in menu bar
JMenu exitMenu = new JMenu("Exit");
exitMenu.setMnemonic('E');
jmb.add(exitMenu);
// Add menu items with mnemonics to menu "Operation"
operationMenu.add(jmiAdd= new JMenuItem("Add", 'A'));
operationMenu.add(jmiSub = new JMenuItem("Subtract", 'S'));
operationMenu.add(jmiMul = new JMenuItem("Multiply", 'M'));
operationMenu.add(jmiDiv = new JMenuItem("Divide", 'D'));
exitMenu.add(jmiClose = new JMenuItem("Close", 'C'));
// Set keyboard accelerators
jmiAdd.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_A, ActionEvent.CTRL_MASK));
jmiSub.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK));
jmiMul.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_M, ActionEvent.CTRL_MASK));
jmiDiv.setAccelerator(
KeyStroke.getKeyStroke(KeyEvent.VK_D, ActionEvent.CTRL_MASK));
// Panel p1 to hold text fields and labels
JPanel p1 = new JPanel();
p1.setLayout(new FlowLayout());
p1.add(new JLabel("Number 1"));
p1.add(jtfNum1 = new JTextField(3));
p1.add(new JLabel("Number 2"));
p1.add(jtfNum2 = new JTextField(3));
p1.add(new JLabel("Result"));
p1.add(jtfResult = new JTextField(4));
jtfResult.setEditable(false);
// Panel p2 to hold buttons
JPanel p2 = new JPanel();
p2.setLayout(new FlowLayout());
p2.add(jbtAdd = new JButton("Add"));
p2.add(jbtSub = new JButton("Subtract"));
p2.add(jbtMul = new JButton("Multiply"));
p2.add(jbtDiv = new JButton("Divide"));
// Add panels to the frame
getContentPane().setLayout(new BorderLayout());
getContentPane().add(p1, BorderLayout.CENTER);
getContentPane().add(p2, BorderLayout.SOUTH);
// Register listeners
jbtAdd.addActionListener(this);
jbtSub.addActionListener(this);
jbtMul.addActionListener(this);
jbtDiv.addActionListener(this);
jmiAdd.addActionListener(this);
jmiSub.addActionListener(this);
jmiMul.addActionListener(this);
jmiDiv.addActionListener(this);
jmiClose.addActionListener(this);
/** Handle ActionEvent from buttons and menu items */
public void actionPerformed(ActionEvent e) {
String actionCommand = e.getActionCommand();
// Handle button events
if (e.getSource() instanceof JButton) {
if ("Add".equals(actionCommand))
calculate('+');
else if ("Subtract".equals(actionCommand))
calculate('-');
else if ("Multiply".equals(actionCommand))
calculate('*');
else if ("Divide".equals(actionCommand))
calculate('/');
else if (e.getSource() instanceof JMenuItem) {
// Handle menu item events
if ("Add".equals(actionCommand))
calculate('+');
else if ("Subtract".equals(actionCommand))
calculate('-');
else if ("Multiply".equals(actionCommand))
calculate('*');
else if ("Divide".equals(actionCommand))
calculate('/');
else if ("Close".equals(actionCommand))
System.exit(0);
/** Calculate and show the result in jtfResult */
private void calculate(char operator) {
// Obtain Number 1 and Number 2
int num1 = (Integer.parseInt(jtfNum1.getText().trim()));
int num2 = (Integer.parseInt(jtfNum2.getText().trim()));
int result = 0;
// Perform selected operation
switch (operator) {
case '+': result = num1 + num2;
break;
case '-': result = num1 - num2;
break;
case '*': result = num1 * num2;
break;
case '/': result = num1 / num2;
// Set result in jtfResult
jtfResult.setText(String.valueOf(result));
Mortgage applet code....
// MortgageApplet.java: Applet for computing mortgage payments
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.TitledBorder;
public class MortgageApplet extends JApplet
implements ActionListener {
// Declare and create text fields for interest rate
// year, loan amount, monthly payment, and total payment
private JTextField jtfAnnualInterestRate = new JTextField();
private JTextField jtfNumOfYears = new JTextField();
private JTextField jtfLoanAmount = new JTextField();
private JTextField jtfMonthlyPayment = new JTextField();
private JTextField jtfTotalPayment = new JTextField();
// Declare and create a Compute Mortgage button
private JButton jbtComputeMortgage = new JButton("Compute Mortgage");
/** Initialize user interface */
public void init() {
// Set properties on the text fields
jtfMonthlyPayment.setEditable(false);
jtfTotalPayment.setEditable(false);
// Right align text fields
jtfAnnualInterestRate.setHorizontalAlignment(JTextField.RIGHT);
jtfNumOfYears.setHorizontalAlignment(JTextField.RIGHT);
jtfLoanAmount.setHorizontalAlignment(JTextField.RIGHT);
jtfMonthlyPayment.setHorizontalAlignment(JTextField.RIGHT);
jtfTotalPayment.setHorizontalAlignment(JTextField.RIGHT);
// Panel p1 to hold labels and text fields
JPanel p1 = new JPanel();
p1.setLayout(new GridLayout(5, 2));
p1.add(new Label("Annual Interest Rate"));
p1.add(jtfAnnualInterestRate);
p1.add(new Label("Number of Years"));
p1.add(jtfNumOfYears);
p1.add(new Label("Loan Amount"));
p1.add(jtfLoanAmount);
p1.add(new Label("Monthly Payment"));
p1.add(jtfMonthlyPayment);
p1.add(new Label("Total Payment"));
p1.add(jtfTotalPayment);
p1.setBorder(new
TitledBorder("Enter interest rate, year and loan amount"));
// Panel p2 to hold the button
JPanel p2 = new JPanel();
p2.setLayout(new FlowLayout(FlowLayout.RIGHT));
p2.add(jbtComputeMortgage);
// Add the components to the applet
getContentPane().add(p1, BorderLayout.CENTER);
getContentPane().add(p2, BorderLayout.SOUTH);
// Register listener
jbtComputeMortgage.addActionListener(this);
/** Handle the "Compute Mortgage" button */
public void actionPerformed(ActionEvent e) {
if (e.getSource() == jbtComputeMortgage) {
// Get values from text fields
double interest = (Double.valueOf(
jtfAnnualInterestRate.getText())).doubleValue();
int year =
(Integer.valueOf(jtfNumOfYears.getText())).intValue();
double loan =
(Double.valueOf(jtfLoanAmount.getText())).doubleValue();
// Create a mortgage object
Mortgage m = new Mortgage(interest, year, loan);
// Display monthly payment and total payment
jtfMonthlyPayment.setText(String.valueOf(m.monthlyPayment()));
jtfTotalPayment.setText(String.valueOf(m.totalPayment()));
}Does it have to be an applet?
If you want the same behaviour as in the code with traffic lights, change
class MortgageApplet extends JApplet implements ActionListener {
to
class MortgageApplet extends JFrame implements ActionListener {
and change
public void init() {
to
public MortgageApplet() { -
I don't understand why appear new decimals.
Hi Jorge,
Instead of using
Data.SetValue(FormatDouble.DecodeDouble(self.PKg));
use
Data.SetValue(FormatDouble.DecodeDecimal(self.PKg,Data.Scale)); //
This will take the second parameter of scale
You will see the desired results.
Thks,
Sanjay
-----Original Message-----
From: Dave Ortman [SMTP:dortmanyahoo.com]
Sent: Monday, March 05, 2001 12:32
To: Jorge Bellido; forte-userslists.xpedior.com
Subject: Re: (forte-users) I don't understand why appear new
decimals.
Simply put, the problem stems from the fact that
floating-point arithmetic is inherently imprecise.
Rounding errors are common.
With doubles, you get 16 digits of accuracy. Beyond
that there is no guarantee.
If you want more information:
http://docs.sun.com/htmlcoll/coll.648.2/iso-8859-1/NUMCOMPGD/ncg_goldberg.ht
ml
-Dave Ortman
--- Jorge Bellido <jorge.bellidoeam.es> wrote:
> I have another problem with numbers. So,
>
> Data: DecimalNullable = new;
> Data.Scale = 20;
> FormatDouble.Template = TextData(value='#');
>
> Dato.SetValue(FormatDouble.DecodeDouble(self.PKg));
>
> PKg is a widget DataField, whose mapped type is
> TextData with input mask float. When I write 1.12
> into the widget the variable Data is
> 1.1200000000000001, and I can't understand it. I
> would like that variable Data was 1.12.
>
> Could anybody to explain it?
>
> Thank you very much.
>
For the archives, go to: http://lists.xpedior.com/forte-users and
use
the login: forte and the password: archive. To unsubscribe, send in
a new
email the word: 'Unsubscribe' to:
forte-users-requestlists.xpedior.com -
HELP!! Don't understand why my new phone won't work!!
HELP!! I just brought my iPhone home and went through the activation process. Everything was fine. Then all of a sudden, where the bars for service are... it says "Searching" and won't stop. I also can't get into anything. I press on the screen... nothing. I reset it twice... nothing. It's still doing it. I don't understand why and I can't speak to anyone in technical support right now. Has this happened to anyone else? I just want to cry because I bought this phone a few hours ago and it already is giving me crap! Someone help me!!!
it's a new account, but I was sending texts and everything was fine. now all of a sudden it keeps going on and off and won't let me do anything. Just says "searching"
it's really ticking me off!!! no one said there might be problems while activating it. I didn't pay this much money for a phone I can't even use! -
Don't understand why WSDL isn't valid
In Workshop 9.2, I'm developing an annotation-based web service. I imported my schemas and generated the xmlbeans, and after setting my input and output parameters in the service class, I tried to generate the WSDL from the service. For some reason, the WSDL is not valid, and I don't understand why. I'm sure it's a namespace issue, but I don't see it.
The enclosed WSDL is somewhat paraphrased from the generated WSDL.
On line 76 (marked with a comment), there is the first of several errors. It says:
"The input element is referencing an undefined message 'overrideRequest'. Check that the message name and namespace are correct and that the message has been defined."
Here is the WSDL:
<?xml version='1.0' encoding='UTF-8'?>
<s0:definitions name="SampleServiceDefinitions"
targetNamespace="http://schemas.wamu.com/Sample.wsdl"
xmlns=""
xmlns:s0="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://schemas.wamu.com/Sample.wsdl"
xmlns:ratings="http://schemas.wamu.com/2006/07/LoanSampleRequest"
xmlns:questions="http://schemas.wamu.com/2006/07/QuestionsRequest"
xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
<s0:types>
<xs:schema targetNamespace="http://schemas.wamu.com/2006/07/LoanSampleRequest"
xmlns:ratings="http://schemas.wamu.com/2006/07/LoanSampleRequest"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="loanSampleRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref="ratings:loanProperties"/>
</xs:sequence>
<xs:attribute name="modelVersion" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="loanSampleResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="ratings:loanProperties"/>
<xs:element ref="ratings:messages"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="loanProperties">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="ratings:property"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="property">
<xs:complexType>
<xs:sequence>
<xs:element ref="ratings:key"/>
<xs:element ref="ratings:value"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="key" type="xs:string"/>
<xs:element name="value" type="xs:string"/>
<xs:element name="messages">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="ratings:message"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="message">
<xs:complexType mixed="true">
<xs:attribute name="level" type="xs:string"/>
<xs:attribute name="fieldName" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
</s0:types>
<s0:message name="overrideRequest">
<s0:part element="ratings:loanSampleRequest" name="parameters"/>
</s0:message>
<s0:message name="overrideRequestResponse">
<s0:part element="ratings:loanSampleResponse" name="parameters"/>
</s0:message>
<s0:message name="ratingsRequest">
<s0:part element="ratings:loanSampleRequest" name="parameters"/>
</s0:message>
<s0:message name="ratingsRequestResponse">
<s0:part element="ratings:loanSampleRequest" name="parameters"/>
</s0:message>
<s0:portType name="Sample">
<s0:operation name="overrideRequest">
<s0:input message="tns:overrideRequest"/> <!-- 76 -->
<s0:output message="overrideRequestResponse"/>
</s0:operation>
<s0:operation name="ratingsRequest" parameterOrder="parameters">
<s0:input message="ratingsRequest"/>
<s0:output message="ratingsRequestResponse"/>
</s0:operation>
</s0:portType>
<s0:binding name="SampleServiceSoapBinding" type="tns:Sample">
<s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<s0:operation name="overrideRequest">
<s2:operation soapAction="" style="document"/>
<s0:input>
<s2:body parts="parameters" use="literal"/>
</s0:input>
<s0:output>
<s2:body parts="parameters" use="literal"/>
</s0:output>
</s0:operation>
<s0:operation name="ratingsRequest">
<s2:operation soapAction="" style="document"/>
<s0:input>
<s2:body parts="parameters" use="literal"/>
</s0:input>
<s0:output>
<s2:body parts="parameters" use="literal"/>
</s0:output>
</s0:operation>
</s0:binding>
<s0:service name="SampleService">
<s0:port binding="tns:SampleServiceSoapBinding" name="SampleSoapPort">
<s2:address location="http://localhost:7001/Sample/Sample"/>
</s0:port>
</s0:service>
</s0:definitions>
--------------------After I made these changes and re-validated, I get a dialog that says "The WSDL file is valid however warnings have been issued. See the Problems view for a list of the validation warnings", and I see the following in the Problems list:
IWAE0053E An internal error has occurred running validation on project:RiskRatingContainer]:RiskRatingContainer, check the log file for details
In in my WSDL editor, the lines in question still have a red circle with a white "x" in the left margin, and the tooltip still reports the same errors as before.
In the "Error Log" view, I see the following:
*** ERROR ***: Thu Feb 22 12:10:09 PST 2007 org.eclipse.wst.validation.internal.core.ValidationException: IWAE0053E An internal error has occurred running validation on project:RiskRatingContainer]:RiskRatingContainer, check the log file for details
Just in case, I'll include my current WSDL again here.
<?xml version='1.0' encoding='UTF-8'?>
<s0:definitions name="SampleServiceDefinitions"
targetNamespace="http://schemas.wamu.com/Sample.wsdl"
xmlns=""
xmlns:s0="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://schemas.wamu.com/Sample.wsdl"
xmlns:ratings="http://schemas.wamu.com/2006/07/LoanSampleRequest"
xmlns:questions="http://schemas.wamu.com/2006/07/QuestionsRequest"
xmlns:s2="http://schemas.xmlsoap.org/wsdl/soap/">
<s0:types>
<xs:schema targetNamespace="http://schemas.wamu.com/2006/07/LoanSampleRequest"
xmlns:ratings="http://schemas.wamu.com/2006/07/LoanSampleRequest"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="loanSampleRequest">
<xs:complexType>
<xs:sequence>
<xs:element ref="ratings:loanProperties"/>
</xs:sequence>
<xs:attribute name="modelVersion" type="xs:integer" use="optional"/>
</xs:complexType>
</xs:element>
<xs:element name="loanSampleResponse">
<xs:complexType>
<xs:sequence>
<xs:element ref="ratings:loanProperties"/>
<xs:element ref="ratings:messages"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="loanProperties">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" ref="ratings:property"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="property">
<xs:complexType>
<xs:sequence>
<xs:element ref="ratings:key"/>
<xs:element ref="ratings:value"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="key" type="xs:string"/>
<xs:element name="value" type="xs:string"/>
<xs:element name="messages">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" ref="ratings:message"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="message">
<xs:complexType mixed="true">
<xs:attribute name="level" type="xs:string"/>
<xs:attribute name="fieldName" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:schema>
</s0:types>
<s0:message name="overrideRequest">
<s0:part element="ratings:loanSampleRequest" name="parameters"/>
</s0:message>
<s0:message name="overrideRequestResponse">
<s0:part element="ratings:loanSampleResponse" name="parameters"/>
</s0:message>
<s0:message name="ratingsRequest">
<s0:part element="ratings:loanSampleRequest" name="parameters"/>
</s0:message>
<s0:message name="ratingsRequestResponse">
<s0:part element="ratings:loanSampleRequest" name="parameters"/>
</s0:message>
<s0:portType name="Sample">
<s0:operation name="overrideRequest">
<s0:input message="tns:overrideRequest"/> <!-- 76 -->
<s0:output message="tns:overrideRequestResponse"/>
</s0:operation>
<s0:operation name="ratingsRequest" parameterOrder="parameters">
<s0:input message="tns:ratingsRequest"/>
<s0:output message="tns:ratingsRequestResponse"/>
</s0:operation>
</s0:portType>
<s0:binding name="SampleServiceSoapBinding" type="tns:Sample">
<s2:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<s0:operation name="overrideRequest">
<s2:operation soapAction="" style="document"/>
<s0:input>
<s2:body parts="parameters" use="literal"/>
</s0:input>
<s0:output>
<s2:body parts="parameters" use="literal"/>
</s0:output>
</s0:operation>
<s0:operation name="ratingsRequest">
<s2:operation soapAction="" style="document"/>
<s0:input>
<s2:body parts="parameters" use="literal"/>
</s0:input>
<s0:output>
<s2:body parts="parameters" use="literal"/>
</s0:output>
</s0:operation>
</s0:binding>
<s0:service name="SampleService">
<s0:port binding="tns:SampleServiceSoapBinding" name="SampleSoapPort">
<s2:address location="http://localhost:7001/Sample/Sample"/>
</s0:port>
</s0:service>
</s0:definitions>
--------------------------- -
I don't understand why they ask for payment for all the applications labelled free. Regards
I don't understand why they ask for payment for all the applications labelled free. Regards
How to Get Apps From the App Store Without a Credit Card
http://ipadhelp.com/ipad-help/how-to-get-free-apps-from-the-app-store-without-a- credit-card/
Creating an iTunes Store, App Store, iBookstore, and Mac App Store account without a credit card
http://support.apple.com/kb/ht2534
Why can’t I select None when I edit my payment information?
http://support.apple.com/kb/ts5366
If None is not available - On your computer launch iTunes and click “iTunes Store” in the left navigation pane. Click the “down arrow” next to your name at the top right side of the page and click “Account.” Enter your username and password and click “View Account” to log into your account information. Next to your Payment Type, click “Edit.” Select the “None” button and click “Done.” Confirm that your card has been removed by returning to the Apple account information screen. Under Payment Type, it should say that there is no credit card on file.
iTunes Store: Changing your payment information
http://support.apple.com/kb/HT1918
iTunes Store Accepted Forms of Payment
http://support.apple.com/kb/HT5552
Cheers, Tom -
I don't understand why I can't download for free the apps designed by Apple, such as Pages and Numbers, which are free with iOS 7. Can anyone help me?
The apps are free with iOS 7 if you purchased a new device after September 2013. The apps do not come free just because you are running iOS 7 now. Did you purchase or receive a new iPad recently?
If you did, are you using the same Apple ID to get the apps that you used to activate the iPad? If you are, sign out of your ID, restart your iPad, sign in again and go back to the App Syore and see if the apps show up as free.
Settings>iTunes & App Store>tap your ID and sign out. Restart the iPad and go back to the settings and sign in again. -
Dear
I try to create my Account ID....and i don't understand why i have to put payment? before my friend create Account ID don't have to put payment they still can create account ID... and now i buy iphone but i don't have credit card that mind i can't not do itHi,
This Link explains how to Set Up an Account ID... without a credit card...
http://support.apple.com/kb/HT2534
Hope it helps,
Cheers,
Maybe you are looking for
-
Lost contacts when updating to OS 5
I updated my iphone 4g to OS5 last night and lost all of my contacts. Is there a way to download my contacts from my imac back onto my phone?
-
Bank Account tab is disables in supplier site form
Hi All, we have oracle apps 11i (11.5.10.2). In Supplier Master form, BANK ACCOUNTS tab is disabled at site level right now in AP. How can I enable it ? regards sanjay
-
Enable print option for transaction IW33
Hi, Is there any way by which we can make the print option enabled in the transaction IW33 screen?. It is currently greyed out and the requirement is to enable this option so that the user can take print outs from transaction IW33. This option is ena
-
Hey, I just want to confirm that if i) on an ios device I have selected to use cloud but NOT sync any of the listed items (mail, contacts etc..) ii) on the Mac I have selected sync everything, iii) and on the same ios device I select having the backu
-
Fiance's computer no longer functional
My fiance doesn't like doing updates on her macbook, and after I did the updates that were needed, her computer is 90% unusable. The model is a Macbook 3,1 2.2 ghz 2 gb ram The updates that I ran were: Security Update 2012-002 (version 1.0) Java for