Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7705293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:49:57+00:00 2026-05-31T23:49:57+00:00

I have a java application develeped in netbeans. I want to create a batchfile

  • 0

I have a java application develeped in netbeans. I want to create a batchfile that recompiles the project and packs the resulting jar files along with some documentation to a zip file and generate an installer.

The packing and generation of the installer is no problem, but I dont know how to automate the compilation from commandline/batchfile – whenever I change something in the source-code I have to manually click on “Clean and Build” inside netbeans and run my batchfile afterwards.

What do I have to add to the batchfile to do the same as “Clean and Build” from inside netbeans?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T23:49:58+00:00Added an answer on May 31, 2026 at 11:49 pm

    I found out myself what to do:

    1. Make sure ant is in your path (e.g. I added C:\Programme\NetBeans 6.9.1\java\ant\bin to my PATH environment)
    2. Make sure your JAVA_HOME is set correctly
    3. execute “ant clean” and “ant jar” in the directory of your netbeans project

    The batchfile I use:

    SET JAVA_HOME=C:\Programme\Java\jdk1.6.0_12
    
    call ant deps-clean
    call ant clean
    call ant jar
    
    pause
    
    cp -r doc dist
    cp -r scripts dist
    cp -r examples dist
    cp -r crypt dist
    cp -r db dist
    cp -r license dist
    
    rm dist/README.TXT
    cp README.TXT dist
    
    echo package creation %date:~-4,4%_%date:~-7,2%_%date:~0,2% >> dist/README.TXT
    
    cd win_service
    
    RCEDIT.exe /C wizard.exe
    RCEDIT.exe /I wizard.exe my_app.ico
    RCEDIT.exe /N wizard.exe pre_wizard.ini
    
    RCEDIT.exe /C my_app_service.exe
    RCEDIT.exe /I my_app_service.exe my_app.ico
    RCEDIT.exe /N my_app_service.exe pre_my_app_service.ini
    
    cp my_app_service.ini ../dist
    cp my_app_service.exe ../dist
    cp wizard.exe ../dist
    cp wizard.ini ../dist
    cp service*.bat ../dist
    cp *.nsi ../dist
    cp *.nsh ../dist
    cp my_app.log ../dist
    
    
    cd ..
    cd dist
    
    mkdir windows
    cp *.jar windows
    cp -r lib windows
    cp -r crypt windows
    cp -r db windows
    cp examples\empty_settings.ini windows\settings_example.ini
    mv *.exe windows
    mv *.ini windows
    mv *.bat windows
    mv *.nsi windows
    mv *.nsh windows
    mv my_app.log windows
    
    
    cd windows
    my_app.nsi
    mv my_appInstaller.exe ../my_appInstaller_gpl.exe
    rm lib\jdbc-mysql.jar
    my_app.nsi
    mv my_appInstaller.exe ../my_appInstaller.exe
    cd ..
    
    rm -rf my_app
    mkdir my_app
    mv *.jar my_app
    mv lib my_app
    mv crypt my_app
    mv db my_app
    
    mv examples\empty_settings.ini my_app\settings.ini
    
    ren my_app 9880
    mkdir my_app
    mv 9880 my_app
    
    
    7z a -r -tzip my_app_gpl.zip doc license examples scripts my_app README.txt my_appInstaller_gpl.exe
    
    rm my_app\9880\lib\jdbc-mysql.jar
    7z a -r -tzip my_app.zip doc license examples scripts my_app README.txt my_appInstaller.exe
    
    
    cd ..
    pause
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Java application that monitors a folder for incoming XML files. When
I have a Java application that launches another java application. The launcher has a
I have a Java application which I want to shutdown 'nicely' when the user
I have a Java application that's very String-heavy - it takes a feed of
I have a java application that has Web Services published using Axis. With the
I have a java application that is connected to a view on a remote
I have a Java EE 6 application developed on Netbeans 7 and try to
I have developed a Java Application that connects with a database (insert, select ...)
I have developed a Java application and now i want to give some simple
I developed a java application using swings and servlets(IDE used:Netbeans).I want to convert the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.