Batch file to run a Java Application

View previous topic View next topic Go down

Batch file to run a Java Application

Post by BIT0102-Mohaimin on 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.
avatar
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

View user profile

Back to top Go down

Re: Batch file to run a Java Application

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

You mean it is a compiled java class file?

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|About me|My Blog|
avatar
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

View user profile http://iitdu.forumsmotion.com

Back to top Go down

Re: Batch file to run a Java Application

Post by BIT0130-Shakkhor on 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

_________________________________________________________________
I'm not a driver with drinking problem.
I'm an alcoholic with driving problem.

Blog | বাংলা ব্লগ
avatar
BIT0130-Shakkhor
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 209
Points : 328

View user profile

Back to top Go down

Re: Batch file to run a Java Application

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

Probably the namespace went wrong.

_________________________________________________________________
Adminship / Moderatorship is not about power, it is about Responsibility.

|About me|My Blog|
avatar
BIT0122-Amit
Founder
Founder

Course(s) :
  • BIT

Blood Group : O+
Posts : 4187
Points : 6605

View user profile http://iitdu.forumsmotion.com

Back to top Go down

Re: Batch file to run a Java Application

Post by BIT0102-Mohaimin on 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.
avatar
BIT0102-Mohaimin
Programmer
Programmer

Course(s) :
  • BIT

Blood Group : B+
Posts : 415
Points : 715

View user profile

Back to top Go down

Re: Batch file to run a Java Application

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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