Results 1 to 4 of 4
Thread: Batch Files
- 03-22-2010, 12:40 AM #1
Member
- Join Date
- Mar 2010
- Posts
- 21
- Rep Power
- 0
Batch Files
Hi all, I'm wondering (and I know this can be done, I just don't have the file) if anyone knows how to make a batch file to run my java/class file in cmd. I know that my friend when he was writing one used code that looked roughly like this:
Obviously this doesn't work, but does anyone know code that looks similar to this to execute the file? By the way, before I get any really condescending replies, yes, my file has the extension .bat lol.Java Code:@echo off cmd.exe color 6 java xxx.class
Thanks-
- 03-22-2010, 04:21 AM #2
Senior Member
- Join Date
- Nov 2009
- Posts
- 235
- Rep Power
- 4
mine works with just
maybe you need the Class Path?Java Code:java -cp ProgDir ProgName
Edit: Oh, nvm. You can't have the .class
- 03-22-2010, 11:46 AM #3
Member
- Join Date
- Mar 2010
- Posts
- 21
- Rep Power
- 0
Thanks, I finally got it to work with
Java Code:@echo off color 6 java -cp . progName
- 03-22-2010, 11:47 AM #4
Member
- Join Date
- Mar 2010
- Posts
- 21
- Rep Power
- 0
Similar Threads
-
Keep getting this error when i run batch files....
By Pte in forum New To JavaReplies: 23Last Post: 03-20-2010, 09:24 AM -
Batch Executing
By sokolramaj in forum Advanced JavaReplies: 1Last Post: 04-22-2009, 04:17 PM -
Running batch files thraugh java by passing parameters
By pradeesh in forum New To JavaReplies: 1Last Post: 01-16-2009, 10:14 AM -
Batch Files in java
By coco in forum New To JavaReplies: 3Last Post: 12-05-2008, 01:30 PM -
Running batch files in java
By pradeesh in forum New To JavaReplies: 10Last Post: 12-04-2008, 09:26 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks