How to invoke jdb for this simple code
up to now i have been debugging by looking at the code, could someone please tell me how
to invoke jdb for the following example, and how would i look at the local values within x & y
(without having to rely on JOptionPane):
//pg73 ex2.16 The x value input must be larger than the y value
import javax.swing.JOptionPane;
public class ex2_11
public static void main(String args[])
int x =2, y=3;
JOptionPane.showMessageDialog( null,
"a x= " x "\n " +
"b the value of x+x is " + (x+x) + "\n " +
"c x= " + "\n " +
"d " + (x+y) + "= " + (y+x),
"Results",JOptionPane.PLAIN_MESSAGE);
System.exit(0);
I think I have already answered this question somewhere else, but I will reiterate it here.
If you have compile errors in your source code (i.e. you left the semi-colon off at the end of a statement), a class file will not get generated.
What you have done is the following:
1. created a working java source file
2. compiled that file and generated a class file
3. then changed the working source file and introduced a compiler error (i.e. you left the semi-colon off at the end of a statement)
4. then attempted to compile the file (with javac), but due to the compiler error a new class file did not get generated (therefore the old class file from the previous compile still resides on your machine).
5. Then you ran jdb on the old previously generated class file.
To confirm what I am saying is true. Delete the class file, then try to generate it again after introducing your compiler error. A new class file will not get generated and therefore you won't be able to use jdb (as jdb requires the class files).
Hope this helps (and gets me the duke dollars),
Tim
Similar Messages
-
How to create workflow for this simple scienerio
HI Gurus,
I have to create a simple workflow. But I have a problem what the object type I have to choose.
Scenerio of the workflow is ..
This workflow gets pernr and benefit plan information from portal.
this workflow is a one step approval mail
In the workflow three steps are there.
In the first step i have to derive basic hourly salary of the person by using infotype --- 008 and company code for the pernr from the 0001 and benefit plan he enrolled
Second step ---
there are two company codes, I have to use condition step,
if one company code I have to send to one hr department mail for approval
and the other for another hr department step.
in the workitem i have to pass salary information, pernr information.
third step, after approval I have to update the respective infotype.
My question is for the above scenerio, what object type I have to use.
For the first step is there any method I have to create which calls function module.
if so for which object type i have to add method.
third how do I create the workflow container for this.
I am new to workflow. I know scenerio is simple but I dont know how to do it.
Please help me friends.
Ravithink you should create your own Business Object or you can refer to Business Object EMPSALPACK.
Now Company Code should be an Attribute that you should do the Coding For.
Use this attribute in the Condition Step of Workflow Template.
Workflow Container will contain the Business Object that you will be creating. The Business object should have Key Field Pernr and may be anything relevant that you will do for Coding. I think you might have to trigger the Event of the Business Object through code.
Check the Code below.
<b>Reward Appropriate Point if useful</b>
INCLUDE <cntn01> .
DATA:i_emp_details TYPE STANDARD TABLE OF p0001, "Employee Details
wa_request TYPE p0001, "Workarea for Employee details
v_country_grp TYPE molga, "Country SubGrouping
v_object_key TYPE sweinstcou-objkey. "Key for the buisness object ZWOBUSTRIP
CONSTANTS: c_bo_trip TYPE swo_objtyp VALUE 'ZWOBUSTRIP',
c_event_trip TYPE swo_event VALUE 'TripCreate',
c_infy_type_1 TYPE infty VALUE '0001'.
Event Container declaration
swc_container i_event_cont.
swc_create_container i_event_cont.
Reading the INFO TYPE 0001 to obtain the
Employee details
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = i_emp_number
infty = c_infy_type_1
begda = sy-datum
endda = sy-datum
TABLES
infty_tab = i_emp_details
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
SY-SUBRC check is not required as the error
handelling will be done by WorkFlow rule
resolution.
CLEAR wa_request.
READ TABLE i_emp_details INTO wa_request INDEX 1.
IF sy-subrc = 0.
Retrieving the Country SubGrouping for the employee
SELECT SINGLE molga
FROM t001p
INTO v_country_grp
WHERE werks = wa_request-werks
AND btrtl = wa_request-persk.
ENDIF.
Sending the relevant data to event container
swc_set_element i_event_cont 'EmpId' i_emp_number.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'PersonnelArea' wa_request-werks.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'CountryGrouping' v_country_grp.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpSubGrp' wa_request-persk.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpTripId' i_emp_trip.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
Raising the event to trigger the workflow
v_object_key = i_emp_number.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = c_bo_trip
objkey = v_object_key
event = c_event_trip
TABLES
event_container = i_event_cont
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
COMMIT WORK.
ENDFUNCTION.
Thanks
Arghadip -
HT201303 How to I get by this security code that this is asking for?
How to I get by this security code that this is asking for?
Thanks, Stedman, that is helpful (I seem to be able to get past the "bubble" somewhat) but it is still there....I have, in the past, stroked across the music of choice and that was it...now the "bubble" with the choice name comes up and if I go all the way across I get a delete choice? Can you help with this also or where would I go to research changes (I see there are 200!!!) in this upgrade?
-
How to write query for this in TopLink ?
I am doing a simple search in jsp where the search will the based on the choices chosen by user.
I had given 3 check boxes for those choices.
The problem is, query will be based on the choice or choices chosed by the user.
How to write query for this in TopLink ?
Thanks in Advance..
JayaganeshTry below solution, it is NOT best solution but might work:
Declare @Questions TABLE (QuestionID INT, QuestionText Varchar(100))
INSERT INTO @Questions
VALUES (1, 'Comment'), (2, 'Score')
DECLARE @Answers TABLE (authkey INT, QuestionID INT, questiontext VARCHAR(100), answertext VARCHAR(100))
INSERT INTO @Answers
VALUES (101, 1, 'comment', 'hi!!'), (101, 2, 'score', '4'), (102, 1, 'comment', 'excellent'), (102, 2, 'score', '5'), (103, 2, 'score', '6'), (104, 2, 'score', '8')
SELECT
A.AuthKey
,Q.QuestionID
,Q.QuestionText
,A.AnswerText
FROM
@Questions Q
INNER JOIN @Answers A ON Q.QuestionID = A.QuestionID
UNION
SELECT
A.AuthKey
,Q.QuestionID
,Q.QuestionText
,Null
FROM
@Questions Q
CROSS JOIN @Answers A
WHERE
NOT EXISTS (SELECT 1 FROM @Answers SubQry WHERE SubQry.AuthKey = A.AuthKey AND SubQry.QuestionID = Q.QuestionID)
Output
AuthKey | QuestionID
| QuestionText
| AnswerText
101 | 1 | Comment | hi!!
101 | 2 | Score | 4
102 | 1 | Comment | excellent
102 | 2 | Score | 5
103 | 1 | Comment | NULL
103 | 2 | Score | 6
104 | 1 | Comment | NULL
104 | 2 | Score | 8
Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered. -
What's wrong with this simple code?
What's wrong with this simple code? Complier points out that
1. a '{' is expected at line6;
2. Statement expected at the line which PI is declared;
3. Type expected at "System.out.println("Demostrating PI");"
However, I can't figure out them. Please help. Thanks.
Here is the code:
import java.util.*;
public class DebugTwo3
// This class demonstrates some math methods
public static void main(String args[])
public static final double PI = 3.14159;
double radius = 2.00;
double area;
double roundArea;
System.out.println("Demonstrating PI");
area = PI * radius * radius;
System.out.println("area is " + area);
roundArea = Math.round(area);
System.out.println("Rounded area is " + roundArea);Change your code to this:
import java.util.*;
public class DebugTwo3
public static final double PI = 3.14159;
public static void main(String args[])
double radius = 2.00;
double area;
double roundArea;
System.out.println("Demonstrating PI");
area = PI * radius * radius;
System.out.println("area is " + area);
roundArea = Math.round(area);
System.out.println("Rounded area is " + roundArea);
Klint -
The tax code entered is not defined in the country for this company code
HI ALL
when we relase billing document to finance i am getting this below error
Diagnosis
The tax code entered is not defined in the country for this
company code.
System Response
Procedure
Check and, if necessary, correct the entry.
Procedure for System Administration
If it is not an input error, check and possibly change the
system settings.
To do this, choose Maintain entries (F5).
1. Check whether the required tax determination procedure
is assigned to the relevant country. the Procedure
field is in the detail screen.
2. Create a new tax code if required.
Thanks & Regards
AarmanYou can define the tax code for your country using the following menupath in customizing:
IMG>Financial Accounting>Financial Accounting Global Settings>Tax on Sales and Purchases>Calculation-->Define tax codes ........... in the next screen enter your country and then the tax code you wish to create and press enter. You would be then directed to another screen, where you would maintain the description and whether it is a Input tax or Output tax and then maintain the appropriate tax percentage and save.
Your country should also be assigned to a calculation procedure. You check the same using the same menupath as mentioned above: .............Tax on Sales and purchases>Basic Settings>Assign country to calculation procedure........In the next screen, enter the appropriate tax procedure for your country. Eg: for country DE assign tax procedure as TAXD and save.
Hope this helps.
Regards
SATYA -
Need pl/sql stmnts. for this simple logic
Hi,
I need PL/SQL program for this simple logic i am doing mistake somewhere unbale to trace
out ..
select * from GSR03_PO_DTL;
PO_NUM
L53177000 -- > no changes reqd (only one entry with new format)
L00041677 --> to be updated to L41677000(only one entry with OLD format)
L43677000 -- > no change reqd (exists one row with new format and old format like below)
L00043677 -- > to be deleted this is old format (and new format like above already exists)
EX:
L00012345 --- old format
L12345000 --- new format
Hope question is clear. I written the following program.
update is working fine but delete is not working.
Please help.
Thanks in Advance
Devender
declare
Cursor c_test is
(select po_num from GSR03_PO_DTL);
BEGIN
FOR r_test in c_Test
LOOP
dbms_output.put_line (r_test.po_num);
IF ('L'||substr(r_test.po_num,5,5)) = ('L'||substr(r_test.po_num,2,5)) then
dbms_output.put_line ('delete stmnt');
END IF;
EXIT WHEN c_test%NOTFOUND;
END LOOP;
FOR r_test in c_Test
LOOP
IF r_test.po_num like 'L000%' then
IF ('L'||substr(r_test.po_num,5,5)) is not NULL then
update GSR03_PO_DTL set PO_NUM = 'L'||substr(po_num,5,5)||'000'
where po_num like 'L000%' ;
dbms_output.put_line ('update stmnt');
END IF;
END IF;
END LOOP;
END;
*********************No need for PL/SQL, man.
SQL> SELECT po_no FROM po1
2 /
PO_NO
L53177000
L00041677
L43677000
L00043677
SQL> UPDATE po1 y
2 SET y.po_no = 'L'||substr(y.po_no,5,5)||'000'
3 WHERE y.po_no LIKE 'L000%'
4 AND NOT EXISTS ( SELECT null FROM po1 x
5 WHERE x.po_no = 'L'||substr(y.po_no,5,5)||'000')
6 /
1 row updated.
SQL> DELETE FROM po1 y
2 WHERE y.po_no LIKE 'L000%'
3 AND EXISTS ( SELECT null FROM po1 x
4 WHERE x.po_no = 'L'||substr(y.po_no,5,5)||'000')
5 /
1 row deleted.
SQL> SELECT po_no FROM po1
2 /
PO_NO
L53177000
L41677000
L43677000
SQL> Cheers, APC -
How to trigger updateMarker for TextEditor from code
I'm making my own marker. But when I change document programmatically, I couldn't trigger updateMarker. So markers're indexs don't change.Markers has not showed correctly. How to trigger updateMarker for TextEditor from code?
Hi Viren,
Glad that your problem is resolved.
Help.Sap.com is the best reference: http://help.sap.com/saphelp_nw04/helpdata/en/b2/e50138fede083de10000009b38f8cf/frameset.htm
Also check the "How-To" docs in https://www.sdn.sap.com/irj/sdn/developerareas/bi
Bye
Dinesh -
802.11a network not supported for this Country Code
Hi, I get the following error whne enabling 802.11a network on a AIR-WLC2106-K9. Country is set to ID (Indonesia)
>config 802.11a enable network
802.11a network not supported for this Country Code
Yet, on a AIR-CT2504-K9, set to same country code there is no problem.
Is this a WLC model or version issue? WLC2106 is on version 6.0.199.4 while the CT2504 is 7.0.220.0
AndrewWell is it the only country code selected? Also you might as well upgrade the 2106 to 7.0.x and move off the 6.0.x. Since your 2604 is at that code you might as well upgrade the 2106 and see. I'm guessing that you have the same APs and the APs are for that country.
Sent from Cisco Technical Support iPhone App -
I upgraded my Icloud storage yesterday by 10GB, but one day later realize I did not need to do so. The apple advice is to cancel within 15 days for a refund, but does not tell you how to do so. Anyone know how to contact apple for this purpose?
You would have to contact Apple in order to do that. Just use this link to ask Apple for a refund: http://www.apple.com/support/contact/
-
pls i need help for this simple problem of my palm os zire 72. pls share your ideas with me.... i tried to connect my palm os zire72 in my desktop computer using my usb cable but i can't see it in my computer.. my palm has no problem and it works well. the only problem is that, my desktop computer can't find my palm when i tried to connect it using usb cable. is thier any certain driver or installer needed for it so that i can view my files in my palm using the computer. where i can download its driver? is there somebody can help me for this problem? just email me pls at [email protected] i really accept any suggestions for this problem. thanks for your help...
If you are using Windows Vista go to All Programs/Palm and click on the folder and select Hot Sync Manager and then try to sync with the USB cable. If you are using the Windows XP go to Start/Programs/Palm/Hot Sync Manager and then try to sync. If you don’t have the palm folder at all on your PC you have to install it. Here is the link http://kb.palm.com/wps/portal/kb/common/article/33219_en.html that version 4.2.1 will be working for your device Zire 72.
-
Apple Logo and Progress Bar Stuck 1 out of 5 while Restoring my iPhone 5 to iOS8. How can i Do for This Problem. Sometime iTunes say An Unknown error occured (error -14) iTunes Version is 11.4
The error that you are seeing has to do with your Internet connection. Try disabling your anti-virus software and connect the iPhone again and try to restore. See this support document for help. http://support.apple.com/kb/HT1808
-
How to create workflow for this scenerio
HI Gurus,
I am new to workflow.
I have to create a workflow. But I have a problem what the object type I have to choose. It may be simple but i dont know do it.
Scenerio of the workflow given is...
This workflow gets pernr and benefit plan information from portal.
this workflow is a one step approval mail
In the workflow three steps are there.
In the first step i have to derive basic hourly salary of the person by using infotype --- 008 and company code for the pernr from the 0001 and benefit plan he enrolled
Second step ---
there are two company codes, I have to use condition step,
if one company code I have to send to one hr department mail for approval
and the other for another hr department step.
in the workitem i have to pass salary information, pernr information.
third step, after approval I have to update the respective infotype.
My question is for the above scenerio, what object type I have to use.
For the first step is there any method I have to create which calls function module.
if so for which object type i have to add method.
third how do I create the workflow container for this.
I am new to workflow. Please help me friends.
RaviI think you should create your own Business Object or you can refer to Business Object EMPSALPACK.
Now Company Code should be an Attribute that you should do the Coding For.
Use this attribute in the Condition Step of Workflow Template.
Workflow Container will contain the Business Object that you will be creating. The Business object should have Key Field Pernr and may be anything relevant that you will do for Coding. I think you might have to trigger the Event of the Business Object through code.
Check the Code below.
<b>Reward Appropriate Point if useful</b>
INCLUDE <cntn01> .
DATA:i_emp_details TYPE STANDARD TABLE OF p0001, "Employee Details
wa_request TYPE p0001, "Workarea for Employee details
v_country_grp TYPE molga, "Country SubGrouping
v_object_key TYPE sweinstcou-objkey. "Key for the buisness object ZWOBUSTRIP
CONSTANTS: c_bo_trip TYPE swo_objtyp VALUE 'ZWOBUSTRIP',
c_event_trip TYPE swo_event VALUE 'TripCreate',
c_infy_type_1 TYPE infty VALUE '0001'.
Event Container declaration
swc_container i_event_cont.
swc_create_container i_event_cont.
Reading the INFO TYPE 0001 to obtain the
Employee details
CALL FUNCTION 'HR_READ_INFOTYPE'
EXPORTING
pernr = i_emp_number
infty = c_infy_type_1
begda = sy-datum
endda = sy-datum
TABLES
infty_tab = i_emp_details
EXCEPTIONS
infty_not_found = 1
OTHERS = 2.
SY-SUBRC check is not required as the error
handelling will be done by WorkFlow rule
resolution.
CLEAR wa_request.
READ TABLE i_emp_details INTO wa_request INDEX 1.
IF sy-subrc = 0.
Retrieving the Country SubGrouping for the employee
SELECT SINGLE molga
FROM t001p
INTO v_country_grp
WHERE werks = wa_request-werks
AND btrtl = wa_request-persk.
ENDIF.
Sending the relevant data to event container
swc_set_element i_event_cont 'EmpId' i_emp_number.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'PersonnelArea' wa_request-werks.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'CountryGrouping' v_country_grp.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpSubGrp' wa_request-persk.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
swc_set_element i_event_cont 'EmpTripId' i_emp_trip.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
Raising the event to trigger the workflow
v_object_key = i_emp_number.
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = c_bo_trip
objkey = v_object_key
event = c_event_trip
TABLES
event_container = i_event_cont
EXCEPTIONS
objtype_not_found = 1
OTHERS = 2.
IF sy-subrc <> 0.
No Processing needed.
ENDIF.
COMMIT WORK.
ENDFUNCTION.
Thanks
Arghadip -
Is there a way to create a schema for this simple XML?
Hi! A simple question. Suppose we have a XML that looks like that (simplified)
<documents>
<total>2</total>
<doc_1>
<name>My document</name>
<code>1234</code>
</doc_1>
<doc_2>
<name>Another document</name>
<code>5678</code>
</doc_2>
</documents>In this simple example, if the tag <total> had a numer of three, there would be a <doc_3> tag.
Is it posible to create a XSD to this XML? And is it posible for JAXB to process that XSD?
Thank you in advanceThere are some tools around to generate XML Schemas from instance documents, but I don't know if they are too smart. For example, XMLSPY created the following Schema from your sample:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:element name="code">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="1234"/>
<xs:enumeration value="5678"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="doc_1">
<xs:complexType>
<xs:sequence>
<xs:element ref="name"/>
<xs:element ref="code"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="doc_2">
<xs:complexType>
<xs:sequence>
<xs:element ref="name"/>
<xs:element ref="code"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="documents">
<xs:complexType>
<xs:sequence>
<xs:element ref="total"/>
<xs:element ref="doc_1"/>
<xs:element ref="doc_2"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="name">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value="Another document"/>
<xs:enumeration value="My document"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="total">
<xs:simpleType>
<xs:restriction base="xs:byte">
<xs:enumeration value="2"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:schema>XMLSPY has done its best but this Schema could certainly be cleaned up and made more efficient. If your instance documents aren't going to be too complex, it's probably best to have a tool like XMLSPY start you off, then you can go in by hand.
But, once you have the Schema in hand, you're ready to get started with JAXB. -
How to invoke JavaScript for Premiere Pro CC?
Hi,
I am new to Adobe CC products/scripting and I'm trying to control Adobe Premiere Pro CC from another desktop application. Using ExtendScript Toolkit, from its UI, I can invoke JavaScript commands or files.
But I can't find any way for my desktop application to invoke JavaScript commands. I can't seem to find any command line tool for it (no documentation either and JavaScript doesn't seem to be officially supported). Any help regarding this would be greatly appreciated.
I tried using the Socket object on a .jsx file to act as a server (to listen for commands from my desktop application) and placing it on the common startup script folder. But the start up script blocks the UI of the Premiere Pro application entirely (even if I use "$.sleep(milliseconds)" function in between the "poll" function for acquiring a connection). This wouldn't work for my application as I can't block the UI.
For After After Effects CC, I can use the "afterfx.exe" on Windows and AppleScript with "DoScript" command on Mac, to execute JavaScript expressions or files. But this doesn't seem to work with Premiere Pro or any Adobe CC products. For Photoshop, I can just open any .jsx file with Photoshop (for e.g. "Open With") and it runs the .jsx file. But this technique doesn't work with all the other Adobe CC products (even the ones which support JavaScript officially).
According to Adobe Premiere Pro developer centre, there is no mention of any JavaScript support. But since the functionality does seem to be there (as discovered through ExtendScript Toolkit), I am hoping I can get away just by using JavaScript commands to control Premiere, as opposed to using the native SDK for Plugins. However, I really hope Adobe Premiere Pro folks are seeing this and they officially support JavaScript soon .
Thanks for your help.Hi all,
Any help? Seems that the general Adobe Premiere forum is a lot more active in terms of responses. That is why I originally kept in the general forum at first.
Due to the lack of documentation, I ended up spending even more time just to figure out how to invoke Premiere Pro with a JavaScript file, from the command line. But no luck still . Any advice would be greatly appreciated.
Thanks.
Maybe you are looking for
-
TS3276 Lost messages in the sent messages folder?
Has anyone lost mobileme (icloud) messages in the sent messages folder?
-
How do I get rid of the back-up on Time Machine?
Got rid of a computer, how do I get rid of the back-up on Time Machine (housed on a Time Capsule)? Can I safely just delete the sparsebundle file?
-
How to hide report region?
Hi All, In my application i am uisng the serach visibility concept when i am click on Search link i am displaying the another report as message, since they have not entered or selected any thing before clicking on serach button. <{font size="7" color
-
I keep getting a "Network Timed Out" error while trying to update to iOs5. Help?
I've tried about 100 times to update and every time I get an error saying that the network has timed out.
-
Show popup in jsff at page load
Hi, I see a lot of posts and blogs discussing the scenario of showing af popup at page load but could not find a case where the popup component is in a jsff page fragment. I have a popup in a jsff page fragment which goes as a region in multiple jspx