Error: "Could not find the main class: Files\NetBeans"

I am working on a WorldWind mapping application but I think this issue is more of a straight Java question. I was attempting to add a web service reference by means of the NetBeans IDE. The reference compiled as it should have but then the application would not run. I deleted the reference, commented out all the code that used the web reference, basically restored all the code to how it was before trying to add the web service. The applicaiton still will not run with the message that it can't find the main class. I do, however, get a clean build. What should I do to fix this?
Here is the error: "Could not find the main class: Files\NetBeans"
thanks!

nigel25840 wrote:
I am working on a WorldWind mapping application but I think this issue is more of a straight Java question. I was attempting to add a web service reference by means of the NetBeans IDE. The reference compiled as it should have but then the application would not run. I deleted the reference, commented out all the code that used the web reference, basically restored all the code to how it was before trying to add the web service. The applicaiton still will not run with the message that it can't find the main class. I do, however, get a clean build. What should I do to fix this?
Here is the error: "Could not find the main class: Files\NetBeans"
thanks!Sounds like something (a .cmd file or .bat file, perhaps) is set up to launch NetBeans with a command line like this:
java -classpath ... c:\Program Files\NetBeans ...
So since the path has embedded space(s) in it, it thinks you are wanting to run a class named "Files\NetBeans", which does not exist.
You need someone there who knows what they are doing to look into it for you.

