is it possible to debug a jar which is called inside a shell script

Posted on 2011-10-20
Last Modified: 2012-05-12
I have  shell script which is calling  a jar by the following command
/sbin/java my.jar arg1

And it seems to fail while executing the jar.
I want to debug the jar step by step.
I have control over building hte jar also. Is there a way I  can put denug inforation into this?
Question by:pvinodp
    LVL 86

    Accepted Solution

    >>I have control over building hte jar also.

    So why do you want to debug the jar and not into the source code during the build?
    LVL 47

    Assisted Solution

    You should use -jar when executing the .jar like this:
    /sbin/java -jar my.jar arg1

    You first  run it withiut any script and if it does noit run debug it as a normal java program from a source code.
    LVL 37

    Assisted Solution

    by:Gerwin Jansen
    How did you develop your jar? You should debug in your development environment like Eclipse or add a debug parameter to your code that will display a lot more information besides a stack trace. Are you getting an error or is your jar not doing what it should?

    Author Closing Comment

    thanks for the solution
    LVL 86

    Expert Comment


    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now