eclipse batch file
Have a couple questions.
Is there an easy way of running a batch file from Eclipse?
Also, for this project I just have jar files. I also have the source code located somewhere else. Can I debug somehow by attaching source. How do you do this and how to set breakpoints.
"batch file", you mean .bat file / .sh file ?. You can create that file and run it by double clicking (Opening it with default editor/ system editor). I havent tried .sh but should be okay.
Somewhere else, as long it is in local or accessible network place you can click on properties(After you put the jar file in build path) and look for source attachment.
After the source location is attached to jar file. Open the class file from jar. You will see source displayed. You can put breakpoint on it just like other regular java source files.
I tried running my .bat file and it does attempt to run but I'm getting a can find main class error. If I run it outside of ecipse(DOS, or Explorer) it works OK. It's running a main that is contained in a jar file. The project properties includes the jar files in the java build path.
can you paste the content of your bat file ?? (or PM)
First put the jar file in the build path (Right click > Build path > add to build path).
Then right click the jar file inside the referenced library (Search for the jar file in project structure). Click on properties. You will see it.
start /min "Program" java -Xmx500M -cp ../lib/thejar.jar it.program
where it.program has a main. This works OK when I start the script from DOS command line. The jar file is in the build path
Try with full path for ../lib thing ..
one more question
the full path did work thanks.
One more question. This .bat file launches a java program. How do I launch in the debugger using the .bat file?