1 Reply Latest reply: Jun 1, 2010 7:44 PM by EJP RSS

    Netbeans & javac?

    843810
      Whenever I create a project in Netbeans, it will compile fine in the Netbeans IDE, but it will not compile with javac. I had written a script to do the compiling work (without opening netbeans), but unfortunately, I seem to have problems like:

      Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name...

      Does anyone know why this happens, and what I can do about it? Thanks!

      By the way my compile script is:
      #!/bin/bash
      
      #---------------------
      # Set Up Environment
      #---------------------
      
      if [ -s "./dist" ];
      then
          rm -rf ./dist/*
      else
          mkdir dist
      fi
      
      if [ -s "./compile" ];
      then
          rm -rf ./compile/*
      else
          mkdir compile
      fi
      
      #delete temporary files
      rm -rf $(find ./src/* | grep java~)
      
      #-----------------------
      # Compile Source Code
      #-----------------------
      javac -g -d ./compile $(find ./src/* | grep java)
      
      #-----------------------
      # Copy Resource Files
      #-----------------------
      cp -r src/* compile
      
      rm -rf $(find ./compile/* | grep .java)
      rm -rf $(find ./compile/* | grep .form)
      
      
      #-------------------------
      # Compile the Jar File
      #-------------------------
      jar cvfe ./dist/progname.jar progname.Main -C ./compile .
        • 1. Re: Netbeans & javac?
          EJP
          Whenever I create a project in Netbeans, it will compile fine in the Netbeans IDE, but it will not compile with javac.
          Hmmm, let's see.
          I had written a script to do the compiling work
          Why? Use Ant or Maven like everybody else does. In fact like Netbeans does. It even creates a 'build.xml' for you. Don't waste your time on this sort of thing.
          Exception in thread "main" java.util.MissingResourceException: Can't find bundle for base name...
          So you managed to execute code that didn't compile?
          Does anyone know why this happens, and what I can do about it? Thanks!
          It is an error creating the .jar file. Nothing whatsoever to do with 'java' or this forum.