Compiling in Netbeans

Hi Guys,
I'm using Netbeans 4 and I'm facing a strange problem. I can ask Netbeans to ignore some files/packages and not to show it on the editor (Tools -> Options -> System Settings), right? However, when I compile the whole project it's not ignoring those files. What am I doing wrong?
Best regards

You must be kidding!Sometimes... but not this one. The way I described is the one I've used so far. I'm using 3.6, though.

Similar Messages

  • Problem in compiling in Netbeans IDE

    Hi all,
    I am using Netbean 3.6. I am getting an error in compling
    Class.forName("ClassName");
    Cannot resolve symbol. What should I do About it.
    However I am able compile the same program in command line. Only I am unable compile in netbean 3.6. Do I need to change any settings. Please let me know.
    My mail Id is
    [email protected]
    [email protected]
    Regards,
    Saravanakumar

    Is there any reason that you are using 3.6? I am using 5.5.
    anyway the forName method returns the Class object associated with the class or interface with the given string name.
    so for the given:
    Class.forName("ClassName");
    The Class.forName method must be used with care in JRE code. A call
    of the type Class.forName(classname) can only be assumes to find classes on the bootclasspath, since it does a look up on the callers classloader

  • Missing ant package while compiling in NetBeans IDE

    hi all,
    I am having problem compiling in NetBeans IDE 5.0. The error is package org.apache.tools.ant not found. I have installed apache-ant-1.6.5-bin and jdk1.5.0_07. Are these enough? The library files are in jar format. How can I tell if I having missing package "org.apache.tools.ant "?
    I am new to ANT tools and NetBeans. Can someone help?
    Thanks.

    i have tried with other projects and no problem. Only this project.
    What classes do I need to add into the project?

  • Compiling error (netbeans and javac)

    Hi,
    I have created a project with netbeans. It has two files Main.java and Methods.java. I can compile and run it using netbeans without any errors. But if I go to the directory where that files are located and try "javac Main.java", I get the error like this:
    Main.java:26: cannot find symbol
    symbol : class Methods
    location : class projectname.Main
    Methods met = new Methods();
    I get this error 2 times.

    cd ..
    javac projectname/Main.java

  • Switch compiler in NetBeans

    Hi.
    Does anyone know how to get install the lateest build of JavaFx compiler (Marina) into NetBeans.
    I've tried to add "new platform", but NetBeans doesn't recognize downloaded build as JavaFX platfrom (because it's compiler).
    I've tried to append downloaded files to existing with overwriting, but it didn't help.
    Is there any "HowTo" use latest complier version with NB?
    Thank you.

    If you have installed netbeans 6.5 without javafx sdk include it before, you can update your IDE with install javafx1.1 Plugin for NeatBeans IDE 6.5. I copied it from article on java.sun.com/javafx. In the netbeans main menu :
    1. You choose Tools --> Plugins.
    In the Plugins window, click the Settings tab and check the Active checkboxes for NetBeans Update
    Center and all the update centers listed. The other update centers are checked for any updated plugins
    on which the JavaFX 1.1 Plugin might depend.
    2. Select the Available Plugins tab and click Reload Catalog to obtain the latest list of available plugins.
    3. In the list of available plugins, locate all the plugins in the JavaFX category.
    You can type javafx in the Search text field to help locate these plugins.
    4. Check the Install checkboxes for the JavaFX plugins found, if not yet checked, and click Install.
    5. In the NetBeans IDE Installer dialog, click Next to continue with the installation.
    6. Read and accept the terms in all of the license agreements displayed and click Install.
    7. After the installation has been completed successfully, click Finish to restart the IDE.
    hope it can help you,
    regards,
    endang

  • J2me polish compilling in netbeans

    I'm trying to integrate netbeans with j2me polish but when rebuilding I get an error
    Buildfile: build.xml
    clean.tar.src:
    clean.resources:
    clean.devices:
    clean:
    build.tar.src:
          [tar] Building tar: D:\projects\MobileClient1\CP_Phone_Backup-Src.tar.gz
    build.resources:
          [tar] Building tar: D:\projects\MobileClient1\CP_Phone_Backup-Common.tar.gz
    build.devices:
    BUILD FAILED
    D:\projects\MobileClient1\build\build.xml:57: The <subant> type doesn't support the nested "target" element.
    Total time: 4 seconds
    BUILD SUCCESSFUL (total time: 4 seconds)

    akienou wrote:
    Hello Lichtens,
    I've been able to install the Polish samples installed with J2ME Polish.
    The problem is how I can create a new J2ME Polish project or how I can integrate Polish functionalities to an existing project.
    Thanks in advance.From the tutorial itself that you pointed:
    When you start a new project in NetBeans, just copy one of the sample build.xml scripts to your project's folder. Then adjust the settings according to your needs.

  • How to compile a simple "Hello World" program in Java by using Netbeans

    Hi all, I am very new to java programming arena. i am trying to learn the most demanding language for the time being. To program, i always use IDE's as it makes programming experience much easier by underline the syntax errors or sometimes showing codehint. However, I am facing some problem when i use Netbeabs to compile a simple "Hello world" program. my problem is whenever i write the code and press compile button, netbeans says "main class not found". Consequently,i am becoming frustated. So, i am here in this forum to get some kind help on How i can compile java programs in Netbeans. Please help me out, otherwise i may lose my enthusiasm in Java. please help me, i m stuck

    Go to http://www.netbeans.org/
    You should find tutorials there.

  • Compiling a .dll in netbeans (Almost there)

    (I have the GNU g++ cygwin compile installed and selected to be used as C compiler in netbeans)
    I have got so far but falling at the last hurdle.
    I have modified a java wrapper so that I can put it in a package, I adjusted the code, compiled it, called javah on the source class using:
    javah packagename.classname
    which worked
    I've then re-written the wrapper.c file so that it includes this new header file classname.h
    I've re-written the methods so that they start with Java_packagename1_classname1_ (the way they appear in the header)
    I've created a new C/C++ project in netbeans (Selected dynamic linked library in options)
    I've added the exsisting classname.h files + Cdll.h file to the header files (both included in the wrapper.c)
    Now I should be set to compile my wrapper.c into a .dll file
    I press the build button and I get this:
    Running "C:\cygwin\bin\make.exe  -f Makefile CONF=Debug" in C:\Documents and Settings\test\DynamicLibrary_3
    /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory `/cygdrive/c/Documents and Settings/test/DynamicLibrary_3'
    mkdir -p build/Debug/Cygwin-Windows/_ext/C_/Documents_and_Settings/test/DynamicLibrary_3/../My_Documents/Java_Projects/USB_K8055/build/classes
    gcc.exe    -c -g -IC\:/Program\ Files/Java/jdk1.6.0_01/include -IC\:/Program\ Files/Java/jdk1.6.0_01/include/win32 -fPIC  -o build/Debug/Cygwin-Windows/_ext/C_/Documents_and_Settings/test/DynamicLibrary_3/../My_Documents/Java_Projects/USB_K8055/build/classes/J-k8055-wrapper.o ../My\ Documents/Java\ Projects/USB_K8055/build/classes/J-k8055-wrapper.c
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:1: warning: -fPIC ignored for target (all code is position independent)
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:18:41: USB_interface_usb_interface.h: No such file or directory
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:19:22: K8055D_C.h: No such file or directory
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c: In function `Java_USB_1interface_usb_1interface_JReadAllAnalog':
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:97: error: request for member `NewLongArray' in something not a structure or union
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:98: error: request for member `GetLongArrayElements' in something not a structure or union
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:117: error: request for member `ReleaseLongArrayElements' in something not a structure or union
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c: In function `Java_USB_1interface_usb_1interface_JReadDigitalChannel':
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:210: error: `false' undeclared (first use in this function)
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:210: error: (Each undeclared identifier is reported only once
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:210: error: for each function it appears in.)
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c: In function `Java_USB_1interface_usb_1interface_JSetCurrentDevice':
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:319: error: parameter name omitted
    ../My Documents/Java Projects/USB_K8055/build/classes/J-k8055-wrapper.c:319: error: parameter name omitted
    make[1]: *** [build/Debug/Cygwin-Windows/_ext/C_/Documents_and_Settings/test/DynamicLibrary_3/../My_Documents/Java_Projects/USB_K8055/build/classes/J-k8055-wrapper.o] Error 1
    make[1]: Leaving directory `/cygdrive/c/Documents and Settings/test/DynamicLibrary_3'
    make: *** [.build-impl] Error 2
    Build failed. Exit value 2.Any ideas ?
    Thanks.

    Ok I'm still stuck here is my test code as simple as I can make it:
    Main.java
    package dlltestapp;
    import java.util.logging.Level;
    import java.util.logging.Logger;
    public class Main {
        static {
             System.loadLibrary( "J-K8055-wrapper" );
        public static void main(String[] args) {
            USB_interface_K8055.JOpenDevice(0);
            USB_interface_K8055.JSetAllDigital();
            try {
                Thread.sleep(1000);
            } catch (InterruptedException ex) {
                Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
            USB_interface_K8055.JClearAllDigital();
            USB_interface_K8055.JCloseDevice();
    }USB_interface_K8055.java
    package dlltestapp;
    public class USB_interface_K8055 {
    public static native long JOpenDevice(long i);
    public static native void JCloseDevice();
    public static native void JSetAllDigital();
    public static native void JClearAllDigital();
    }dlltestapp_USB_interface_K8055.h
    /* DO NOT EDIT THIS FILE - it is machine generated */
    #include <jni.h>
    /* Header for class dlltestapp_USB_interface_K8055 */
    #ifndef _Included_dlltestapp_USB_interface_K8055
    #define _Included_dlltestapp_USB_interface_K8055
    #ifdef __cplusplus
    extern "C" {
    #endif
    * Class:     dlltestapp_USB_interface_K8055
    * Method:    JOpenDevice
    * Signature: (J)J
    JNIEXPORT jlong JNICALL Java_dlltestapp_USB_1interface_1K8055_JOpenDevice
      (JNIEnv *, jclass, jlong);
    * Class:     dlltestapp_USB_interface_K8055
    * Method:    JCloseDevice
    * Signature: ()V
    JNIEXPORT void JNICALL Java_dlltestapp_USB_1interface_1K8055_JCloseDevice
      (JNIEnv *, jclass);
    * Class:     dlltestapp_USB_interface_K8055
    * Method:    JSetAllDigital
    * Signature: ()V
    JNIEXPORT void JNICALL Java_dlltestapp_USB_1interface_1K8055_JSetAllDigital
      (JNIEnv *, jclass);
    * Class:     dlltestapp_USB_interface_K8055
    * Method:    JClearAllDigital
    * Signature: ()V
    JNIEXPORT void JNICALL Java_dlltestapp_USB_1interface_1K8055_JClearAllDigital
      (JNIEnv *, jclass);
    #ifdef __cplusplus
    #endif
    #endifK8055D_C.h
    ** Microsoft Visual C++ 2005 Project for the K8055 USB I/O Card **
    **                    Copyright Velleman 2006                   **
    **                        www.Velleman.be                       **
    **                         Developed by                         **
    **                       RE-Applications                        **
    **                   www.RE-Applications.be                     **
    #ifdef __cplusplus
    extern "C" {
    #endif
    #define FUNCTION __declspec(dllexport)
    FUNCTION long __stdcall OpenDevice(long CardAddress);
    VOID __stdcall CloseDevice();
    FUNCTION long __stdcall ReadAnalogChannel(long Channel);
    VOID __stdcall ReadAllAnalog(long *Data1, long *Data2);
    VOID __stdcall OutputAnalogChannel(long Channel, long Data);
    VOID __stdcall OutputAllAnalog(long Data1, long Data2);
    VOID __stdcall ClearAnalogChannel(long Channel);
    VOID __stdcall ClearAllAnalog();
    VOID __stdcall SetAnalogChannel(long Channel);
    VOID __stdcall SetAllAnalog();
    VOID __stdcall WriteAllDigital(long Data);
    VOID __stdcall ClearDigitalChannel(long Channel);
    VOID __stdcall ClearAllDigital();
    VOID __stdcall SetDigitalChannel(long Channel);
    VOID __stdcall SetAllDigital();
    FUNCTION bool __stdcall ReadDigitalChannel(long Channel);
    FUNCTION long __stdcall ReadAllDigital();
    FUNCTION long __stdcall ReadCounter(long CounterNr);
    VOID __stdcall ResetCounter(long CounterNr);
    VOID __stdcall SetCounterDebounceTime(long CounterNr, long DebounceTime);
    VOID __stdcall Version();
    FUNCTION long __stdcall SearchDevices();
    FUNCTION long __stdcall SetCurrentDevice(long lngCardAddress);
    #ifdef __cplusplus
    #endifJwrapperZC.cpp (To be compiled to J-K8055-wrapper.dll)
    #include <stdio.h>
    #include <windows.h>
    #include <jni.h>
    #include <dlltestapp_USB_interface_K8055.h>
    #include <K8055D_C.h>
    JNIEXPORT jlong JNICALL Java_dlltestapp_USB_1interface_1K8055_JOpenDevice
      (JNIEnv *env, jclass in_cls, jlong CardAddress)
       long retCode = -1 ;
       retCode = OpenDevice(CardAddress);
       return retCode;
    JNIEXPORT void JNICALL Java_dlltestapp_USB_1interface_1K8055_JCloseDevice
      (JNIEnv *env, jclass in_cls)
         CloseDevice();
         return ;
    JNIEXPORT void JNICALL Java_dlltestapp_USB_1interface_1K8055_JSetAllDigital
      (JNIEnv *env, jclass in_cls)
         SetAllDigital();
         return ;
    JNIEXPORT void JNICALL Java_dlltestapp_USB_1interface_1K8055_JClearAllDigital
      (JNIEnv *env, jclass in_cls)
         ClearAllDigital();
         return ;
    }Attempting to compile the .dll I get:
    Running "C:\cygwin\bin\make.exe  -f Makefile CONF=Debug" in C:\Documents and Settings\Administrator\My Documents\NetBeansProjects\DLLtestAppC++
    /usr/bin/make -f nbproject/Makefile-Debug.mk SUBPROJECTS= .build-conf
    make[1]: Entering directory `/cygdrive/c/Documents and Settings/Administrator/My Documents/NetBeansProjects/DLLtestAppC++'
    mkdir -p build/Debug/Cygwin-Windows
    g++.exe -mno-cygwin -Wl,--add-stdcall-alias -shared -m32   -c -g -IC\:/Program\ Files/Java/jdk1.5.0_06/include -IC\:/Program\ Files/Java/jdk1.5.0_06/include/win32 -I. -fPIC  -o build/Debug/Cygwin-Windows/JwrapperZC.o JwrapperZC.cpp
    JwrapperZC.cpp:1: warning: -fPIC ignored for target (all code is position independent)
    g++: --add-stdcall-alias: linker input file unused because linking not done
    mkdir -p dist/Debug/Cygwin-Windows
    g++.exe -mno-cygwin -Wl,--add-stdcall-alias -shared -m32    -mno-cygwin -shared -o dist/Debug/Cygwin-Windows/libDLLtestAppC__.dll -fPIC build/Debug/Cygwin-Windows/JwrapperZC.o 
    build/Debug/Cygwin-Windows/JwrapperZC.o: In function `Java_dlltestapp_USB_1interface_1K8055_JOpenDevice':
    /cygdrive/c/Documents and Settings/Administrator/My Documents/NetBeansProjects/DLLtestAppC++/JwrapperZC.cpp:15: undefined reference to `_OpenDevice@4'
    build/Debug/Cygwin-Windows/JwrapperZC.o: In function `Java_dlltestapp_USB_1interface_1K8055_JCloseDevice':
    /cygdrive/c/Documents and Settings/Administrator/My Documents/NetBeansProjects/DLLtestAppC++/JwrapperZC.cpp:28: undefined reference to `_CloseDevice@0'
    build/Debug/Cygwin-Windows/JwrapperZC.o: In function `Java_dlltestapp_USB_1interface_1K8055_JSetAllDigital':
    /cygdrive/c/Documents and Settings/Administrator/My Documents/NetBeansProjects/DLLtestAppC++/JwrapperZC.cpp:43: undefined reference to `_SetAllDigital@0'
    build/Debug/Cygwin-Windows/JwrapperZC.o: In function `Java_dlltestapp_USB_1interface_1K8055_JClearAllDigital':
    /cygdrive/c/Documents and Settings/Administrator/My Documents/NetBeansProjects/DLLtestAppC++/JwrapperZC.cpp:58: undefined reference to `_ClearAllDigital@0'
    collect2: ld returned 1 exit status
    make[1]: *** [dist/Debug/Cygwin-Windows/libDLLtestAppC__.dll] Error 1
    make[1]: Leaving directory `/cygdrive/c/Documents and Settings/Administrator/My Documents/NetBeansProjects/DLLtestAppC++'
    make: *** [.build-impl] Error 2
    Build failed. Exit value 2.Plz. help
    Thanks.

  • Netbeans and Java compilation

    Hi all,
    I got a number of files done by Netbeans but when I use those file for compilation in normal Java (it means not compiling in netbeans but in Java), i got some problem with the code automatically generated by netbeans.
    can anyone help me a solution for the chance of compiling my files (all of them still .java) in normal Java (javac ...) because if not, i will have to do again all the code for UIs :(
    thanks all

    thanks for reply.
    when i try to compile in normal command prompt, the part relating to "position" of each component in the frame generated by Netbeans appear to be errors, e.g. "package org.jdesktop.layout does not exist" which means to me that this would be a only-in-netbeans library.
    is there any way for me to link to a specific classpath to get this compilable ?
    and, by the way, i have one more question raised from Netbeans.
    I try to read a .txt (text ) file in Netbeans by placing that file into the "src" folder but netbeans said "FileNotFoundException" and when i try to read the properties of text file, it states "unrecognized file". any idea how to get Netbeans recognise this file???

  • I have a problem compiling servlets bymeans of NetBeans IDE 3.6.

    If I compile a servlet by means of another IDE, they are oK and work well with NetBeans too.
    On the contrary, if I compile it bymeans of Netbeans 3.6, I get a .class which does not work. I
    have realized also that for instance if the .class i get with the other IDE is 1,58 KB, if I use
    NetBeans I get a .class smaller, that is 1,53 Kb.
    Can you help me?
    Thanks
    Eugenia Mariani

    ok
    This is the servlet named Contatore.java
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Contatore extends HttpServlet
    private int conta;
    public void init(ServletConfig config) throws ServletException
    conta = 0;
    public void doGet(HttpServletRequest richiesta, HttpServletResponse risposta)
    throws IOException, ServletException
    conta++;
    risposta.setContentType("text/html");
    PrintWriter out = risposta.getWriter();
    out.println("<html>");
    out.println("<head>");
    out.println("<title>Pagina con contatore</title>");
    out.println("</head>");
    out.println("<body>");
    out.println("Questa pagina e' stata visualizzata");
    out.println("<h1>"+conta+ "</h1> volte.");
    out.println("</body>");
    out.println("</html>");
    out.close();
    Before using the compiler of NetBeans (that is after getting Contatore.class by means of Bluej) when I use Execute I see in Internet Explorer 6.0 with win Xp Pro at the
    http://localhost:8084/esempi/Contatore
    Questa pagina e' stata visualizzata
    1
    volte.
    and Contatore.class is 1,58 KB
    After that I use the compiler of NetBeans when I use Execute here the error from Tomcat 5.0
    I see in Internet Explorer 6.0 with win Xp Pro at the
    http://localhost:8084/esempi/Contatore
    HTTP Status 404 - Servlet Contatore is not available
    type Status report
    message Servlet Contatore is not available
    description The requested resource (Servlet Contatore is not available) is not available.
    Apache Tomcat/5.0.19
    and Contatore.class is 1,53 KB
    I hope to have said everything
    I wait a help, please.
    Thanks

  • How to compile EJB 3.0 in command line

    Dear all,
    I want to know how to using command line to compile the EJB 3.0 bean.
    I have a set of source written in EJB 3.0, if i put in NetBeans and help me to build a ear, it works.
    But when i try to using command mode , it has problem.
    The Step to compile:
    1) Compile the source, all can compile .javac -d . -classpath %JAVAEE_HOME%\lib\javaee.jar;. ..\src\foo\*.java
    2) using the same "META-INF" that compiled by netbeans, include with the compiled class and build an jar file
    3) build a ear
    How ever when i deploy to glassfish 2.0
    It prompts me the descriptor error, cannot deploy to server.
    Can anyone tell me which step is missing ?
    Thanks
    Best Regard,
    Ben

    As long as you are not more specific about the steps you take to verify that the ears are the same, I cannot offer any more help. All I can say is: your assumption is wrong, because if they were the same, it would work. Simple logic is usually the best.

  • Code won't compile - array

    This is my first in depth attempt to understand the code for enabling arrays. I THINK I have a fairly simple problem, but the code won't compile and NetBeans is telling me I'm missing a symbol &/or class, which I just don't get. Here is the code for the Inventory1 module as well as the main module - what am I not seeing?
    Inventory1 module
    import java.util.Scanner;
    import static java.lang.System.out;
    public class Inventory1
      //declare and initialize variables
      int[] itemNumber = new int [5];
      String[] productName = new String[5];
      int[] stockAmount = new int[5];
      double[] productCost = new double[5];
      double[] totalValue = new double[5];
      int i;
      //int i = 0;
      //initialize scanner
      Scanner sc = new Scanner(System.in);
      Inventory1 info = new Inventory1
    public void inventoryInput()
      while (int i = 0; i < 5; i++)
         out.println("Please enter item number: "); //prompt - item number
         info.itemNumber[i] = sc.nextInt(); // input
         out.println( "Enter product name/description: "); //prompt - product name
         info.productName[i] = sc.nextLine(); // input
         out.println("Quantity in stock: "); // prompt - quantity
         int temp = sc.nextInt(); // capture temp number to verify
         if( temp <=0 )
         { // ensure stock amount is positive number
             out.println( "Inventory numbers must be positive. Please" +
                 "enter a correct value." ); // prompt for correct #
             temp = sc.nextInt(); // exit if statement
         else info.stockAmount[i] = temp; // input
         out.println("What is the product cost for each unit? "); // prompt - cost
         double temp2 = sc.nextDouble();
         if( temp <=0 )
             out.println( "Product cost must be a positive dollar " +
                  "amount. Please enter correct product cost." );
             temp2 = sc.nextDouble();
         else info.productCost[i] = temp2;
      out.println( "We hope this inventory program was helpful. Thank you for " +
          "using our program." );
      } // end method inventoryInput   
    }main module
    public class Main {
      public static void main(String[] args) { //start main method
            Inventory1 currentInventory = new Inventory1(); //call Inventory class
            currentInventory.inventoryInput();
    }

    init:
    deps-jar:
    Compiling 1 source file to C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\build\classes
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:28: '(' or '[' expected
    public void inventoryInput()
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: '.class' expected
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: illegal start of type
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: not a statement
    while (int i = 0; i < 5; i++)
    C:\Documents and Settings\Tammy\My Documents\School\JavaProgramming\Inventory\src\inventory\Inventory1.java:30: ';' expected
    while (int i = 0; i < 5; i++)
    5 errors
    BUILD FAILED (total time: 0 seconds)

  • Problems migrating from Netbeans 4.0 to Netbeans 4.1

    Hello,
    I've got a few small java servlets which were originally compiled using Netbeans 4.0 and JDK 5 update 2. Tonight I upgraded to the latest java bundle which includes JDK 1.5.0_03 and Netbeans 4.1.
    In order to get servlets to compile properly under nb4.0, I needed to go into the project properties, click on Libraries, then add the Servlet 2.3 Library to my compile-time libraries list. This API was automatically installed as part of the nb4.0 installation.
    When I started Netbeans 4.1 for the first time, it asked me if I wanted to import my old nb4.0 settings, and I clicked OK. The IDE then displayed all of my existing projects.
    However, I'm getting a reference error on my servlet classes. When I went into the project properties to add Servlet 2.3 as a compile-time library, the IDE did not have it listed as an option. I searched and found relevant JAR files in the Netbeans/enterprise1/modules/autoload/ folder, but none of the servlet APIs appear to be available in the nb4.1 IDE.
    Does nb4.1 no longer install the Servlet APIs, and if that is the case, can someone instruct me as to the correct procedures for setting up the nb4.1 IDE correctly? Otherwise, can someone tell how to get nb4.1 to recognize that those APIs are already out there?
    Thanks

    Thanks for responding.
    I was doing those steps exactly. The problem seems to be the servlet-api-23.jar file that came with netbeans 4.1. It was acting kinda flakey.
    I went to the Sun Website and downloaded the APIs I needed (zip files) and pointed the IDE to those files instead. Problem solved.
    Thanks again

  • Different log4j outputs using same compiler

    Hello.
    I've created a desktop application and recently added log4j logging. When I compile my application using the NetBeans' generated ant script and run it, I get output like:
    [java] 2008-06-17 15:42:16,383 INFO [main] (MainFrame.java:1604) - Starting application...My log4j conversion pattern is: %d %5p [%t] (%F:%L) - %m%nWhen I then recompile it using my own ant file, I get output like:
    [java] 2008-06-17 15:42:16,383 INFO [main] (?:?) - Starting application...It seems log4j cannot access the locations in the source anymore. I've narrowed it down to a compiler issue, because when I compile using NetBeans and create the jar, etc. using my custom ant script, the filename and line are correctly printed. When I compile using my custom ant script and jar, etc. using the NetBeans ant script, the ?'s are printed.
    My ant script for compilation:
    <path id="classpath">       
        <fileset dir="${lib.dir}" includes="**/*.jar"/>       
    </path>
    <target name="compile">
        <mkdir dir="${classes.dir}"/>             
        <javac srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath"/>
        <!-- include data and resources, excluding others -->
        <copy todir="${classes.dir}">
            <fileset dir="${src.dir}" includes="**" excludes="**/*.java,**/*.form"/>
        </copy>
    </target>Could anybody tell me why this is happening? Am I forgetting something in my ant script? I've tried just about anything :<

    Sorry, I mean Dennis!
    Vhha1972 wrote:
    Thanks a lot Nick!
    It works -- really appreciate
    Saif

  • Simple ArrayList declaration will NOT compile in Eclipse

    For some reason I can't get the following line of code to compile in eclipse, even though the exact same code compiles in NetBeans.
    I'm trying to work on my program at school and they don't have Netbeans installed they only have Eclipse so I have to work with it instead.
    Anyway, here's the line, it's a simple arraylist declaration:
    ArrayList<Integer> list = new ArrayList<Integer>();I''ve got java.util.ArrayList imported.
    There error I get is the following:
    "Syntax error on token '<', invalid assignment operator.
    Can anyone clear this up for me, I've been searching and I've basically wasted a good half-hour without even touching my damn program.

    endasil wrote:
    well, to go higher than 1.4 you'd need a JDK that is higher than 1.4. It really has nothing to do with eclipse, and if you don't have a 1.5 jdk installed, NetBeans will have the same problem.Nonsense. Eclipse has it's own compiler, your JDK is irrelevant.
    Go to Window->Preferences->Java->Compiler and change the compiler compliance setting to 5.0 or higher. Your JRE will need to match, but the JDK need not even be installed

Maybe you are looking for

  • Execute a program only in background

    Hi, When we set sy-batch to 'X',this will enable the background processing functionality. But is there any other variable or any method to avoid the below functionality. execute program by pressing F8.On selection-screen,in the menu bar under 'Progra

  • Facing error in starting managed server from nodemanager

    Hi All, I have installed WebLogic server 10.3.4 and installed OSB 11.1.1.4.0. I created domain with one admin server and one managed server for osb. When I started managed server with the startManagedWebLogic command it got started successfully but w

  • Editing with Photoshop Elements?

    I'm very interested in purchasing Lightroom for managing and performing basic photo developing. I've seen references to using the full-blown Photoshop program for more in-depth image editing, and would like to know if it's possible to use Photoshop E

  • DigiBeta cilps importing without sound

    I captured digibeta clips for a TVC at our animators studio in FCP 5 and then brought them on a hard drive to our production house where we're using FCP 4.5. I imported them into a new project using the 10-bit uncompressed codec (downloaded and tried

  • Where clause with If condition

    Hi All, Oracle 11g I have the following table create table test_table ( firstname varchar2(500) , middlename varchar2(500) , lastname varchar2(500) ); insert into test_table (firstname,middlename,lastname) values ('Peter',null,'Smith'); insert into t