A small Java Problem for java Experts

Hi Guys...
I have a small problem with my program...
Tha program I am using consist of several frames where one invokes the other in row.
These are the classes I am using:
the FIRST class://THIS CLASS IS NOT COMPLETE
import java.io.*;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
* LabelDemo.java is a 1.4 application that needs one other file:
* images/middle.gif
public class CSVloader extends JPanel implements ActionListener {
     ImageIcon icon ;
     JLabel label;
JButton theButton1;
JButton saveButton;
JButton displayButton;
JButton displayStyleButton;
JFileChooser fc;
final boolean shouldFill = true;
final boolean shouldWeightX = true;
public CSVloader() {
GridBagLayout gridbag = new GridBagLayout();
GridBagConstraints c = new GridBagConstraints();
setLayout(gridbag);
if (shouldFill) {
//natural height, maximum width
c.fill = GridBagConstraints.HORIZONTAL;
theButton1 = new JButton("Choose source File");
theButton1.addActionListener(this);
if (shouldWeightX) {
c.weightx = 0.5;
c.gridx = 0;
c.gridy = 0;
gridbag.setConstraints(theButton1, c);
add(theButton1);
displayStyleButton = new JButton("CSV Display style");
displayStyleButton.addActionListener(this);
c.gridx = 0;
c.gridy = 2;
gridbag.setConstraints(displayStyleButton, c);
add(displayStyleButton);
displayButton = new JButton("Display");
displayButton.addActionListener(this);
c.gridx = 1;
c.gridy = 0;
gridbag.setConstraints(displayButton, c);
add(displayButton);
saveButton = new JButton("Save");
saveButton.addActionListener(this);
c.gridx = 0;
c.gridy = 1;
gridbag.setConstraints(saveButton, c);
add(saveButton);
icon = new ImageIcon("c:/applets/CSVlogo.gif");
//Create the first label.
label = new JLabel(icon);
c.ipady = 45; //make this component tall
c.weightx = 0.0;
c.gridwidth = 1;
c.gridx = 1;
c.gridy = 1;
gridbag.setConstraints(label, c);
add(label);
fc = new JFileChooser();
public Dimension getDimension(int hight, int width) {
Dimension theDimension = new Dimension(hight,width);
return theDimension;
public void actionPerformed(ActionEvent e) {
//Handle open button action.
if (e.getSource() == theButton1) {
int returnVal = fc.showOpenDialog(CSVloader.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
//This is where a real application would open the file.
//Handle save button action.
} else
if (e.getSource() == displayButton) {
     try {
Runtime.getRuntime().exec("cmd /c start " + "c:\\applets\\displayData.html");
catch(IOException io)
System.err.println("Caught IOException: " +
     io.getMessage());
}else
if (e.getSource() == displayStyleButton)
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("Display Style");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
DisplayStyle newContentPane = new DisplayStyle();
newContentPane.setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane);
//Display the window.
frame.pack();
frame.setVisible(true);
else
if (e.getSource() == saveButton) {
     int returnVal = fc.showOpenDialog(CSVloader.this);
if (returnVal == JFileChooser.APPROVE_OPTION) {
File saveFile = fc.getSelectedFile();
//This is where a real application would open the file.
public static void main(String[] args) {
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("LabelDemo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
CSVloader newContentPane = new CSVloader();
newContentPane.setBackground(Color.WHITE);
newContentPane.setOpaque(true);
frame.setContentPane(newContentPane);
//Display the window.
frame.pack();
frame.setVisible(true);
// Runtime.getRuntime().exec("cmd /c start " + "....\\docs\\index.html");
this is the SECOND class:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class DisplayStyle extends JPanel implements ActionListener{
     public static final int FIRST_OPTION = 0;
     public static final int SECOND_OPTION = 1;
     public static final int THIRD_OPTION = 2;
     public static final int THE_BUTTON_OPTION =3;
public static final int ERROR = -1;
     public int selectedOption = ERROR;
     static String table = "Table";
     static String tableNoBorders = "Table without Borders";
     static String highlightedTable = "Highlighted Table without Borders";
     public JRadioButton theTable;
     public JRadioButton theTable2;
     public JRadioButton theTable3;
     public JButton theButton;
     public String theName;
     public DisplayStyle ()
     theTable = new JRadioButton(table);
     theTable.setActionCommand(""+ FIRST_OPTION);
     theTable.addActionListener(this);
     theTable.setMnemonic(KeyEvent.VK_B);     
theTable.setSelected(true);
theTable2 = new JRadioButton(tableNoBorders);
theTable2.setActionCommand(""+ SECOND_OPTION);
     theTable2.addActionListener(this);
     theTable2.setMnemonic(KeyEvent.VK_B);     
theTable3 = new JRadioButton(highlightedTable);
theTable3.setActionCommand(""+ THIRD_OPTION);
     theTable3.addActionListener(this);
     theTable3.setMnemonic(KeyEvent.VK_B);     
theButton = new JButton("OK");
theButton.setActionCommand(""+ THE_BUTTON_OPTION);
theButton.addActionListener(this);
     ButtonGroup group = new ButtonGroup();
group.add(theTable);
group.add(theTable2);
group.add(theTable3);
JLabel theLabel = new JLabel("Choose the style of Display");
JPanel radioPanel = new JPanel(new GridLayout(0, 1));
radioPanel.add(theLabel);
radioPanel.add(theTable);
radioPanel.add(theTable2);
radioPanel.add(theTable3);
radioPanel.add(theButton);
add(radioPanel, BorderLayout.LINE_START);
     public void actionPerformed (ActionEvent e) {
     if(e.getSource() == theButton)
     JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame1 = new JFrame("The Format");
frame1.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Formats newFormat = new Formats();
newFormat.setOpaque(true); //content panes must be opaque
frame1.setContentPane(newFormat);
//Display the window.
frame1.pack();
frame1.setVisible(true);
     selectedOption = Integer.parseInt(e.getActionCommand().trim());
     public DisplayStyle getInstance(){
          return this;      
this is the THIRD class:
mport java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class Formats extends JPanel implements ActionListener{
     public static final int FIRST_OPTION = 0;
     public static final int SECOND_OPTION = 1;
     public static final int THIRD_OPTION = 2;
     public static final int FOURTH_OPTION = 4;
     public static final int THE_BUTTON_OPTION =3;
public static final int ERROR = -1;
     public int selectedOption = ERROR;
     static String standardFormat = "Date first";
     static String timeFirstFormat = "Time First";
     static String typeFirstFormat = "Type of call first";
     static String extFirstFormat = "Extension first";
     public JButton theButton;
     public JRadioButton theStandardButton1 ;
     public JRadioButton theTimeButton;
     public JRadioButton theTypeButton;
     public JRadioButton theExtButton ;
     public Formats()
theStandardButton1 = new JRadioButton(standardFormat);
     theStandardButton1.setMnemonic(KeyEvent.VK_B);     
theStandardButton1.setSelected(true);
     theTimeButton = new JRadioButton(timeFirstFormat);
     theTimeButton.setMnemonic(KeyEvent.VK_B);     
theTypeButton = new JRadioButton(typeFirstFormat);
     theTypeButton .setMnemonic(KeyEvent.VK_B);     
theExtButton = new JRadioButton(extFirstFormat);
     theExtButton.setMnemonic(KeyEvent.VK_B);     
     ButtonGroup group = new ButtonGroup();
group.add(theStandardButton1);
group.add(theTimeButton);
group.add(theTypeButton);
group.add(theExtButton);
JLabel newLabel = new JLabel("Choose the Format type for the data to be displayed");
theButton = new JButton("OK");
theButton.addActionListener(this);
theButton.setActionCommand("" + THE_BUTTON_OPTION);
JPanel radioPanel = new JPanel(new GridLayout(0, 1));
radioPanel.add(newLabel);
radioPanel.add(theStandardButton1);
radioPanel.add(theTimeButton);
radioPanel.add(theTypeButton);
radioPanel.add(theExtButton);
radioPanel.add(theButton);
add(radioPanel, BorderLayout.LINE_START);      
     public void actionPerformed (ActionEvent e) {
     if(e.getSource() == theButton)
     JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("The Font");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
TableFonts newFont = new TableFonts();
newFont.setOpaque(true); //content panes must be opaque
frame.setContentPane(newFont);
//Display the window.
frame.pack();
frame.setVisible(true);
     selectedOption = Integer.parseInt(e.getActionCommand().trim());
     public Formats getInstance(){
          return this;      
and the last class:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class TableFonts extends JPanel implements ActionListener{
     static String standardFont = "Standard Font";
     static String boldFont = "Bold Font";
     static String italicFont = "Italic Font";
     static String monospaceFont = "Monospace Font";
     public      JRadioButton theStandardButton ;
     public JRadioButton theBoldButton;
     public JRadioButton theItalicButton;
     public JRadioButton theMonospaceButton ;
     public TableFonts()
theStandardButton = new JRadioButton(standardFont);
     theStandardButton.setMnemonic(KeyEvent.VK_B);     
theStandardButton.setSelected(true);
     theBoldButton = new JRadioButton(boldFont);
     theBoldButton.setMnemonic(KeyEvent.VK_B);     
theItalicButton = new JRadioButton(italicFont);
     theItalicButton .setMnemonic(KeyEvent.VK_B);     
theMonospaceButton = new JRadioButton(monospaceFont);
     theMonospaceButton.setMnemonic(KeyEvent.VK_B);     
     ButtonGroup group = new ButtonGroup();
group.add(theStandardButton);
group.add(theBoldButton);
group.add(theItalicButton);
group.add(theMonospaceButton);
theStandardButton.addActionListener(this);
theBoldButton.addActionListener(this);
theItalicButton.addActionListener(this);
theMonospaceButton.addActionListener(this);
JLabel newLabel = new JLabel("Choose the correct font for the data to be displayed");
JPanel radioPanel = new JPanel(new GridLayout(0, 1));
radioPanel.add(newLabel);
radioPanel.add(theStandardButton);
radioPanel.add(theBoldButton);
radioPanel.add(theItalicButton);
radioPanel.add(theMonospaceButton);
add(radioPanel, BorderLayout.LINE_START);
     public void actionPerformed(ActionEvent e) {
The problem I am getting is the Number format exception when the OK button of the class Formats is clicked...
here is the error I am getting:
java.lang.NumberFormatException: For input string: "OK"
at java.lang.NumberFormatException.forInputString(NumberFormatException.
java:48)
at java.lang.Integer.parseInt(Integer.java:426)
at java.lang.Integer.parseInt(Integer.java:476)
at Formats.actionPerformed(Formats.java:80)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
64)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1817)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:419)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
istener.java:245)
at java.awt.Component.processMouseEvent(Component.java:5134)
at java.awt.Component.processEvent(Component.java:4931)
at java.awt.Container.processEvent(Container.java:1566)
at java.awt.Component.dispatchEventImpl(Component.java:3639)
at java.awt.Container.dispatchEventImpl(Container.java:1623)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
at java.awt.Container.dispatchEventImpl(Container.java:1609)
at java.awt.Window.dispatchEventImpl(Window.java:1590)
at java.awt.Component.dispatchEvent(Component.java:3480)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
COULD YOU GUYS PLEASE TELL ME HOW TO GET AROUND THIS PROBLEM:
THANKS...

It's in this line:
selectedOption = Integer.parseInt(e.getActionCommand().trim());
Kind regards,
  Levi
PS. have you noticed the [code][code[i]] tags?

Similar Messages

  • Where to take  java exam for Java programmer certified

    HI,
    I wonder where to take java exam for Java programmer certified?
    Regards,
    Jason

    http://suned.sun.com/US/certification/

  • Installation problem for Java EE 5 SDK Update 2

    Hi ,
    I have jdk1.5.0_12 (J2SE) installed on my Windows XP. Now i am trying to install J2EE on my machine.I tried to install it twice but it comes to a halt after completing 45% at the same jar file. Following is the link which shows it comes to a halt.
    http://img141.imageshack.us/my.php?image=j2eeinstallhangupav8.png
    Also I wanted to know if I uninstall the J2SE and then install only J2EE will that be fine.Because I believe J2EE is a superset of J2SE ?
    Thanks in advance.

    For the difference between Java EE and Java SE read here:
    http://java.sun.com/javaee/5/docs/firstcup/doc/p3.html
    For the installation problem, I don�t know how to help you... maybe here you can find some ideas:
    http://forum.java.sun.com/thread.jspa?threadID=738559
    Andrea

  • What Java compiler for Java Card development ?

    What Java compiler and options should be used for Java Card development with the goal of generating correct, and (secondarily) small or/and fast code after conversion to Java Card bytecode using converter ?
    In particular
    - Is use of JDK 7 approved by Oracle for Java Card development? That would solve security problems associated with (the web components of the JRE of) some earlier JDK, including the latest JDK6. The JCDK 3.0.4 release notes states "+the commercial version of Java Development Kit (JDK software) version 6 Update 10 (JDK 6 Update 10) or later is required+, but that does not answer that question.
    - Anyone had _bad_ experience (like incorrect or disastrous code) with the Java compiler bundled with Eclipse ? I have seen at least one case where org.eclipse.jdt.core_3.7.3.v20120119-1537.jar produced slightly more compact code than javac.
    - Anyone had _bad_ experience with javac in jdk1.3 ? In an applet involving a "finally" clause, I've seen it generating more compact code than later javac (which in my test triplicated the code for the finally clause).

    What Java compiler and options should be used for Java Card development with the goal of generating correct, and (secondarily) small or/and fast code after conversion to Java Card bytecode using converter ?-target -source may be required to generate compatible byte code. Depending on the CAP file converter being used debug information may also help. Remember that Java Card is a subset of the Java language (also there are short opcodes that Java doesn't have etc) so a lot of the work for optimisation is done by the converter or the JCRE. You can look at the JCA code generated to determine what works best for your applets. There are also some ways of stripping out dead code etc from JCA files (return statements after a throw etc) to reduce your code size. Most of the speed optimisations come from your code (avoiding context switches and unnecessary security/access checks).
    The compactness of your Java Card binary may not be directly related to the size of your compiled Java code. It can depend on the converter you use and any optimisaitons the JCRE might try to do when the code is loaded.
    - Is use of JDK 7 approved by Oracle for Java Card development? That would solve security problems associated with (the web components of the JRE of) some earlier JDK, including the latest JDK6. Java Card does not use any of the libraries from the JDK/JRE. All of the libraries are provided by the JCRE on the smartcard.
    The JCDK 3.0.4 release notes states "+the commercial version of Java Development Kit (JDK software) version 6 Update 10 (JDK 6 Update 10) or later is required+, but that does not answer that question.Anything above JDK6u10 is supported. If you use Java 7 you may need to add a -source and -target flag when compiling.
    - Anyone had _bad_ experience (like incorrect or disastrous code) with the Java compiler bundled with Eclipse ? I have seen at least one case where org.eclipse.jdt.core_3.7.3.v20120119-1537.jar produced slightly more compact code than javac.We generally use the Eclipse compiler as we find that we get more deterministic builds. When CAP files are sent for security review it is helpful to have the reviewer able to generate a CAP file that matches the one you sent to confirm the binary is what you say it is.
    - Anyone had _bad_ experience with javac in jdk1.3 ? In an applet involving a "finally" clause, I've seen it generating more compact code than later javac (which in my test triplicated the code for the finally clause).We do not use anything less than Java 6 for compilation.
    - Shane

  • Cannot access Yahoo Kids/indicates Java problem/but Java is installed

    problems playing yahoo games/indicates java problem/java is installed and enabled but cannot get game to come up.

    With details provided I am not sure what problem you are facing.
    Here is generic advise on troubleshooting strategy.
    Please provide basic details:
    1) OS version and architecture
    2) browser's you are tried (and their versions)
    3) JRE version you have installed (for each architecture)
    Assuming you have Java 7 update 7 installed (latest what java.com offers) please report
    4) what version is reported on
    http://www.java.com/en/download/installed.jsp?detect=jre
    5) Can you run some other sample applets?
    E.g. http://rintintin.colorado.edu/~epperson/Java/TicTacToe.html
    Check java troubleshooting guide for tips:
    http://docs.oracle.com/javase/7/docs/webnotes/tsg/TSG-Desktop/html/plugin.html#gcexdf
    Specifically start with enabling full tracing details and java console. Do you see it popping when you try to start your target application?
    Are there any errors? (If you do not see console then it may be exiting too soon - check if trace file is created in the trace folder).

  • Tips on how to write efficient  java code for java mapping

    hi
    I do not have much knowledge in Java
    Can anybody tell me some tips on how to write efficient and optimised java code to be used in java mapping
    Thanks,
    Loveena

    hi D'za,
    JAVA in xi
    A very important place where you will use JAVA in XI is while doing your Mapping. There will be cases when JAVA MAPPING is the best solution to go for. There are 2 types of Parsers available for JAVA Mapping. DOM Parser and SAX parser. Just got through the following links to understand more on Java Mapping and the APIs available.http://java.sun.com/j2se/1.4.2/docs/api/javax/xml/parsers/package-summary.html http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/Document.html http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    JAVA mapping -
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-i /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii /people/ravikumar.allampallam/blog/2005/06/24/convert-any-flat-file-to-any-idoc-java-mapping /people/amol.joshi2/blog/2006/03/10/think-objects-when-creating-java-mappings /people/sameer.shadab/blog/2005/09/29/testing-abap-mapping
    sample code for java mapping
    Re: Example code DOM PARSER API -
    http://java.sun.com/j2se/1.4.2/docs/api/org/w3c/dom/package-frame.html DOM --- /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs tutorial sax and dom
    For a tutorial on the methods of SAX and DOM http://java.sun.com/webservices/docs/1.1/tutorial/doc/
    SAX AND dom PARSER ( BY thorsten) -
    example /people/thorsten.nordholmsbirk/blog/2006/08/10/using-jaxp-to-both-parse-and-emit-xml-in-xi-java-mapping-programs java mapping example ( testing and debugging) /people/stefan.grube/blog/2006/10/23/testing-and-debugging-java-mapping-in-developer-studio
    regards
    biplab
    Use a Good Subject Line, One Question Per Posting - Award Points

  • Which java Api for Java Wallet Subtitute

    Hello,
    i would like make a web site who make secure transaction beween applet and a bank remote using credit Card.
    I don't know which technology to use since Java Wallet has been discontinued.
    Does someone know a official Sun Java platform for use Secure Transfert Electronic (SET) Protocol on web site???
    Thank you.

    Hello,
    i would like make a web site who make secure transaction beween applet and a bank remote using credit Card.
    I don't know which technology to use since Java Wallet has been discontinued.
    Does someone know a official Sun Java platform for use Secure Transfert Electronic (SET) Protocol on web site???
    Thank you.

  • Java Updates for Java 2 Runtime Enviroment, SE V1.4.2_08

    Hello everyone!
    I want to update java in a server 2003, with this current version Java 2 Runtime Enviroment, SE V1.4.2_08. Do you have the link where I can download this latest version.
    I was reading this page, regarding Oracle Java SE Critical Patch Update Advisory - February 2013 Link here: http://www.oracle.com/technetwork/topics/security/javacpufeb2013-1841061.html, by reading this, I know my version is affected, as I will copy and paste here:
    Affected product releases and versions:
    Java SE      Patch Availability
    JDK and JRE 7 Update 11 and earlier      Java SE
    JDK and JRE 6 Update 38 and earlier      Java SE
    JDK and JRE 5.0 Update 38 and earlier      Java SE
    SDK and JRE 1.4.2_40 and earlier      Java SE
    JavaFX 2.2.4 and earlier      JavaFX
    But whenever I try to find updates for this version, I only see Java 6 or 7 available. Thanks everybody for your support!

    996230 wrote:
    Hello everyone!
    I want to update java in a server 2003, with this current version Java 2 Runtime Enviroment, SE V1.4.2_08. Do you have the link where I can download this latest version.Java 1.4 is long end of life. You can still download it from the archives, but you won't be able to get the latest patch versions of it - that is only for paying customers.
    http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html
    I would consider upgrading to Java 7 if I were you. Any software that still needs Java 1.4 is a security risk.

  • Does it give any java parser for java programming guidelines?

    i've got a parser for c/c++ programs (codecheck from abraxas) from 1996, i think. but i didn't find anyone for java. does anyone know where from i'm able to download one?

    http://www.experimentalstuff.com/Technologies/JavaCC/

  • Exercise problems for java

    1)Hi. i was trying to find some exercises on writing programs in java. i wanted to see how much i have learned about this language. i searched on google to see if they have exercise problems like for eg
    write a program in java that reads a data file and sort the file in ascending order.
    any help will be really appreciated.
    2) any applet books available online ?

    i google and can't find anything(google, ask, yahoo)
    Thanks alot for that site. Looks very interesting. from basic to advance but what if i cannot debug a program after several of hours ? i dont have to use the forums all the time. i was wondering if i can get a site with java questions and solutions also in java if i get stuck.
    Message was edited by:
    fastmike

  • Compiling problem for java.

    Hi, all,
    I am new user of Java SDK standard edition. I have installed the J2sdk1_3_1_02 (standard edtion) under a certain directory on Solaris system. I also set the JAVA_HOME to the ../j2sdk1_3_1_02, and CLASSPATH to ../j2sdk1_3_1_02/lib/tools.jar.
    I finished a simple example of "Helloworld.java", which can be compiled successfully. But when I use "java Helloworld" to run it, the erro message appeas as follows:
    Unable to initialize threads: cannot find class java/lang/Thread
    I need your people 's help, thanks a lot.
    Kevin

    Dear Cmouttet,
    Thank you very much for the help. I followed your suggestion to change my setting about runtime environment in my classpath.
    But the error still appears:
    SIGSEGV 11* segmentation violation
    si_signo [11]: SIGSEGV 11* segmentation violation
    si_errno [0]: Error 0
    si_code [1]: SEGV_ACCERR [addr: 0x0]
    Full thread dump:
    Segmentation Fault(coredump)
    The following is that simple java program of Helloworld:
    class Helloworld
    public static void main(String args[])
    System.out.println("Hello world, this xxd!");
    Could you tell me how to do in next step to finish my fist trial of java technology?
    Thanks for any reply!
    kevin

  • Java Problems for E72!!!

    Hello I really need help. I downloaded apps like link to Facebook, or even E Buddy Chats. But every time after I sign in, it cannot load. It always say my internet connection fail. And ask me to on my Java script so that can be logged in. But i can't find where to on the Java thing. Please help me!

    @Shinwi
    AFAIK it should be enabled by default, open your browser > Options > Settings > General - scrol down to Java/ECMA script which should be "Enabled".
    Happy to have helped forum with a Support Ratio = 42.5

  • This is a problem for the experts around here

    I really need help with this - I have been trying to get this
    to work for 2 weeks now and so far no one has been able to help.
    See
    http://www.kirupa.com/forum/showthread.php?t=248030
    and
    http://www.kirupa.com/forum/showthread.php?t=249806
    for my previous attempts at figuring this out.
    I am attempting to use components in my flash movie, but when
    I test the movie, none of the labels show up.
    The components are placed into a movie clip that is
    instantiated and manipulated at runtime - in other words, it exists
    only in the library and is called into existence at runtime through
    the attachMovie method.
    On the side of the screen are buttons that make this MC move
    around the screen.
    These components I am trying to use are not being rotated,
    just moved (because they are inside a MC that is being moved). I've
    tested this and have determined that moving a component at runtime
    does not cause the text to disappear - only rotating it does.
    If you need it, I have uploaded the
    source
    file
    . Just run it and you'll see the component - with no text
    displaying. The rows should be labeled "1" "2" and "3".
    If you get this far (downloading and looking at the source
    fla) I will go the distance here and point you directly to where
    this object is located. Simply open the fla's library and double
    click on the
    searchAreaContent
    movieclip inside the
    search panel
    folder. You will find the component in there. Thanks in
    advance for any help!

    Daleweb,
    The method to create components and place them on the stage
    is this (example
    is for a checkBox component):
    import mx.controls.CheckBox;
    placeHolder.createClassObject(CheckBox, "myCB1",
    {label:"Yes"});
    myCB1._x = 100;
    myCB1._y = 100;
    I did not download your zip file however, when you load
    components into
    child clips, they can lose their functionality. Instead, load
    them at
    level0.
    hth
    Dan Mode
    ->Adobe Community Expert
    *Flash Helps*
    http://www.smithmediafusion.com/blog/?cat=11
    *THE online Radio*
    http://www.tornadostream.com
    *Must Read*
    http://www.smithmediafusion.com/blog
    "dalewb" <[email protected]> wrote in
    message
    news:[email protected]...
    >I really need help with this - I have been trying to get
    this to work for 2
    > weeks now and so far no one has been able to help. I am
    attempting to use
    > components in my flash movie, but when I test the movie,
    none of the
    > labels
    > show up.
    >
    > The components are placed into a movie clip that is
    instantiated and
    > manipulated at runtime - in other words, it exists only
    in the library and
    > is
    > called into existence at runtime through the attachMovie
    method.
    >
    > On the side of the screen are buttons that make this MC
    move around the
    > screen.
    >
    > These components I am trying to use are not being
    rotated, just moved
    > (because
    > they are inside a MC that is being moved). I've tested
    this and have
    > determined
    > that moving a component at runtime does not cause the
    text to disappear -
    > only
    > rotating it does.
    >
    > If you need it, I have uploaded the
    >
    http://www.dwbgallery.com/stuff/gamepal/tcg68c.zip
    > Just
    > run it and you'll see the component - with no text
    displaying. The rows
    > should
    > be labeled "1" "2" and "3".
    >
    > If you get this far (downloading and looking at the
    source fla) I will go
    > the
    > distance here and point you directly to where this
    object is located.
    > Simply
    > open the fla's library and double click on the
    >
    searchAreaContent
    > movieclip inside the
    search panel
    folder. You will find the
    > component in there. Thanks in advance for any help!
    >

  • [JAVA] problems with java and mysql

    Hi, i have already installed php + mysql and work's them fine, but i want to install java + mysql. I have downloaded eclipse and installed its, that's ok. I have download tomcat and, that's ok. I have download module jconnector and have copied the file .jar in the java home and set classpath. Run and compiled this source that's ok. At runtime the program ask: Impossible connection at the database, why ? It's the source of program:
    [JAVA]
    import java.sql.*;
    public class connessione {
    private String nomeDB; // Nome del Database a cui connettersi
    private String nomeUtente; // Nome utente utilizzato per la connessione al Database
    private String pwdUtente; // Password usata per la connessione al Database
    private String errore; // Raccoglie informazioni riguardo l'ultima eccezione sollevata
    private Connection db; // La connessione col Database
    private boolean connesso; // Flag che indica se la connessione � attiva o meno
    public connessione(String nomeDB) { this(nomeDB, "", ""); }
    public connessione(String nomeDB, String nomeUtente, String pwdUtente) {
    this.nomeDB = nomeDB;
    this.nomeUtente = nomeUtente;
    this.pwdUtente = pwdUtente;
    connesso = false;
    errore = "";
    // Apre la connessione con il Database
    public boolean connetti() {
    connesso = false;
    try {
    // Carico il driver JDBC per la connessione con il database MySQL
    Class.forName("com.mysql.jdbc.Driver");
    // Controllo che il nome del Database non sia nulla
    if (!nomeDB.equals("")) {
    // Controllo se il nome utente va usato o meno per la connessione
    if (nomeUtente.equals("")) {
    // La connessione non richiede nome utente e password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB);
    } else {
    // La connessione richiede nome utente, controllo se necessita anche della password
    if (pwdUtente.equals("")) {
    // La connessione non necessita di password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB + "?user=" + nomeUtente);
    } else {
    // La connessione necessita della password
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB + "?user=" + nomeUtente + "&password=" + pwdUtente);
    // La connessione � avvenuta con successo
    connesso = true;
    } else {
    System.out.println("Manca il nome del database!!");
    System.out.println("Scrivere il nome del database da utilizzare all'interno del file \"config.xml\"");
    System.exit(0);
    } catch (Exception e) { errore = e.getMessage(); }
    return connesso;
    public static void main(String [] args) {
    connessione a=new connessione("asta","root","");
    if(a.connetti())
    System.out.println("Connessione al database riuscita");
    else
    System.out.println("Connessione al database non riuscita");
    [JAVA]

    With this line I always pass the username and password also:
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB);
    db = DriverManager.getConnection("jdbc:mysql://localhost/" + nomeDB, useName, Password);
    Make sure you create your users in MySQL with the correct permissions

  • Lion/iMac problem for real experts!

    I have some bad trouble with my iMac 10.7 after installing Lion.
    First Lion (obviously) didn't install right. Mac OS X Programms (iCal, Safari, Mail, Softwareupdate et cetera) didn't work and crashed right after start.
    I decided to do a Recovery HD reinstall of Lion. The download went quite well it just didn't reinstall Lion.
    So for the next step I decided to save my data (Time machine also crashed so I did it manual) and formate my Mac HD out off the recovery HD to install Lion on the system.
    After doing that I tried the known way of installing Lion off the HD recovery window but it didnt install LIon again! Then I decided to reinstall Snow leopard but the mac ejects the install DVD immediatley so I cant do that.
    After starting the Mac it automatically goes into Revovery HD because there is nothing on the Hard Drive.
    I think my last chance now is to get the Mac back to factory settings, but I don't know how to do that.
    Anyone got a clue what to do wiith my problem? I am desperate because I didn't plan on killig my Mac with Lion!
    Hardware: iMac 21,5", 3,06Ghz Intel Core 2 Duo, 8GB RAM

    I think doing a fresh reinstall would be the wise way to go. However the reason most people have problems installing or updating their OS is if there was a prior problem. So my recommendation would be once your have reinstalled Snow Leopard to make sure it's running perfectly before re-attempting to install Lion.
    In order to start over you will need a back up of your Snow Leopard system, this should be on your Time Machine Backup or Bootable Clone. This will have all  your data files you will need. Just another heads up, always, Always, ALWAYS backup prior to any system update!!!! Things can and do go wrong.
    Assuming you have a viable backup then insert either the original Snow Leopard Install Disc that shipped with your computer or the SL upgrade DVD you purchased. Then restart the machine while holding down the Option key, choose the Install Disc and then choose  your language. Then click the Utilities menu and open Disk Utilities. In Disk Utilities select  your internal HD on the left pane then click the Erase tab. Ensure Format is set to Mac OS Extended (Journaled) and then click Erase. This will totally wipe your HD clean and will take a couple of minutes probably. After the HD has been wiped clean then exit DU and continue with the Install of Snow Leopard following the on-screen prompts. When it asks if you migrating from another Mac select yes and follow the prompts to restore from your backup. After the Installation has been done then navigate to 10.6.8 Update Combo and install the Combo Update. After that has run then run Software Update to ensure everything else is up-to-date. Finally after this is installed and is running smoothly then re-attempt to install Lion.
    NOTE: With any update to OS X it's smart to:
    a) BACKUP first !!!!!!!
    b) Disconnect all peripherals except the keyboard and mouse
    c) Repair Disk Permissions prior to and after the update.

Maybe you are looking for

  • How to prevent creation of billing docs for Zero Quantities

    Hello everyone, Could someone please help me with this. We have some invoices created with 'zero' quantities. We need to stop prining invoices for the invoices with zero quantities. Can we stop creating invoice for zero quantities. if yes , please le

  • My steam won't launch ever since I updated to Yosemite I don't know what is going on.

    Whenever I try to launch it, it says "Steam quit unexpectedly" I have tried redownloading it 5 times and have every software up to date. I also have tried deleting all my steam files and it still doesn't work. Here is a screenshot: I also downloaded

  • Error messages when downloading Itunes 10.5. HELP PLEASE!!!

    I keep getting two different error messages when downloading Itunes, first one says: An error occured during the installation of assembly "Microsoft.VC80.CRT,type="win32",version="8.0.507276195".publicKeyToken="1fc8b9 a1e18e3b",processorArchitecture=

  • HP recovery manager failed error code 45D

    Hey all, tryed to restore laptop to original settings. Popper up with error code 45D followed by ffff15 (something like that) any idea what this is? any solutions? happened when trying to back up Kind regards

  • Maximum LUNS in solaris 10,9

    Hi, Pl. let me know the maximum number of LUNS that can be added to a solaris 10 and solaris9 OS . I am using both Qlogic and Emulex fiber card.