Why don't you try adding a println statement to a particular method (if you want to see if its working or if the JVM gets that far). Then if you call that method later and run the code, you can see if that statement is being reached if the text that you placed in your println statement shows up on your console.
If you have alot of code to check and this seems like a rather tedious way to see if the code is running, you can always find out if there is a better way by looking it up in "The Java Developer's Guide to Eclipse" or any Eclipse resource.
There is no such thing as a global variable in Java, thank goodness.
But any IDE can have breakpoints set. You click somewhere to the left of the writing where the line numbers are. There are great differences between Eclipse and NetBeans here: in Eclipse they are blue and in NetBeans breakpoints are red.
Then rather than running the app, debug it. It will run normally until you get to the breakpoint, then you have 3 options:-
Step in (normal flow of control into a called method).
Step over (execute that method without inspecting it).
Step return (finish the present method without further inspection and return to wherever this method was called from).
At any point you can use the debug perspective to inspect the values of all variables in the entire application at that particular point. [ May 14, 2007: Message edited by: Campbell Ritchie ]
?? You were asking how to set Global Value of a System Property in eclipse, not from the command line. So I've replied how to do it in Eclipse, through the "Run..." menu.
Joined: Apr 27, 2006
hi and thanks for the fast reply
you are right but there can be problem because in the way you suggested i will need to set this parameter for each class im executing and i like to make it more global , just set it once and use it all across my applications im developing in eclipse so maybe there is more general way to do this ?