IITDU Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Batch file to run a Java Application

3 posters

Go down

Batch file to run a Java Application Empty Batch file to run a Java Application

Post by BIT0102-Mohaimin Wed Sep 07, 2011 10:09 pm

I need a Batch file to run a Java Application.

Assume that:
1. The batch file is placed in the Application's root directory.
2. Compilation is not required, only execute.


Please do not suggest for executable jar file. That is not what I am looking for.
BIT0102-Mohaimin
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

Back to top Go down

Batch file to run a Java Application Empty Re: Batch file to run a Java Application

Post by BIT0122-Amit Thu Sep 08, 2011 1:33 am

You mean it is a compiled java class file?
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Batch file to run a Java Application Empty Re: Batch file to run a Java Application

Post by BIT0130-Shakkhor Thu Sep 08, 2011 2:44 am

I think this will do the job.
Code:
java -classpath <classpath1>;<classpath2> Main
But i guess you already know this. So what went wrong? pale


Last edited by BIT0130-Shakkhor on Thu Sep 08, 2011 2:46 am; edited 1 time in total
BIT0130-Shakkhor
BIT0130-Shakkhor
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 209
Points : 328

Back to top Go down

Batch file to run a Java Application Empty Re: Batch file to run a Java Application

Post by BIT0122-Amit Thu Sep 08, 2011 2:45 am

Probably the namespace went wrong.
BIT0122-Amit
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

https://iitdu.forumotion.com

Back to top Go down

Batch file to run a Java Application Empty Re: Batch file to run a Java Application

Post by BIT0102-Mohaimin Thu Sep 08, 2011 1:26 pm

BIT0130-Shakkhor wrote:I think this will do the job.
Code:
java -classpath <classpath1>;<classpath2> Main
But i guess you already know this. So what went wrong? pale
Yes I know.
Probably the namespace went wrong.
No.

Problem was with getting current directory. I figured that out. It gets the current directory if you open it by double clicking. No need to do anything. Thanks.
BIT0102-Mohaimin
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

Back to top Go down

Batch file to run a Java Application Empty Re: Batch file to run a Java Application

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum