0

I am running the main function of class by running from command line the following:

java -classpath '/Library/apache-tomcat-7.0.62/lib/*:project/webapp/b2c/ROOT/WEB-INF/lib/*' -Xmx3072m  -Xdebug com.myClass

I want to debug this class myClass.

But I cannnot do this while running from command line.

How can I debug myClass from eclipse using the same java -classpath variable

2 Answers 2

1

Right Click the class file -> Select "Debug As" -> Select "Arguments" Tab (provide the arguments)->Select "Apply" ->Select "Debug".

Right Click the class file -> Select "Debug As" -> Select "Classpath" Tab "Select BootStrap Entries"-> Add JARs "Provide jar file location"-> "Apply" ->Select "Debug".

Hope it helps.

Sign up to request clarification or add additional context in comments.

6 Comments

@Saurabh did it help??
@Saurabh Did it help, If it does not please explain the issue you are facing. I will help.
No, I tried both: adding the classpath of the external jar and also added the java -classpath with the arguments as given int he question to the arguments tab.
Add classpath arguments in "classpath" tab.
Xmx will go in Arguments tab and classpath will go in classpath tab.
|
0

When you try to run your class, you can edit the "Run Configurations..." and/or "Debug Configuration...", and you will have an argument tab in which you can set up the classpath

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.