• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Shortcut for Project Execution

 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My project is complete now . How I execute my project is :

1] I have put my project into a folder ( studentpro ) & that folder is inside bin folder of jdk .

2] for execution , I go in that folder ( studentpro ) from command prompt & then I set path like this :

set path=.;c:/program files/java/jdk1.5.0/bin

otherwise 'javac' command doesn't work .

3] after this I take classes12.zip file into my class path like this :

set classpath=.;c:/program files/java/jdk1.5.0/bin/classes12.zip
( I have put classes12.zip into my bin folder )

4] then compile & execute .


I know there will be any shortcut for this or I am doing unnecessary things . What I want is there should be one batch file ( .bat ) on desktop & project should start after clicking on that .

please help me ...

lots of thanks .
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Set required libraries in your system classpath, atleast jdk should be at your systems classpath.
Better use ant script for compiling and running the app.

cheers.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Didn't get ..
Please explain it in detail ..

thanks .
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rathi,
i am talking about apache ANT tool.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am new to this ...
please can you explain it in details .
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rathi,
I think ant is overkill for this. When you do larger projects, it is something to look into. (When the time comes we have an Ant forum below.)

Creating a batch file is a good idea. Create a file with the extension .bat. Open the file in notepad and type in the commands you put in your initial post. Then you can double click and run the batch file.

Adeel raises a good point that you will likely be using the same path/classpath settings repeatedly. You can set these under the control panel in Windows and the login script in UNIX/Linux.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I tried that only but is is not working .
here is my batch file ( start.bat )


cd program files/java/jdk1.5.0/bin/ankurp

set path=.;c:/program files/java/jdk1.5.0

set classpath=.;c:/program files/java/jdk1.5.0/bin/classes12.zip

javac my/Start.java

java my.Strat


please help ...
thanks .
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry ...

It is working now ...

I used slash ( / ) instead of backslash ( \ ) in first line .

Thanks .
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rathi,
Glad to hear you got it working.
 
ankur rathi
Ranch Hand
Posts: 3830
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Now my that project is completed . But in new project I have to use Ant .
Can any body explain me this in short .
What I know is :
Ant is a open source project that help us to build & compile java application .

please help ...
thanks .
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

What I know is :
Ant is a open source project that help us to build & compile java application

Well, almost. A better definition is that is it a tool to help build and deploy applications (whether they contain code written in Java or not).

I think you need to read the manual. Any difficulties, post them in the Ant forum and I'm sure someone will help.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic