NETBEANS 5.5 script

Hi,
I'm using NETBEANS 5.5 and I would like to know if it is possible to execute a script after compilation.
I need that in order to copy JAR result file to a directory.
Thanks a lot
Marc

It definitely is possible. Netbeans uses Ant to do the compiling, etc. You just need to modify the Ant build.xml file to do a file copy after compilation. Here's the Ant website...
http://ant.apache.org/

Similar Messages

  • Integrate J2ME Polish in NetBeans environment

    Hi all,
    I've trouble with having a full functionnal Netbeans environment with J2ME Polish.
    Here are the two ways I've tried without full success :
    *1- Start from a J2ME Polish project sample :*
    The sample is working well and when I add my code, most of it is working but :
    -> I can't add my own ressources (icons, sounds, etc...) even by adding the ressource directory in project properties. The code doesn't find them at execution.
    -> It doesn't find some specific APIs like MMAPI javax.microedition.media.control.VideoControl even if MMAPI ability is present and even if I manually add the mmapi.jar file in the library&ressources.
    *2- Add Polish library to an existing and working project :*
    I've added Polish abilities and enough-j2mepolish-client.jar library
    The code is compiling and I have access to both Polish and MMAPI interfaces.
    -> The big problem is that polish screens are empty. For example a simple polish alert screen is empty, the title bar is displayed, the softkeys are displayed but the content is not. Whereas, the string to be displayed is correctly built and no exception is raised during screen building and display.
    So my question is : Is there anybody who has a correct Netbeans 6.0.1 environment including J2ME Polish and what are the steps to follow to build such an environment ?
    Thanks a lot

    First of all , install netbeans and mobility package.
    Then do the follows:
    http://www.j2mepolish.org/docs/install.html#netbeans5
    J2ME Polish provides NetBeans specific build scripts from J2ME Polish 1.3 Beta 3 onwards. You can now just open any of the provided sample applications, delete the default build.xml script and rename the build-netbeans.xml script to build.xml. You can from then on use the normal debugging, build and compile facilities of NetBeans.
    Integrating a sample application in NetBeans:
    Select File > Open Project... and select any sample application in ${polish.home}/samples. Just select a folder like the menu folder and select Open.
    Now switch to the Files window by selecting Window > Files.
    In this window delete or rename the build.xml script which is in the base folder of the project.
    Now right-click the build-netbeans.xml script and rename it to build.xml. When the renaming does not work, do it directly from the file system (e.g. Windows Explorer).
    From now on you can build, run, debug and compile with the normal NetBeans commands (e.g. F5 for debugging). J2ME Polish is then used for building etc.
    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.
    So , just adjust the ant script 'build.xml'

  • 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

  • Ant dependency...

    In early November of 2011, I posted the following message on a thread related to Maven and JavaFX 2.0:
    <<<
    As a long time Maven user, I started looking into this issue. I thought I had a basic solution using shade. But, then, I ran into an UnsatisfiedLinkError against libmat.dylib. I found libmat.jnilib, but no libmat.dylib.
    So I examined my application's manifest.mf, and discovered that the Main-Class attributed detailed 'not' my main class but a JavaFX-generated Main.class, coupled with Main$1.class and NoJavaFXFallback.class. I guess Main.class, generated by one of the many JavaFX ant tasks, loads the native libraries and my 'main' class. Oracle should provide the source for this code generation. Because requiring Ant, Netbeans and code generation to develop JavaFX 2.0 apps is a nonstarter.
    >>>
    I worked around this issue, but at the expense of an additional Maven artifact - the Netbeans generated application code calling my application. In other words, I had no direct control over my own main application code. Instead, I had to have Oracle-generated code invoke my application code.
    Now, I haven't thought about this issue for nearly 2 months. But as a long time Swing developer, a direct dependency on Oracle Ant scripts and Netbeans is unacceptable. Have I misunderstood this dependency? If not, is this dependency forever or temporary?
    Thanks in advance for any comments.

    I think the JavaFX-generated Main.class you are referring to is also known as the "JavaFX launcher".
    A description of what the launcher does is here (http://docs.oracle.com/javafx/2.0/deployment/packager001.htm):
    "By default, the Create JAR command also inserts the JavaFX Launcher into the JAR archive. The JavaFX Launcher is responsible for locating the installed JavaFX Runtime and invoking the main application class using this Runtime. The JavaFX Launcher also enables the JAR file to be run by double-clicking the file. Use the -noembedlauncher option to keep the launcher from being embedded."
    So, it seems the use of the launcher is optional. If you don't need or want the extra functionality the launcher provides, then you don't need to include it in your package.
    To run your application without the launcher, place the jfxrt.jar file on your classpath (e.g. with the java -cp <jfxrt.jar path> -jar your jar file). As long a correct version of JavaFX and Java is installed on your machine, I believe your application should run fine. If you are just executing the class files locally for development purposes, you don't need to bother with the jar step and can just use something like java -cp <jfxrt.jar path>;. com.app.AppMain (see Command-line/Runtime.exec() JavaFX app?
    To build your application, you don't need to use NetBeans or Ant scripts, for example I build apps for development using compilation and packaging tools built into intellij Idea (with jfxrt.jar added as a library to the project). I have also used modified versions of the maven script here http://truezip.schlichtherle.de/2011/10/04/updated-maven-archetype-for-javafx-2-0-in-scala (note that this example uses the optional ant tasks to get more functionality). Additionally, I have done some command line based development using the javafxpackager tool (see here How to compile JavaFX 2.0 app with javac.exe from command prompt? for a sample batch build file).
    If you use the ant scripts, the javafxpackager tool, or netbeans (which just relies on the ant scripts for build) then you do have more packaging options available then if you don't use those scripts (for example binary compilation of css, inclusion of the javafx launcher, etc), but they are only desirable, not necessary, tools for development of javafx projects.
    If you are interested, there are also threads on maven development on the open-jfx mailing list (http://mail.openjdk.java.net/pipermail/openjfx-dev/2011-December/thread.html, http://mail.openjdk.java.net/mailman/listinfo/openjfx-dev), you can post there to discuss the launcher or maven support if you wish.

  • ANT how to include NetBeans Jar  files in my script of ANT ??

    ANT how to include NetBeans Jar files in my script of ANT ??

    I mean the library say swing layout ...
    which is SwingLayOuts1.0.jar ...
    in side this there is folder org.jDesktop....
    I want this folder in my jar file ...
    also ....
    My question ... i know the path of the jar file of NetBeans .... i can copy that ...dirctly ... but if m using Netbeans editor ... can i give NetBeans class to my jar command for ANT...........

  • Using the Netbeans GUI within a Project with existing Ant Script

    I cannot seem to figure out how to use the Netbeans GUI in my Project with existing Ant Script. Is this possible? I have no problem creating GUI interfaces in a java Application, but attempting to make a new JFrame Form gives the error: package org.jdesktop.layout does not exist, and I have not been able to find a way around this. Any suggestions? Thanks in advance.
    Chris Coulon

    OK, I think I am on the right track, but I don't understand why I am still getting this error:
    clean:
    compile:
    Copying 1 file to /Users/chris/**JavaProjects/Netbeans_ImageJ
    Created dir: /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build
    Compiling 292 source files to /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:31: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:31: package org.jdesktop.layout does not exist
    org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(getContentPane());
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:34: package org.jdesktop.layout does not exist
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/plugins/Kline_Frame.java:38: package org.jdesktop.layout does not exist
    layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
    Note: Some input files use or override a deprecated API.
    Note: Recompile with -Xlint:deprecation for details.
    4 errors
    /Users/chris/**JavaProjects/Netbeans_ImageJ/source/build.xml:11: Compile failed; see the compiler error output for details.
    BUILD FAILED (total time: 6 seconds)
    I no longer have the error in my java code in the Projects list, but I still cannot build the project. This is my current build.xml file:
    <!-- Ant makefile for ImageJ -->
    <project name="ImageJ" default="run">
      <target name="compile" description="Compile everything.">
          <!-- Copy the swing layout library into dist.lib -->
        <copy file="dist/lib/swing-layout-1.0.3.jar" todir=".." />
        <!-- First, ensure the build directory exists. -->
        <mkdir dir="build" />
        <!-- Build everything; add debug="on" to debug -->
        <javac srcdir="." destdir="build" optimize="on" source="1.4" target="1.4" debug="on">
          <!-- The plugins directory only needs to be
                 present at runtime, not at build time. -->
          <!-- exclude name="plugins/**"/-->
        </javac>
      </target>
      <target name="build" depends="compile" description="Build ij.jar.">
        <!-- Copy needed files into the build directory. -->
        <copy file="IJ_Props.txt" todir="build" />
        <copy file="images/microscope.gif" tofile="build/microscope.gif" />
        <copy file="images/about.jpg" tofile="build/about.jpg" />
         <copy file="plugins/MacAdapter.class" tofile="build/MacAdapter.class" />
        <copy todir="build/macros"><fileset dir="macros"/></copy>
        <!-- Build ij.jar. -->
        <jar jarfile="ij.jar" basedir="build"
             manifest="MANIFEST.MF" />
      </target>
      <target name="clean" description="Delete the build files.">
        <delete dir="build" />
        <delete file="ij.jar" />
      </target>
      <target name="run" depends="build" description="Build and run ImageJ.">
        <copy file="ij.jar" toDir=".." />
        <java maxmemory="640m" jar="ij.jar" fork="yes" />
      </target>
      <target name="run2" depends="build" description="Build and run ImageJ.">
        <!-- Run in ImageJ directory -->
        <copy file="ij.jar" toDir=".." />
        <java maxmemory="640m" dir=".." jar="ij.jar" fork="yes" />
      </target>
      <target name="zip" depends="clean" description="Build zrc.zip.">
        <zip zipfile="../src.zip"
           basedir=".."
           includes="source/**"
        />
      </target>
      <target name="javadocs" description="Build the JavaDocs.">
        <delete dir="../api" />
        <mkdir dir="../api" />
        <javadoc
               sourcepath="."
               packagenames="ij.*"
               destdir="../api"
               author="true"
               version="true"
               use="true"
               windowtitle="ImageJ API">
        </javadoc>
      </target>
       </project>notice I added this line: <copy file="dist/lib/swing-layout-1.0.3.jar" todir=".." />
    because the dir ".." is where the other jar files are placed, i.e.:
    [GAIAG:~/**JavaProjects/Netbeans_ImageJ/source] chris% ls ..
    PolarDisplay          ij.jar               swing-layout-1.0.3.jar
    TestFrames          myApp
    api               source
    So why is the build not able to see the package org.jdesktop.layout in the jar file?
    Chris

  • PB with beans binding in a netbeans 6 java project with ant script existing

    Hi all,
    I am using netbeans 6.01.
    I want to use beans binding in a simple swing form created with Matisse designer. If i do beans binding in a Netbeans java project with existing ant script i have the following error :
    java.lang.UnsupportedOperationException: No PCPE/PCPMI found for classpath/compile in MasterFileObject@25 .... etc
    Beans binding works very well in normal java project ( Java Desktop App for instance ).
    How can i make it work in an existing java ant script project ?

    You need to add the Beans Binding (beansbinding-1.2.1) that come with NetBeans 6 in your projects class path.

  • Must repeatedly reset Firefox when updating script in Netbeans

    Using Firefox 27.0.1, Windows 7 Professional Service Pack 1, Netbeans 7.4, XAMPP 3.2.1 (also happens on
    another laptop with Windows 8.
    When updating or writing an HTML script in Netbeans, the changes (while they show up in the script) do not execute when I run the script. If I reset Firefox and restart my script the changes are executed. I have noticed also when I change the script and enter Firebug (debugger), the script is not changed. Again, resetting Firefox and reloading Firebug causes the script changes to execute.
    This is a random problem and occurs with complex, or even simple, script changes.

    Thank you. The locations should solve my problem.
    To clarify. I'm trying to get this working on a headless linux system running under a restricted user account.
    While there are many great things available in the firefox UI for managing profiles, being able to do the equivalent actions via simple CLI actions or options (e.g., firefox --reset-profile ) would greatly simplify my life.
    Without a CLI (or the storage locations of these settings -- thank you!), I can't reliably restore my automated build environment to a pristine state -- and I wanted to avoid writing a screen scraping tool to wrap and control firefox's profile manager to find and click the Reset Firefox button. Just seemed too meta...

  • Compile / run problems with netbeans 6 but not netbeans 6 beta 1 or 5.5

    When I compile my project in netbeans IDE 6.0 (Build 200711261600) 1.6.0_01; Java HotSpot(TM) Client VM 1.6.0_01-b06 i get quite often a "can not find symbol" error or during runtime a "netbeans 6 java.lang.NoClassDefFoundError" exception. also switching between F6 or ctrl-F5 mode can cause the problem to appear.
    Compiling again or clean build resolves it.
    However running the same project under netbeans 5.5 or 6 beta 1 never gives this problem.
    any hint what might be wrong? i looked and compared the project settings but can't see any difference, but I assume that the upgrade script must have changed something.

    <?xml version="1.0" encoding="UTF-8" ?>
    - <project name="BorderDemo" default="default" basedir=".">
    <import file="nbproject/build-impl.xml" />
    </project>This is 'build.xml' file. Check for 'project.xml' file in 'nbproject' folder. You will find it to be:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <project xmlns="http://www.netbeans.org/ns/project/1">
      <type>org.netbeans.modules.java.j2seproject</type>
    - <configuration>
    - <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
      <name>BorderDemo</name>
      <minimum-ant-version>1.6.5</minimum-ant-version>
    - <source-roots>
      <root id="src.dir" />
      </source-roots>
      </data>
      </configuration>
      </project>Change it to:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <project xmlns="http://www.netbeans.org/ns/project/1">
      <type>org.netbeans.modules.java.j2seproject</type>
    - <configuration>
    - <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
      <name>BorderDemo</name>
      <minimum-ant-version>1.6.5</minimum-ant-version>
    - <source-roots>
      <root id="src.dir" />
      </source-roots>
      <test-roots>
      <root id="test.src.dir" />
      </test-roots>
      </data>
      </configuration>
      </project>I hope it works.....
    thanks!

  • Runtime.exec("Perl Script writing and reading on I/O"), handling Streams

    Hi all !!
    In a first place : sorry for my english if it's not really understandable but I try to do as good as possible !
    I'm writing a GUI with Swing that will allow (in one of my multiple tables) the user to run a Perl Script.
    This Perl Script ask the user to choose a Folder ... then read all the files in this folder and for each file (xml File), extract the datas and put them in a database. But when a file that has to be inserted in the database contains this line : <Template_Used name="ST1.mtt"> and if the Template table in my database doesn't have the "ST1.mtt" stored ... the Perl Script ask to the user to give him the path of the file "ST1.mtt" so that the script can put the "ST1.mtt template" datas in the database.
    This script runs well when it is from a windows console.
    But I need a graphic interface !!!
    So I created a JButton "Process a folder".
    When the button is pressed, a JFileChooser appears and ask the user which Folder has to be processed.
    Then a Process is created with the command : ("cmd.exe /C \"C:\\Program Files\\Fluke\\Ansur\\ProcessFolder.bat\").
    The BatFile :
    {code}cd C:\Documents and Settings\tsd\Desktop\Gael-Project\Project_Files
    perl Process.pl
    exit{code}
    At this moment everything is working well.
    But my Process.pl (which is 300 lines long ... and that you don't even want to hear about), ask in a first time the Path of the folder to process and sometimes ask the path to a file (a template file).
    So I need to read and wirte on the STDIN/STDOUT during the exec of the Process.
    In order to handle this I created two different threads : one reading the Process.getInputStream with a BufferedReader and one other writing on the Process.getOutputStream with a PrintWrinter.
    What I need to do is :
    When I read a line from the InputStream saying "I need the path of the ST1.mtt file", I should run a JFileChooser ... the user find the file in the computer ... and I write in the OutputStream the path of the file, so that my Perl Script doesn't have un Unitialised value on <STDIN> and can continue to process !!
    I'm pretty sure it's possible ... because at the moment I just used a trick :
    When the user push the "process a folder" button, I write the paths in the OutputStream before than the script needs it and it works !
    But I need to write in the OutputStream only when it is time !!!
    Any idea ??
    Here are some parts of my code :
    {code}
    String filename = File.separator+"tmp";
              JFileChooser fc = new JFileChooser(new File(filename));
              fc.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY );
              // Show open dialog; this method does not return until the dialog is closed
         fc.showOpenDialog(null);
         Folder = fc.getSelectedFile();
              new GoodExec(cmd);
    {code}
    {code}
    public class GoodExec {
         public static Process proc;
         public static StreamGobbler errorGobbler;
         public static StreamGobbler inputGobbler;
         public static StreamGobbler outputGobbler;
         public GoodExec(String cmd)
         try
                   Runtime rt = Runtime.getRuntime();
              proc = rt.exec(cmd);
         // any error message?
         errorGobbler = new
         StreamGobbler(proc.getErrorStream(), "ERROR");
         // any input?
         inputGobbler = new
         StreamGobbler(proc.getInputStream(), "INPUT");
         // any output?
              outputGobbler = new
              StreamGobbler(proc.getOutputStream(), "OUTPUT");
         // kick them off
         errorGobbler.start();
         inputGobbler.start();
         outputGobbler.start();
         // any error???
         int exitVal = proc.waitFor();
         System.out.println("ExitValue: " + exitVal);
         } catch (Throwable t)
         t.printStackTrace();
    {code}
    {code}
    public class StreamGobbler implements Runnable
    InputStream is;
    OutputStream os;
    String type;
    Thread thread;
    public static String chaine;
    StreamGobbler(InputStream is, String type)
    this.is = is;
    this.os=null;
    this.type = type;
    StreamGobbler(OutputStream os, String type)
    this.os = os;
    this.is=null;
    this.type = type;
    public void start () {
         thread = new Thread(this);
         thread.start ();
    public void run()
    try
    if (is == null){
         PrintWriter toProgram = new PrintWriter(os);
         File FolderToProcess = ProcessFolder.Folder;
    String Folder = FolderToProcess.getPath();
    toProgram.write(Folder);
    toProgram.close();
    else {
         if (os == null){
         InputStreamReader isr = new InputStreamReader(is);
    BufferedReader br = new BufferedReader(isr);
    String line=null;
    String comp = "Please enter the exact path of the directory that contains the files you want to process.";
    while ( (line = br.readLine()) != null){
         if (type.equals("INPUT")){
              chaine+=line+"\n";
         if (line.equals(comp)) {
              System.out.println("give directory");RUN A JFILECHOOSER AND GIVE THE DIRECTORY TO THE OUTPUTSTREAM
    System.out.println(type + ">" + line);
    is.close ();
    catch (IOException ioe){
         ioe.printStackTrace();
    {code}
    And here is an example of a simple perl script that could be used (it s a simple one !!) :
    {code}
    #!/usr/bin/perl -w
    use strict;
    print "Please enter the exact path of the directory that contains the files you want to process.\n";
    my $dir= <STDIN>;
    chomp ($dir);
    print "titallala $dir";
    if (the template of the file is not in the database){
    print "Please give me the template so that I can put it in the database";
    $dir= <STDIN>;
    chomp ($dir);
    {code}
    Thank you for your help ... if it's possible to help me !!
    Gael

    BalusC -- The line that gives me my NullPointerException is when I call the "DisplayProduct()" method. Its a dumb question, but with NetBeans how do I find out which reference could be null? I'm not very familiar with how NetBeans works with finding out how to debug. Any help you can give me would be greatly appreciated.The IDE is com-plete-ly irrelevant. It's all about the source code.
    Do you understand anyway when and why a NullPointerException is been thrown? It is a subclass of RuntimeException and those kind of exceptions are very trival and generally indicate an design/logic/thinking fault in your code.
    SomeObject someObject = null; // The someObject reference is null.
    someObject.doSomething(); // Invoking a reference which is null would throw NPE.

  • How to read the Java source code (in Netbeans)

    I use OS X10.5.5, NetBeans 6.1 and JSE 6 on a 64 bit mac.
    When I downloaded NB6.1 it had JSE 5 as it's default (and only) java platform. I ran Software Update to get Java 6 from Apple, used the Java Prefrences utitlity to set JSE6 as default. In NB I added the JDK6 platform, registered the JDK6 javadocs and noticed that I also have the option of registering the Java source code.
    I have three questions:
    1) How do I make JDK6 the default in NetBeans. The JDK5 keeps being default after I did the steps above and I don't see anywhere to change that.
    2) How do I read the Java 6 source code? I can see sun provides [source code| http://download.java.net/jdk6/] for their supported platforms. I dont see Apple doing the same for its JDK port. What would I need to do to get to read the java SE6 sources? or is it actually hiding somewhere in the /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home hierarchy?
    3) Where does the JVM look for the binary code to run when I make a call to, say java.util.ArrayList or any other library. In my naivety I would have assumed it would be a .class file somewhere in the java Home folder, but I don't see anything like it.
    thanks in advance,
    chris

    This is taken from the help included with netbeans. In response to question 1.
    By default, the IDE uses the version of the Java SE platform (JDK) with which the IDE runs as the default Java platform
    for compilation, execution, and debugging. You can view your IDE's JDK version by choosing Help > About and clicking the
    Detail tab. The JDK version is listed in the Java field.
    You can run the IDE with a different JDK version by starting the IDE with the --jdkhome jdk-home-dir switch on the command line
    or in your IDE-HOME/etc/netbeans.conf file. For more information, see IDE Startup Parameters.
    In the IDE, you can register multiple Java platforms and attach Javadoc and source code to each platform. For example, if you
    want to work with the new features introduced in JDK 5.0, you would either run the IDE on JDK 5.0 or register JDK 5.0 as a
    platform and attach the source code and Javadoc to the platform.
    In  , you can switch the target JDK in the Project Properties dialog box. In  , you have to set the target JDK in the Ant script itself,
    then specify the source/binary format in the Project Properties dialog box.
    To register a new Java platform:
    Choose Tools > Java Platforms from the main window.
    Click New Platform and select the directory that contains the Java platform. Java platform directories are marked with a  
    in the file chooser.
    Use the Sources and Javadoc tabs to attach Javadoc documentation and source code for debugging to the platform.
    Click Close.
    To set the default Java platform for a standard project:
    Right-click the project's root node in the Projects window and choose Properties.
    In the Project Properties dialog box, select the Libraries node in the left pane.
    Choose the desired Java platform in the Java Platform combo box.
    Switching the target JDK for a standard project does the following:
    Offers the new target JDK's classes for code completion.
    If available, displays the target JDK's source code and Javadoc documentation.
    Uses the target JDK's executables (javac and java) to compile and execute your application.
    Compiles your source code against the target JDK's libraries.
    If you want to register additional Java platforms with the IDE, you can do so by clicking the Manage Platforms button.
    Then click the Add Platform button and navigate to the desired platform.
    To set the target Java platform for a free-form project:
    In your Ant script, set the target JDK as desired in the javac, java, and javadoc tasks.
    Right-click the project's root node in the Projects window and choose Properties.
    In the Sources panel, set the level of JDK you want your application to be run on in the Source/Binary Format combo box.
    When you access Javadoc or source code for JDK classes, the IDE searches the Java platforms registered in the
    Java Platform Manager for a platform with a matching version number. If no matching platform is found, the IDE's default platform is used instead.
    See Also
    Managing the Classpath
    Declaring the Classpath in a Free-Form Project
    Stepping Through Your Program
    Legal Notices

  • Is it possible for NetBeans to find sourcecode in more than one folder?

    I have a very simple question:
    I have a project that I'm developing in NetBeans. I have source in two places:
    ejb/src
    and
    war/src
    That's a pretty common situation: one package / source tree for my beans, another for my web application.
    Can NetBeans support a usage like that?
    I found this page:
    http://www.netbeans.org/kb/50/import_j2se.html
    which has a section about "importing a project with multiple class folders" but what they describe, does not work.
    One thing I could do is merge everything into one folder, and then have my ant script sort things out into jars, but that doesn't make as much sense as having two source trees.

    Yes it does! Open the project properties using right mouse on project tree element -> Properties then select Sources -> Add Folder.

  • Sun Studio (12,1) is unable to find a supported version of the Netbeans IDE

    Hi all,
    We're working on upgrading both the hardware and software on our application currently, and part of this involves upgrading our compiler to Sun Studio 12.1. I downloaded
    SunStudio12u1-SunOS-SPARC-pkgs-ML.tar.bz2
    from the Sun website and we installed it into the following location on our server:
    /opt/compiler/sunstudio12.1
    I successfully compiled all my code using the compiler, however, when I try to launch the debugger by typing ./sunstudio in the 'bin' directory, I get the following error:
    {opt/compiler/sunstudio12.1/bin}./sunstudio
    Sun Studio is unable to find a supported version of the NetBeans IDE.
    Sun Studio requires a NetBeans IDE version 6.5.1 with NetBeans C/C++ module (cnd
    2) enabled.
    Sun Studio looks for a valid NetBeans IDE installation in the following order:
    1) Location specified with --netbeanshome command line option
    2) At /opt/compiler/sunstudio12.1/netbeans
    I have seen references to executing 'prepare_system' on forums while I was trying to investigate this, but when our sys admin folks try to execute the command, it does not work (command not found). They've mentioned that they expected a prepare_system script in the directory where we untarred the downloaded sun studio tarfile, but it is not there:
    drwxrwxr-x 4 59001 staff 1024 Aug 20 2009 .
    drwxr-xr-x 3 yu12 lifecad 1024 Jul 2 09:48 ..
    drwxrwxr-x 4 59001 staff 1024 Aug 17 2009 LEGAL
    -rw-rw-r-- 1 59001 staff 3985 Aug 19 2009 SS12u1_README-pkgs.txt
    -rw-r--r-- 1 59001 staff 5598 Aug 20 2009 SS12u1_README-pkgs_ja.html
    -rw-r--r-- 1 59001 staff 4155 Aug 20 2009 SS12u1_README-pkgs_zh.html
    -rwxrwxr-x 1 59001 staff 517979136 Aug 6 2009 SunStudio12u1-SunOS-SPARC-pkgs.sh
    -rwxrwxr-x 1 59001 staff 11814 Aug 6 2009 install_patches.sh
    drwxrwxr-x 5 59001 staff 96 Aug 17 2009 patches
    I can see a netbeans directory was created as part of the install, but I'm not sure why sun studio thinks netbeans is not available (afraid my knowledge about netbeans is practically non existent):
    {opt/compiler/sunstudio12.1/netbeans}ls -l
    total 6062
    drwxr-x--- 2 root root 512 Apr 5 11:14 bin
    drwxr-x--- 7 root root 512 Apr 5 11:14 cnd2
    -rw-rw-r-- 1 root root 5254 Mar 5 2009 CREDITS_ja.html
    -rw-rw-r-- 1 root root 5175 Mar 5 2009 CREDITS_pt_BR.html
    -rw-rw-r-- 1 root root 4908 Mar 5 2009 CREDITS_zh_CN.html
    -rw-rw-r-- 1 root root 5434 Mar 5 2009 CREDITS.html
    -rw-rw-r-- 1 root root 1717 Mar 5 2009 DISTRIBUTION.txt
    -rw-rw-r-- 1 root root 0 Aug 6 2009 dummy
    drwxr-x--- 2 root root 512 Apr 5 11:14 etc
    drwxr-x--- 7 root root 512 Apr 5 11:14 gsf1
    drwxr-x--- 6 root root 512 Apr 5 11:14 ide10
    -rw-rw-r-- 1 root root 1845 Mar 5 2009 LEGALNOTICE.txt
    -rw-rw-r-- 1 root root 64275 Mar 5 2009 LICENSE.txt
    -rw-rw-r-- 1 root root 37141 Mar 5 2009 moduleCluster.properties
    drwxr-x--- 7 root root 512 Apr 5 11:14 nb6.5
    -rw-rw-r-- 1 root root 15822 Mar 5 2009 netbeans.css
    drwxr-x--- 8 root root 512 Apr 5 11:14 platform9
    -rw-rw-r-- 1 root root 6141 Mar 5 2009 README_ja.html
    -rw-rw-r-- 1 root root 5692 Mar 5 2009 README_pt_BR.html
    -rw-rw-r-- 1 root root 5122 Mar 5 2009 README_zh_CN.html
    -rw-rw-r-- 1 root root 5155 Mar 5 2009 README.html
    -rw-rw-r-- 1 root root 2913280 Mar 5 2009 THIRDPARTYLICENSE.txt
    drwxr-x--- 5 root root 512 Apr 5 11:14 websvccommon1
    Our server details are:
    {opt/compiler}uname -a
    SunOS a03714 5.10 Generic_142900-03 sun4v sparc SUNW,T5440
    Any advice appreciated on how to get the debugger working. Ideally, I'd prefer not to uninstall / reinstall if at all possible as we're about to start system testing our executables, and I think a reinstall would require more unit teting and delays to our project (yikes!). But any input would be appreciated here.
    Thanks,
    Brendan.

    Hi David,
    First off - thanks for the response. I do have some follow up questions if you don't mind though:
    1. When you say the install is corrupted, do you suspect
    - the file I downloaded from the website either was corrupted, or was not the correct file for my platform
    - the procedure used to install the software was incorrect
    - something else
    2. Is there a logfile that the sun studio install creates which would indicate an error during the installation procedure? I'm sure our admins who performed the install would have shouted if an error was logged... but on the offchance that the installation does not 'shout loudly' for some errors, I'd like to see a log of the error. At a minimum, I'd expect it to say why the install failed, and what we need to modify to ensure a successful install next time 'round.
    3. I successfully compiled my code using the C compiler from the install. My unit tests also look good... does this suggest that the install was at least a partial success, and would you suspect that my recompiled executables are reliable, despite the fact that I cannot launch the IDE?
    4. Today, one of our admins telnetted to our unix server - not via exceed by the way, but he did try the following test:
    - set his display env variable (he knew he would not get a display however)
    - executed the sunstudio script
    He did not get the netbeans error, and the process appeared to be running (as I mentioned, without a display) until he killed it. I've asked if they can repeat the test using an exceed session. I thought there may be something on his $PATH that I did not have - unfortunately this was not the case (although, he may have access as 'root' to something that I require to launch the IDE). My question is, would you expect this behaviour if the install was corrupted?
    Let me know what you think.
    Thanks,
    Brendan.

  • How to execute/call an html script - paypal example

    Hi to all
    Can anyone help me with this. I would like to add an actionperformed listener to a jmenuItem, so that when that menu is selected the following html code is 'executed' (I am not sure 'executed' is the right term). It basically, takes the user to paypal for payment (but that's kind of secondary).
    I know how to set the jMenuItem, but what to write inside the
    private void jMenuItem1ActionPerformed1(java.awt.event.ActionEvent evt) {
    // Call/Execute the html script below
    <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="[email protected]">
    <input type="hidden" name="item_name" value="Text">
    <input type="hidden" name="item_number" value="1">
    <input type="hidden" name="amount" value="200">
    <input type="hidden" name="no_shipping" value="1">
    <input type="hidden" name="return" value="http://www.retuerndomain.com">
    <input type="hidden" name="cancel_return" value="http://www.retuerndomain.com">
    <input type="hidden" name="currency_code" value="GBP">
    <input type="hidden" name="lc" value="GB">
    <input type="hidden" name="bn" value="PP-BuyNowBF">
    <input type="image" src="https://www.paypal.com/en_GB/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online.">
    <img src="https://www.paypal.com/en_GB/i/scr/pixel.gif" width="1" height="1" alt=""/>
    </form>Following from that, I would also like to assign a value to, say, the variable "amount value", instead of the pre-fixed amount 200.
    I am using netbeans, where I can create am HTML file where to put the code, but I guess that's also not key, but may be of help
    P.S. the code in the form works already, so that's shown only as an example
    thanks

    I'm having a hard time trying to think of why you would
    actually want to do something like that. However, all that aside,
    the short answer is no. The database has no real "knowledge" about
    ColdFusion, and there is no way for PL/SQL to "execute" anything on
    the ColdFusion server. Maybe if you were more specific as to what
    you were actually trying to do rather than such a generic question,
    someone might be able to help you find an alternative.
    Phil

  • How to use List within javaFX(*.fx) script?

    How to use java.util.List within javaFX(*.fx) script?
    The following is my code in Java
    PDBFileReader pdbreader = new PDBFileReader();
              pdbreader.setPath("/Path/To/PDBFiles/");
              pdbreader.setParseSecStruc(true);// parse the secondary structure information from PDB file
              pdbreader.setAlignSeqRes(true);  // align SEQRES and ATOM records
              pdbreader.setAutoFetch(true);    // fetch PDB files from web if they can't be found locally
              try{
                   Structure struc = pdbreader.getStructureById(code);
                   System.out.println("The SEQRES and ATOM information is available via the chains:");
                   int modelnr = 0 ; // also is 0 if structure is an XRAY structure.
                   List<Chain> chains = struc.getChains(modelnr);
                   for (Chain cha:chains){
                        List<Group> agr = cha.getAtomGroups("amino");
                        List<Group> hgr = cha.getAtomGroups("hetatm");
                        List<Group> ngr = cha.getAtomGroups("nucleotide");
                        System.out.print("chain: >"+cha.getName()+"<");
                        System.out.print(" length SEQRES: " +cha.getLengthSeqRes());
                        System.out.print(" length ATOM: " +cha.getAtomLength());
                        System.out.print(" aminos: " +agr.size());
                        System.out.print(" hetatms: "+hgr.size());
                        System.out.println(" nucleotides: "+ngr.size()); 
              } catch (Exception e) {
                   e.printStackTrace();
              }The following is my code in JavaFX(getting errors)
    var loadbtn:SwingButton = SwingButton{
        text:"Load"
        action: function():Void{
            var pdbreader = new PDBFileReader();
            var structure = null;
            try{
                structure = pdbreader.getStructure(filepath.text);
                List<Chain> chains = structure.getChains(0);
                foreach (Chain cha in chains){
                        List < Group > agr = cha.getAtomGroups("amino");
                        List < Group > hgr = cha.getAtomGroups("hetatm");
                        List < Group > ngr = cha.getAtomGroups("nucleotide");
            } catch (e:IOException) {
                e.printStackTrace();
        };I'm using Netbeans 6.5 with JavaFX
    (PDBFileReader, Chain, Structure etc are classes from my own package, already added to the library folder under the project directory)
    Simply put, How to use List and Foreach in JavaFX?

    We can not use Java Generics syntax in JavaFX. But we can use Java Collection classes using the keyword 'as' for type-casting.
    e.g.
    import java.util.LinkedList;
    import java.util.List;
    import javafx.scene.shape.Rectangle;
    var outerlist : List = new LinkedList();
    var innerlist : List = new LinkedList();
    innerlist.add(Rectangle{
        width: 10 height:10});
    innerlist.add(Rectangle{
        width: 20 height:20});
    outerlist.add(innerlist);
    for (inner in outerlist) {
        var list : List = inner as List;
        for (element in list) {
            var rect : Rectangle = element as Rectangle;
            println("(width, height)=({rect.width}, {rect.height})");
    }

Maybe you are looking for

  • Tools for migrating data (documents) from MS SQL to Oracle

    Hi, Please let me know if there any tools available for migrating documents from one database like MS SQL to Oracle. Currently our documents are stored in MS SQL and we are planning to implement KM for document management with Oracle as the database.

  • Number of computers covered by a licence

    How many computers does 1 adobe pro licence cover? Can they access the adobe pro independently or does one have to wait until the other has logged out?

  • Access Photoshop "Help" without launching Adobe AIR?

    Is there a way to access Photoshop Help, from the Help menu, without installing or launching Adobe AIR? I'm not a mobile app developer, plus I've been seeing many security concerns and other problems related to Adobe AIR, like log files filling up ha

  • Monetary criteria for manager approval in Expense

    Hello, I read in the peoplebooks about approval routing lists that I could use them e.g. in case I use HR Supervisor for all expenses but I need supplemental approver for expenses higher then 500 USD. I would very much like to be able to do so but I

  • Customize metadata panel

    It would be good to be able to add your own customized metadata to the metadata panel. Currently this has to be done through the file info dialog - whic is a bit annoying when having to work through large number of images. Also counter-intuitive for