Similar Messages

  • Error:-could not find the main class programe will exit(Java virtual mach)

    Hi,
    i changed the mainfest file for an executive jar file(judge.jar) using the command on dos :-"jar cvfm judge.jar c:\judge\MAINFEST.MF -C judge/ ." , but when i run this jar file again after making changes in mainfest file it is not working. an error encounter like "could not find the main class programe will exit how to solve"(Java virtual machine launcher).please suggest me how to solve this error.
    Thanks
    Ashwani Gupta

    Hi,
    mainfest file has a entry like "main -class: judge.repository.corpus"
    please tell me the solution of this error i am doing internship in national university of singapore......and my project is related to data mining.I am using judge.jar when i extract this jar files i saw there was no main-class in manifest file so i change it and make it again jar file using dos command.please suggest me how i can reomove this error.
    Thanks in advance.
    Ashwani

  • Help Me Urgent...Error: "Could not find the main class. Program will exit."

    Am using Eclipse 3.3.2
    I have a project called: SWDS
    Initially i have JDK1.6 installed in my system. At this time the project is running succesfully.
    But when i removed(uninstalled and environment path also removed) JDK 1.6 and installed JDK 1.5 and path also given.
    No changes are made in the project code.
    When I Run the project SWDS then showing an alert "*Could not find the main class. Program will exit*" and then getting error messages like:
    {color:#ff0000}java.lang.UnsupportedClassVersionError: Bad version number in .class file
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Exception in thread "main"{color}
    Pleez help me how to rectify this error.

    The manifest file is missing from the project.
    I searched the net and read about the manifest file and I saw that it is supposed to be located in META-INF/MANIFEST.MF. I suppose that means project_root/META-INF/MANIFEST.MF, right ?
    I am asking this because I haven't got that much experience in Java and this is the first time I hear about a manifest file.
    Does anyone have any Ideea how I add a manifest file to a project with Eclipse SDK? I searched the menus and I didn't find anithing of such sort... o
    Does Eclipse have support for editing manifest files at all?

  • Can not start WebLogic in Eclipse. Error: "Could not find the main class."

    I have installed Eclipse 2.0 and WebLogic Server 6.1. and the WebLogc plug in from GENUITEC (and jdk1.3.1_04, on Win2K Server). After I have done the configuration, the WebLogic start/stop buttons are integried into the Eclipse Toolbar, but when I click on the start button to start Weblogic, it pops up a dialog box "Java Virtual Machine Launcher" with message: "Could not find the main class. Program will exit!"
    Starting WebLogc Server from the Start panel works fine.
    Does any one have seen this before or have a suggestion what I should do?
    Many many thanks in advance.
    Huan

    Weblogic must be started with a full JDK; otherwise
    JSPs and dynamic EJB stubs could not be deployed. The
    error message
    indicates you are attempting to use a JRE. Configure
    Eclipse JRE to point to a JDK. The product
    documentation will help you with this process. It does not work for me. :-(
    I have tried JDK 1.3.1 and 1.4.1: same result: I get a "Could not find the main class: Program will exit"
    For free expert support please consider contacting
    Genuitec at [email protected] If just want any
    answer ask a newsgroup.
    WayneI'll try the support at '[email protected]' :)
    Michel
    Michel Szybist
    [email protected]
    Fax: +33 (0)173729897
    SMS: http://www.szybist.net/

  • [newbie] [error] Could not find the main class

    This program does not compile on the command line, however they run within Eclipse 3.4.2 IDE. JDK does not seem to be installed in the usual path under C:\Program Files\Java..jdk, however I have installed the following which I presume should include the jdk:
    Eclipse 3.4.2
    SunGlass Fish Enterprise Server 2.1.1
    Any ideas? Is this a bug?
    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.
    C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\Java\JavaDev>di
    r
    Volume in drive C has no label.
    Volume Serial Number is D80F-8634
    Directory of C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\J
    ava\JavaDev
    08/12/2009 11:31 <DIR> .
    08/12/2009 11:31 <DIR> ..
    28/04/2009 18:32 <DIR> corejava8
    08/12/2009 10:42 2,505 Java CLI.lnk
    20/04/2008 11:44 241 Java Platform SE 6.url
    28/04/2009 18:32 <DIR> myCode Snippets
    08/12/2009 11:43 480 TestPassword.java
    3 File(s) 3,226 bytes
    4 Dir(s) 39,149,547,520 bytes free
    C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\Java\JavaDev>pr
    ompt $g
    dirVolume in drive C has no label.
    Volume Serial Number is D80F-8634
    Directory of C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\J
    ava\JavaDev
    08/12/2009 11:31 <DIR> .
    08/12/2009 11:31 <DIR> ..
    28/04/2009 18:32 <DIR> corejava8
    08/12/2009 10:42 2,505 Java CLI.lnk
    20/04/2008 11:44 241 Java Platform SE 6.url
    28/04/2009 18:32 <DIR> myCode Snippets
    08/12/2009 11:43 480 TestPassword.java
    3 File(s) 3,226 bytes
    4 Dir(s) 39,149,547,520 bytes free
    javac TestPassword.java'javac' is not recognized as an internal or external command,
    operable program or batch file.
    java testPassword.javaException in thread "main" java.lang.NoClassDefFoundError: testPassword/java
    Caused by: java.lang.ClassNotFoundException: testPassword.java
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: testPassword.java. Program will exit.
    type testPassword.javaimport java.io.Console;
    public class TestPassword {
    public static void main(String[] args) {
    Console cons;
    char[] passwd = {'x','x'};
    if ((cons = System.console()) != null &&
    (passwd = cons.readPassword("[%s]", "Password:")) != null);
    if (passwd.equals("joe"))
    {System.out.println("password is fine");}
    //Clear password array (Security note)
    java.util.Arrays.fill(passwd, ' ');
    javap'javap' is not recognized as an internal or external command,
    operable program or batch file.
    javac'javac' is not recognized as an internal or external command,
    operable program or batch file.
    echo $PATH$PATH
    echo %PATH%PATH
    echo %PATH%C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WIN
    DOWS\system32\WBEM;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\WINDO
    WS\system32\WindowsPowerShell\v1.0;c:\Program Files\Microsoft SQL Server\100\Too
    ls\Binn\VSShell\Common7\IDE\;c:\Program Files\Microsoft SQL Server\100\Tools\Bin
    n\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsof
    t Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Sun\SDK\bin;C:\PROGRA~1\MI
    CROS~2\Office12
    DIRVolume in drive C has no label.
    Volume Serial Number is D80F-8634
    Directory of C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\J
    ava\JavaDev
    08/12/2009 11:31 <DIR> .
    08/12/2009 11:31 <DIR> ..
    28/04/2009 18:32 <DIR> corejava8
    08/12/2009 10:42 2,505 Java CLI.lnk
    20/04/2008 11:44 241 Java Platform SE 6.url
    28/04/2009 18:32 <DIR> myCode Snippets
    08/12/2009 11:43 480 TestPassword.java
    3 File(s) 3,226 bytes
    4 Dir(s) 39,149,498,368 bytes free
    javaw TestPassword.java
    dirVolume in drive C has no label.
    Volume Serial Number is D80F-8634
    Directory of C:\Documents and Settings\Jon\My Documents\My Archives\My eBooks\J
    ava\JavaDev
    08/12/2009 11:31 <DIR> .
    08/12/2009 11:31 <DIR> ..
    28/04/2009 18:32 <DIR> corejava8
    08/12/2009 10:42 2,505 Java CLI.lnk
    20/04/2008 11:44 241 Java Platform SE 6.url
    28/04/2009 18:32 <DIR> myCode Snippets
    08/12/2009 11:43 480 TestPassword.java
    3 File(s) 3,226 bytes
    4 Dir(s) 39,149,494,272 bytes free
    java HelloWorld.javaException in thread "main" java.lang.NoClassDefFoundError: HelloWorld/java
    Caused by: java.lang.ClassNotFoundException: HelloWorld.java
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    Could not find the main class: HelloWorld.java. Program will exit.
    type HelloWorld.javapublic class HelloWorld {
    public static void main(String[] args) {
    System.out.println("Hello world!");
    echo %PATH%C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WIN
    DOWS\system32\WBEM;c:\Program Files\Microsoft SQL Server\90\Tools\binn\;C:\WINDO
    WS\system32\WindowsPowerShell\v1.0;c:\Program Files\Microsoft SQL Server\100\Too
    ls\Binn\VSShell\Common7\IDE\;c:\Program Files\Microsoft SQL Server\100\Tools\Bin
    n\;c:\Program Files\Microsoft SQL Server\100\DTS\Binn\;c:\Program Files\Microsof
    t Visual Studio 9.0\Common7\IDE\PrivateAssemblies\;C:\Sun\SDK\bin;C:\PROGRA~1\MI
    CROS~2\Office12
    java -versionjava version "1.6.0_17"
    Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
    Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
    >

    java testPassword.javaThe JRE doesn't run source code. You haven't installed a JDK. Forget Eclipse, you need to revisit some fundamentals, my friend.

  • Could not find the main class error with executable jar

    Hello,
    I have troubles creating an executable jar file and I ran out of ideas how to solve it so I would appreciate some help.
    I have created a jar file with the export function in eclipse
    the Manifest.MF file contains:
    Manifest-Version: 1.0
    Main-Class: view.AppTennisViewI tried starting the file with a batch file which contains following code:
    @echo off
    javaw -classpath c:\TennisHSQLDB_GC2\tennisApp.jar
    @start javaw -jar tennisApp.jar
    exitthe batch file and the jar are both located in c:\TennisHSQLDB_GC2.
    When i try command line I get the same result.
    I also tried alternate statements such as SET CLASSPATH iso javaw -classpath and including the classpath in the manifest file but no luck. It keeps given me the error: could not find the main class. program will exit
    Anyone any suggestions for my problem?

    nevermind, found it.
    classpath in manifest was incorrect

  • JAR  file:      could not find the main class.

    I have been working with Java satisfactorily for about two years.
    Installed a bigger hard disk.
    Installed Windows XP.
    Downloaded java.
    Downloaded java jdk 1.6.0_07
    Downloaded java3d 1.5.2
    Downloaded Eclipse Ganymede.
    A new project, a new class with an existing and working java file. It did function in eclipse.
    Generated a jar file with:
    Export \ JAR FILE \ select files and the destination for the Jar file .....
    ... next...next filled the field Main Class
    This generates the jar files, which have worked before.
    And now the error: could not find the main class.
    Thand you for your help.

    Executing a jar file means it will not read from the CLASSPATH environment variable. I learnt this the hard way a few weeks ago and I had to resort to different measures to work around it.
    Your problem does sound weird, but check that the last line in your manifest file is a new line. If it's not, the manifest is not read and parsed correctly.
    To test, do this: remove everything from the manifest that you don't need, except the Manifest-Version and Main-Class attributes. Make sure the last line is a new line, and see if it works.
    Cheers

  • Could not find the main class (with every jar)

    This isn't a developer question. I get the error Could not find the main class with every jar I try to open (for example the jar downloaded from https://gjar.dev.java.net/ gives the same problems - and I don't think there is something wrong with that JAR). It isn't a problem with the jar or MANIFEST because the same jar works fine on my laptop. So there is something wrong with my JRE installation, but what?
    I tried to remove and reinstall the JRE 6 Update 18 but that didn't work. When I run the JAR with command line java -jar "file.jar" it works fine, but if I dubbelclick on it I get the error message (and it's irritating me).
    I'm a bit desperate so I hope that someone here can help me ;)
    Thanks in advanced

    hai T.B.M ... Sorry to post here... I know that i posted my question in wrong thread..but i dont have another solution to contact with you.. I had seen your answers which are really excellent and helped to do my project..
    Now i am having very less time to complete my project and i am very new to JMF.. I am not getting output in JMF video capture ..please check the code and guide me where i gone wrong.......please pardon me once again to post here.. Heres my code
    import javax.media.*;
    import java.awt.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.event.*;
    import javax.media.protocol.*;
    import java.io.*;
    import javax.media.control.StreamWriterControl;
    public class webcam implements ActionListener,ControllerListener
    boolean eomReached = false;
    boolean realized = false;
    JFrame f;
    BorderLayout bd1;
    CaptureDeviceInfo device;
    MediaLocator m1;
    Player player;
    Component videoScreen;
    JButton b1,b2;
    Processor processor;
    DataSource ds=null;
    DataSink fileWriter=null;
    JLabel status=new JLabel("");
    public webcam()
    try
    JFrame f=new JFrame();
    JPanel p =new JPanel();
    JPanel p1=new JPanel();
    device=CaptureDeviceManager.getDevice("vfw:Microsoft WDM Image Capture (Win32):0");
    m1=device.getLocator();
    System.out.println("1");
    processor.configure();
    processor = Manager.createProcessor(m1);
    processor.setContentDescriptor(new
    FileTypeDescriptor(FileTypeDescriptor.MSVIDEO));
    ds=processor.getDataOutput();
    player.addControllerListener(this);
    MediaLocator dest = new MediaLocator("file://foo.avi");
    fileWriter = Manager.createDataSink(ds, dest);
    fileWriter.open();
    ds.connect();
    ds.start();
    player=Manager.createPlayer(m1);
    player.addControllerListener(this);
    blockingRealize();
    videoScreen=player.getVisualComponent();
    b1=new JButton("START");
    b2=new JButton("STOP");
    bd1=new BorderLayout();
    p.setLayout(bd1);
    p1.add(b1);
    p1.add(b2);
    p.add("South",p1);
    p.add("East",videoScreen);
    f.getContentPane().add(p);
    f.setVisible(true);
    f.setSize(500,500);
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    b1.addActionListener(this);
    b2.addActionListener(this);
    catch(Exception e){}
    public void actionPerformed(ActionEvent e)
    if(e.getSource()==b1)
    try{
    processor.start();
    player.start();
    fileWriter.start();
    catch(Exception e1){}
    if(e.getSource()==b2)
    try{
    player.stop();
    processor.stop();
    processor.close();
    fileWriter.close();
    catch(Exception e2){}
    public static void main(String args[])
    webcam obj=new webcam();
    public synchronized void blockingRealize() {
    player.realize();
    while (!realized) {
    try {
    wait();
    } catch (java.lang.InterruptedException e) {
    status.setText("Interrupted while waiting on realize...exiting.");
    System.exit(1);
    public synchronized void controllerUpdate (ControllerEvent event) {
    System.out.println("myPlayer generated "+event.toString());
    if (event instanceof RealizeCompleteEvent) {
    realized = true;
    notify();
    } else if (event instanceof EndOfMediaEvent) {
    eomReached = true;
    }

  • Could not find the main class ! exception.

    hi,
    I create one java project. for this I am using netbeans 5.
    I try to run the project jar file stff.jar. When run using "java -jar stff.jar " , it throws error "could not find the main class. program will exit".
    I am extracting this jar file, in manifest, main class is set.
    i.e, in manifest, Main-Class: ems.emsFrame.
    ems is my folder ,inside it main class kept.
    here, emsFrame is my main class where " public static void main (String args[])" is located.
    I am also, set the class path for that class folder(ems) and run.
    The same error ("could not find the main class. program will exit") occured.
    Why this error occured.
    also,I am uninstall the jdk and reinstall .
    whats my problem.
    bye

    yes sir.
    In projects, inside it, in Libraries ,the SNMPInquisitor.jar is located.
    inside that jar, snmp package is located.
    but, when build and run, there is no problem sir.
    Only when i try to run the stff.jar file (java -jar stff.jar), that time only the exception thrown.
    when I double click that jar, it show, "could not find the main class. program will exit". But, I am adding the main class in manifest. when i open manifest.mf, it show, Main-Class: ems.emsFrame.
    but, when i run jar thro' cmd window, it shows,
    Exception in thread "main" java.lang.NoClassDefFoundError: snmp/SNMPGetException
    at ems.emsFrame.<init>(emsFrame.java:1163)
    at ems.emsFrame.<clinit>(emsFrame.java:1155).
    i am still trying it.

  • JAR "could not find the main class"

    I'm running applications under XP.
    In my profile:
    I have a lot of problems double clicking on a jar file.... it always gives me this error: "could not find the main class"...
    In other XP profiles:
    All jar files run properly!
    Help me!

    Is your manifest correct? Does it contain the line
    Main-Class: Application
    or
    Main-Class: package/Application
    in the main section of the manifest (case sensitive)? Can the interpreter find all the required class files?
    Stephen

  • Java Access Bridge 1.1 Could not find the main class

    When I try to load Java Access Bridge 1.1 I receive the following error:
    Could not find the main class. Program will exit.
    Does anyone know why?

    you must check with the classpath
    please see that you have not repeated %classpath%
    at the end of the class path like you do in win98.
    similiarly with %path%
    in win2000 it is automatically taken care off.

  • Executable JAR file: Could not find the main class.

    Hello,
    I have a problem with making an executable JAR file.
    I have written a JAVA program that consists of five different classes of which User.java is the main class and I have saved a text document with Main-Class: User and a blank line after that.
    If I try:
    jar cmf MainClass.txt User.jar User.class Beheerder.class Operator.class Manager.class MaakVisueelSchema.class
    it makes a executable jar file which actually works! :)
    But when the Operator class trys to open the MaakVisueelSchema class the screen stays blank.
    I can run MaakVisueelSchema with java MaakVisueelSchema.
    So I tried to make an executable JAR that consists only of MaakVisueelSchema, the same way as I did for User:
    Main-Class: MaakVisueelSchema
    jar cmf MainClass.txt MaakVisueelSchema.jar MaakVisueelSchema.class
    Then I get the error message:
    Could not find the main class. Program will exit.
    from the Java Virtual Machine Launcher.
    The big difference between MaakVisueelSchema and the other classes is that MaakVisueelSchema contains a PaintComponent method and an ComponentListener. Is it possible that one of those creates the error?
    Can anyone help me with this problem?
    Thanks in advance!
    Bye!

    Yes,
    I tried:
    jar xvf MaakVisueelSchema.jar
    and it returns:
    META-INF/
    META-INF/MANIFEST.MF
    MaakVisueelSchema.classN/G. You need to manually create a manifest file in a text editor, have it point to your main class, and enter it in your jar command as an argument.

  • Could not find the main class Error

    Hi all,
    I think that JRun compiles something to jsp files if the jsp
    folder does not contain jsp files. Is that right? I started a
    server running in JRUN4. And later at some point (I don't know what
    I was doing), I got this Error Dialog that said "Could not find the
    main class. Program will exit." In addition, the title of that
    dialog was "Java Virtual Machine Launcher". What does this message
    mean? Please help me. Thank you.

    Okay, I created a simple hello jsp file in the test folder.
    Then I ran the command:
    D:\JRun4\bin\jspc at the current directory of C:\Documents
    and Settings\user\Desktop\test>
    The result that I got this:
    C:\Documents and
    Settings\user\Desktop\test>D:\JRun4\bin\jspc
    Compiling: /index.jsp
    java.io.FileNotFoundException: C:\Documents and
    Settings\user\Desktop\test\WEB-IN
    F\jsp\jrun__index2ejspa.class (The system cannot find the
    file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at
    jrunx.compiler.SMAPAttributeWriter.writeSMAP(SMAPAttributeWriter.java
    :49)
    at
    jrunx.compiler.JavaCompiler.processSMAP(JavaCompiler.java:184)
    at
    jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:151)
    at
    jrunx.compiler.JavaCompiler.compile(JavaCompiler.java:100)
    at jrun.jsp.Translator.compilePage(Translator.java:176)
    at jrun.jsp.Translator.translate(Translator.java:254)
    at jrun.jsp.Translator.translate(Translator.java:101)
    at jrun.jsp.JSPEngine.translateJSP(JSPEngine.java:693)
    at jrun.jsp.JSPC.compile(JSPC.java:85)
    at jrun.jsp.JSPC.main(JSPC.java:223)
    C:\Documents and Settings\user\Desktop\test>
    What is wrong?

  • Execute jar file: "could not find the main class" program will terminate

    Hey,
    I am new to Java. I have started to make a small java program which supposed to help me at my studies to lean the Dominic Memory System. I have used the latest version of Netbeans 5.5.1 to build my program in. I have two problems which I cannot figure out how to solve, please help me.
    The first problem is that the java script I have made works when I compile it in Netbeans, but when I create a Jar file it does not work. I receive a pop up message in windows ?could not find the main class program will terminate? when I execute the jar file.
    The second problem I have is that I need to compare the strings generated by the "numbers" and "TIP" and if the numbers is not identical the numbers in the ?Center? JPanel should be highlighted as red.
    If anyone would like to clean up the code I would be pleased. I have copied quite a lot from anyone because of my one lack of knowledge.
    * GoListener.java
    * Created on 12. september 2007, 21:48
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package grandmaster;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.Vector;
    import java.util.StringTokenizer;
    import java.awt.Color;
    * @author Computer
    public class GoListener implements ActionListener {
    private JTextField viewer;
    private JTextField TIP;
    private JTextField freq;
    private JTextField max_num;
    private Vector numbers;
    public GoListener(JTextField j,JTextField k, JTextField m, JTextField f, Vector n) {
    freq = f;
    max_num = m;
    viewer = j;
    numbers = n;
    TIP = k;
    public void actionPerformed(ActionEvent e){
    int time = Integer.valueOf(max_num.getText());
    int f = Integer.valueOf(freq.getText());
    if (e.getActionCommand() == "GO") {
    for (int i = 0; i< time;++i) {
    int number=0;
    number = (int)Math.floor(100*Math.random());
    while(number>51){
    number = (int)Math.floor(100*Math.random());
    if(number<=9){
    viewer.setText(" "+"0" + String.valueOf(number) + " ");
    } else{
    viewer.setText(" " + String.valueOf(number) + " ");
    viewer.paintImmediately(viewer.getBounds());
    numbers.add(number);
    try {
    Thread.sleep(f*1000);
    } catch (Exception exp) {
    viewer.setText(" XX ");
    viewer.paintImmediately(viewer.getBounds());
    if (e.getActionCommand() == "VIEW") {
    try {
    //int numb = Integer.valueOf( TIP.getText() ).intValue();
    StringTokenizer tokenizer = new StringTokenizer(TIP.getText(), " ");
    String[] split = null;
    int tokenCount = tokenizer.countTokens();
    if (tokenCount > 0) {
    split = new String[tokenCount];
    for (int current = 0; current < tokenCount; current++) {
    split[current] = tokenizer.nextToken();
    viewer.setText(" " + String.valueOf(numbers) + " ");
    // k=numbers(1);
    /*while(c<i){
    String.valueOf(k).equals(split[1]);
    c++;
    TIP.setText(" " + split[2] + " ");
    } catch (Exception exp) {
    try {
    //string testit = numb.toString();
    //String str = "" + numb;
    //viewer.setText(str);
    //viewer.setText(numbers.toString());
    numbers.clear();
    } catch (Exception exp) {
    * Main.java
    * Created on 12. september 2007, 21:07
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package grandmaster;
    import java.util.Vector;
    import javax.swing.*;
    import java.awt.event.*;
    import javax.swing.JButton;
    import java.awt.*;
    import grandmaster.GoListener;
    * @author Computer
    public class Main extends JFrame {
    private JTextField viewer;
    public JTextField TIP;
    // private TextInputPanel TIP;
    private Vector numbers;
    /** Creates a new instance of Main */
    public Main() {
    numbers = new Vector();
    JPanel p = new JPanel(new GridLayout(0,4));
    JButton go = new JButton();
    JButton view_num = new JButton();
    go.setText("Go!");
    go.setVisible(true);
    go.setActionCommand("GO");
    view_num.setText("VIEW");
    view_num.setVisible(true);
    view_num.setActionCommand("VIEW");
    JTextField max_num = new JTextField();
    max_num.setText("5");
    JTextField freq = new JTextField();
    freq.setText("1");
    viewer = new JTextField();
    viewer.setText("XX");
    TIP = new JTextField("");
    p.add(go);
    p.add(max_num);
    p.add(freq);
    p.add(view_num);
    getContentPane().add(p,BorderLayout.NORTH);
    getContentPane().add(viewer,BorderLayout.CENTER);
    getContentPane().add(TIP,BorderLayout.SOUTH);
    setSize(200,200);
    GoListener g = new GoListener(viewer,TIP,max_num, freq, numbers);
    go.addActionListener(g);
    view_num.addActionListener(g);
    * @param args the command line arguments
    public static void main(String[] args) {
    // TODO code application logic here
    Main window = new Main();
    window.setVisible(true);
    }

    NetBeans questions should be posted to the NB site. It has mailing lists and associated forums.
    This tutorial from the NB site addresses running programs outside of NB
    http://www.netbeans.org/kb/articles/javase-deploy.html
    When you compare objects, use ".equals()" and reserve == for comparing values.

  • Error msg Could not find the main class.Program will exit. in jar execution

    Hello,
    I have created a jar so that I can used it in the webapp.
    but when I click on it it says "Could not find the main class.Program will exit."
    I searched a lot in the net and found that it has to do with the manifest file.
    I even updated the manifest file using the command "jar umf main.txt filefolderupload.jar" with the class name mention along with the package heirarchy.
    (pakage heirarchy in /,\ and .)
    I am using JDK 1.5 . and have Updated JRE 1.6.
    Also tried with extending the class with JApplet, but in vain.
    Kindly help me in the above mention issue.
    tia,
    Sarwa

    This post hints at a number of misunderstandings on your part, and raises a couple of important questions.
    Note that this 'simple question' has a complicated answer. Given the complexity of it, it might pay to add Dukes to it, ..a lot of Dukes.
    The important questions are.
    1) Does this file/directory uploader need to provide the end-user with a file dialog in which they can choose a local directory to upload, or will a multi-file chooser do?
    2) Does this uploader need to upload to foreign sites, or does it upload back to its own server?
    Looking at this table I prepared to describe the [uploader/local file access|http://pscode.org/test/uploader/fileuploader.html] possibilities, if the answers to the questions are 'multi-file chooser will do' and 'home site only', the best option is a sandboxed app. launched using webstart (JNLP) - option 5. If either of those questions go the other way, option 6 (digitally signed with extended permissions) is needed.

Maybe you are looking for

  • Syncing To Same Computer But Not Losing Apps, Music, Etc...

    Hey guise, i've got multiple devices that were all synced to my school macbook, which is running snow leopard 1.6.8 and itunes 10, but it was wiped and all the content on it was deleted. I was just wondering if it was possible to sync my 3 iphones an

  • What is the functional scope of the report MILL_IBASE?

    Hello, We're working for a cable manufacturing company and we came across a possible problem. We've discovered recently some double classifications in our system. Could we use this report MILL_IBASE to retrieve all double classifications found in our

  • How do I move PS CS6 from old to new computer?

    I am getting a new computer specifically for photo editing.  I have Photoshop Extended CS6 Student Teacher Ed, Windows 7.  I would like to know how to move my software to the new computer without purchasing it again.  I do still have my product code,

  • Repository view for calc scripts

    what is the repository view for calc scripts

  • Unfit apps in 4 inch screen display in iphone 5

    i use iphone 4 before and now i am using iphone 5, why is it most of applications i sync to my new iphone 5 are not exactly fitted with the 4 inch screen? even the videos on youtube unlike in the iphone 4