views:

16

answers:

2

Is it possible to implement or extract batch file in eclipse and debug java project in debug mode. Because without batch file I can't debugging my project and can't set breakpoint.Or some another solution. How to debug my application with use .bat file to start my java project.

A: 

Try remote debugging. Eclipse can attach to remote Java processes, but the Java program must be started with special keys. I don't remember them, google/help for your service.

Lavir the Whiolet
+1  A: 

Is it possible to implement or extract batch file in eclipse and debug java project in debug mode.

Hmm... You can do everything you do with a batch file (assuming you're using it to start a Java program of course) from Eclipse with a Run > Run Configuration... (also available from the contextual menu after a right-click or via the top toolbar).

Because without batch file I can't debugging my project and can't set breakpoint.

Why?! I don't think this is true.

Or some another solution.

Start your class/project in debug mode using Run > Debug (reusing or creating a new Run > Debug Configuration...). Again, this is also available from the contextual menu after a right-click or via the top toolbar.

How to debug my application with use .bat file to start my java project.

To be fully exhaustive, you can run an external program from Eclipse using an Run > External Tools > External Tools Configuration.... And you could indeed use remote debugging options and connect a remote debugger from Eclipse. But honestly, I don't think you need that.

Maybe you should explain what you're trying to do more precisely.

Pascal Thivent
When I start in debug mode I get ArrayIndexOutOfBoundException in the main class which get args[] argument. And after when I insert one value for args[] I get a couple of exception from another class. Because is not only one batch file but it is too big project. And i have problems to complete all in eclipse.
Gogoo
@Gogoo When you create a *Configuration*, you can set program arguments in the *Arguments* tab. Not sure I can be more precise with the current details.
Pascal Thivent