7 Replies - 59310 Views - Last Post: 07 December 2008 - 10:28 PM Rate Topic: -----

#1 mani_tecit  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 28-November 08

How to create batch file for java project?

Post icon  Posted 29 November 2008 - 12:22 AM

Hello Frnz,

Plz guide me to create a batch file for my java project in a step by step process... B)
Is This A Good Question/Topic? 0
  • +

Replies To: How to create batch file for java project?

#2 Martyr2  Icon User is offline

  • Programming Theoretician
  • member icon

Reputation: 4332
  • View blog
  • Posts: 12,126
  • Joined: 18-April 07

Re: How to create batch file for java project?

Posted 29 November 2008 - 01:12 AM

Batch files are not really related to Java but are operating system specific. While the site policy here is that we ask for a "best effort" attempt at showing us something you are working on, I will give you a site that shows you how to setup a DOS batch file to run your java applications with.

Hopefully this will answer your question.

DOS batch files to compile and run a Java Program

:)
Was This Post Helpful? 0
  • +
  • -

#3 mani_tecit  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 28-November 08

Re: How to create batch file for java project?

Posted 29 November 2008 - 03:02 AM

Thanx thanx ...thanx a lot... but that is not sufficient i want it with an example for simple java program for displaying a Hello world

This post has been edited by mani_tecit: 29 November 2008 - 03:19 AM

Was This Post Helpful? 1

#4 Ironwarrior  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 27
  • Joined: 26-November 08

Re: How to create batch file for java project?

Posted 29 November 2008 - 04:10 AM

I think you want the batch file to launch your Java Application:

Example:

echo "Launching Java Application..."
java -jar "location of java file"



So there we go, if you want the location of the Java file, simply build the project and it will tell you on command line.
Was This Post Helpful? 0
  • +
  • -

#5 mani_tecit  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 4
  • Joined: 28-November 08

Re: How to create batch file for java project?

Posted 29 November 2008 - 09:15 AM

Thanx for ur reply...ok this is wat my question is

Can we able to run a simple java application by creating a batch file for it and turning that batch file into an exe file using batch to ext converter?


Please reply...ASAP
Was This Post Helpful? 0
  • +
  • -

#6 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 1948
  • View blog
  • Posts: 4,048
  • Joined: 11-December 07

Re: How to create batch file for java project?

Posted 29 November 2008 - 10:08 AM

Yes, it should work fine. Create the batch file as described above and then convert it to an exe.
Was This Post Helpful? 0
  • +
  • -

#7 sireeshavs  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 07-December 08

Re: How to create batch file for java project?

Posted 07 December 2008 - 10:22 PM

In my project,MakeEatsWeb.java is the main class that opens my project main window.i always run my project from DOS prompt only.now i want to execute it by just clicking a batch file.how i can create it?
Was This Post Helpful? 0
  • +
  • -

#8 pbl  Icon User is offline

  • There is nothing you can't do with a JTable
  • member icon

Reputation: 8327
  • View blog
  • Posts: 31,857
  • Joined: 06-March 08

Re: How to create batch file for java project?

Posted 07 December 2008 - 10:28 PM

View Postsireeshavs, on 7 Dec, 2008 - 09:22 PM, said:

In my project,MakeEatsWeb.java is the main class that opens my project main window.i always run my project from DOS prompt only.now i want to execute it by just clicking a batch file.how i can create it?

If you run it from DOS just have the .bat file yo javac your main class
If you run it from Windows have your .jar file to have a manifest.mf file that points to your main class
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1