Extracting source code
how can I extract the source code of an object taken from the standard library of java?
Hi,
rt.jar does contain the runtime class files of the jre - not the sources. I have updated to JDK 1.4.0 and was suprised, that I cannot find a src.jar (guess, it was named so) as in JDK 1.3.1 - so my question is, where are the sources now?- Do I have to download it separately from the JDK now?
greetings Marsian
Similar Messages
-
How to extract Source from .wda file
Hi WebDynpro Experts,
Do you know how to extract source from .wda file. I appreciate your help and will award points for correct answers.
Thank you
Maruti CRHi,
U wont be able to extract source code from wda file.It contains
only class,xml and mf files.The only thing that u would be able
to use is class file which u need to convert to .java file
by .class to .java converter.
Hope this will clear ur doubt.Still if u want to try just extract
wda file using winzip.go on doing this untill u find unzip files.
Regards
Surender Dahiya -
Extracting operators and operands from the source code
Hi there,
I am looking for a way to extract operators and operands from a source code to do a complexity analysis of the code. The final outcome I am expecting is to get the number of operators and operands in the code, to perform a Halstead Complexity Analysis.
Please let me know how this parsing can be done apart from just doing a sequential search of the content in the file.
Any samples and references are highly appreciated.
Thanks in advance!
Regards,
Aravinda777Common way to analyze code is to defining the things you are interested in using some approproate language and then using a parser generator (or compiler compiler = cc). I used antlr some time ago for this reason. Perhaps you want to take a look at it:
http://www.antlr.org/ -
How to read and then extract HTMl source code using java program?
Hi,
Could someone tell me how to read and then extract the content of certain tag from html source code. For example, given url http://.... , I would like to know what the <Title> content <Title> in that page is.
Any help is greatly appreciate.Use a URLConnection to make the connection to the page at the needed URL. From the URLConnection, you can get an InputStream that is the stream of data from that page. Just search through the stream and find the <title> tags (don't forget to check for case sensitivity).
-
How to convert class file to Java source code ?
Hi All ,
Currently am working in Peoplesoft Demo project using java as Plug in.We have only the class files and jar files and we have planned to modify the code for future enhancements.We dont have any legal issues here as we are already working with our client for the original source code.
Kindly help me out in doing this reverse engineering process.We have come to know the below steps would help us out.Can someone guide us in acheiving this process step by step.Please add your experience here and let us know what are the other steps required ..
(1)Rename the file from .jar to .zip and extract the .zip file.
(2)Decompile the desired .class file using 3rd party tool and get .java file.
(3)Modify the .java file and compile it.
(4)Now zip the extracted files and rename the it from .zip to .jar.
We need to verify whether the modified .jar file will work
Thanks & Regards
Kar1983Thanks for your reply ....We have asked them so many times ..but they say they dont have it .Since we have planned to do some enhancements from our end we have planned to do reverse engineering process.
-
ABAP WD, Read the source code of a html page
Hi all,
I have the URL link of .jsp page and I want to get the source code generated by this page to extract some data for my web dynpro.
How do i solve this?
ThanksHi Antonio,
not sure if i understand the question properly.
You want to read html content of http site rendered via jsp.
You can use cl_http_client
to write a simple http client tool.
This tool opens the page. The html content is available to this class.
You can extract the content here.
See the attribute 'response' after making a call.
regards
Phil. -
How to understand the Vector source code for function elements()?
hello all:
This following code snippet is extracted from java.util.Vector source code.
who can tell me how i can understand what the function nextElement does?
thank you
public Enumeration elements() {
return new Enumeration() {
int count = 0;
public boolean hasMoreElements() {
return count < this.num_elem;
public Object nextElement() {
synchronized (Vector.this) { //???
if (count < elementCount) {//???
return elementData[count++];
throw new NoSuchElementException("Vector Enumeration");
}Perhaps code would help more. This codeimport java.util.Vector;
import java.util.Enumeration;
import java.util.Iterator;
public class Test {
public static void main(String[] arghs) {
Vector v = new Vector();
Integer two = new Integer(2);
// Fill the Vector
v.add("One");
v.add(two);
v.add(new StringBuffer("Three"));
// Enumerate through the objects in the vector
System.out.println("---- Enumeration ----");
Enumeration e = v.elements();
while (e.hasMoreElements()) System.out.println(e.nextElement());
// Loop through the objects in the vector
System.out.println("---- Loop ----");
for (int i=0; i<v.size(); i++) System.out.println(v.get(i));
// Iterate through the objects in the vector
System.out.println("---- Iterator ----");
Iterator i = v.iterator();
while (i.hasNext()) System.out.println(i.next());
}produces this output
---- Enumeration ----
One
2
Three
---- Loop ----
One
2
Three
---- Iterator ----
One
2
Three
So, for a Vector, all three do the same thing. However, Iterator is part of the Collection Framework (see [url http://java.sun.com/j2se/1.4.2/docs/guide/collections/index.html]here). This allows you to treat a whole bunch of [url http://java.sun.com/j2se/1.4.2/docs/guide/collections/reference.html]objects which implement the Collection interface all the same way. I know this is way more than you were asking, but I hope it at least clears up what you were asking. -
Runtime Error in source code - LKKBLF99 during MB51
Dear All,
I have config receipt indicator: X Stock Transport Order in MB51. It is Working Completely good in Development in Quality. But it is having dump during i run into production server.
Information on where terminated
Termination occurred in the ABAP program "SAPLKKBL" - in "GEN_FIELD_OUT2".
The main program was "RM07DOCS ".
In the source code you have the termination point in line 2839
of the (Include) program "LKKBLF99".
2825 ----
2826 * FORM GEN_FIELD_OUT2 *
2827 ----
2828 * ........ *
2829 ----
2830 form gen_field_out2.
2831 field-symbols <l_initial>.
2832
2833 case gs_out-field_colcount.
2834 when 001.
2835 if gs_out_flags-slave ne 'X'.
2836 assign <fm01> to <field>.
2837 gs_fc = gs_mfc01.
2838 else.
>>>>> assign <fs01> to <field>.
2840 gs_fc = gs_sfc01.
2841 endif.
Don't understand what happened. Let me have some solution AEAP.
Regards,
Swapnil VaidyaRuntime Errors GETWA_NOT_ASSIGNED
Termination occurred in the ABAP program "SAPLKKBL" - in "GEN_FIELD_OUT2".
The main program was "RM07DOCS ".
In the source code you have the termination point in line 2839
of the (Include) program "LKKBLF99".
Source Code Extract
Line SourceCde
2809 of structure t_outtab_slave to <fs96>.
2810 gs_sfc96 = gs_out_fieldcat.
2811 when 97.
2812 assign component gs_out_fieldcat-fieldname
2813 of structure t_outtab_slave to <fs97>.
2814 gs_sfc97 = gs_out_fieldcat.
2815 when 98.
2816 assign component gs_out_fieldcat-fieldname
2817 of structure t_outtab_slave to <fs98>.
2818 gs_sfc98 = gs_out_fieldcat.
2819 when 99.
2820 assign component gs_out_fieldcat-fieldname
2821 of structure t_outtab_slave to <fs99>.
2822 gs_sfc99 = gs_out_fieldcat.
2823 endcase.
2824 endform. "field_assign_hier_slave
2825 ----
2826 * FORM GEN_FIELD_OUT2 *
2827 ----
2828 * ........ *
2829 ----
2830 form gen_field_out2.
2831 field-symbols <l_initial>.
2832
2833 case gs_out-field_colcount.
2834 when 001.
2835 if gs_out_flags-slave ne 'X'.
2836 assign <fm01> to <field>.
2837 gs_fc = gs_mfc01.
2838 else.
>>>>> assign <fs01> to <field>.
2840 gs_fc = gs_sfc01.
2841 endif.
2842 when 002.
2843 if gs_out_flags-slave ne 'X'.
2844 assign <fm02> to <field>.
2845 gs_fc = gs_mfc02.
2846 else.
2847 assign <fs02> to <field>.
2848 gs_fc = gs_sfc02.
2849 endif.
2850 when 003.
2851 if gs_out_flags-slave ne 'X'.
2852 assign <fm03> to <field>.
2853 gs_fc = gs_mfc03.
2854 else.
2855 assign <fs03> to <field>.
2856 gs_fc = gs_sfc03.
2857 endif.
2858 when 004. -
How can I execute a existing source code in visual studio 2012?
My friend sent me a mini project(ASP.Net) through mail in a zipped folder. I extracted it and it contains source code and databases. I don't know how to execute it in visual studio 2012. I read that I can do it by choosing Project from existing code option
from the file menu.But I don't find the option.Kindly help me how to execute that project which I received through mail in visual studio 2012.In case of ASP Web Sites, which do not require solution and project files, go to FILE
à Open
à Web Site, then select the folder from File System.
If nothing work, then perhaps you do not have the required version of Visual Studio. Then give more details or clarify it with your friend. The database probably requires some preparation steps too. -
Why is so slow filtering links in a website source code?
I was using Automator extracting links from a webpage, and then i pasted them in a textedit document. I thought it would be better doing it by applescripting, but it's sooooo slow; to grab and filter all the links in a website source code lasts about 1 or 2 minutes! With Automator barely 20 secs. I don't know which different process it is inside...
Any ideas?No the code worx... the forum software took away ] and [
tell application "Safari"
tell document 1
set theLinks to (do JavaScript "
var hrefs = new Array();
for (var i=0;i<document.links.length;i++)
hrefs.push(document.links[i])
hrefs;
set site_name to (do JavaScript "document.title")
end tell
end tell
tell application "TextEdit"
launch
set theText to "Link at: " & site_name & return & return
repeat with k from 1 to count of theLinks
set theText to (theText & (item k of theLinks) as text) & return
end repeat
make new document at front with properties {text:theText}
activate
end tell -
ESS source code check in error in CMS
Hi Guys,
Am getting the following error when trying to check in the ESS source code in the CMS NWDI .
com.sap.cms.util.exception.CMSUnexpectedException: cannot load file: /usr/sap/trans/CMS/inbox/SAPESS06_0-20000512.SCA Error: Could not extract file SOURCEARCHIVES/DTRSAP_ESS.sc from archive /usr/sap/trans/CMS/inbox/SAPESS06_0-20000512.SCAAdditional error message is:No space left on device (errno:28)
Though it said no space left, I was able to check in MSS PCUI_GP after this message was thrown when checking in ESS source code.
I was also able to successfully check in and import all other .SCA files except for ESS.
Appreciate any inputs.
regards
SamHi Sameer,
The ESS component is the largest component to be imported and can be problematic in terms of space and memory available to the server. It is more than double the size of the mss package.
This error is clear, you have ran out of space on you disk. Clear up the disk and ensure that you have around 5gb of space free.
Regards
Daniel -
I don't if i post it in the correct forum.
I am trying to find a way to break up a sources code so that it can be interpreted in the form of methods,fields,constructors so that i can exact out the information, like how Netbeans extract the information.
Any one can help ?This could mean one of two things:
1) Format source so that it is easy to parse as you described.
That is easy. Just prepend comments like /*CONSTRUCTOR*/ and have your parser look for those.
2) Parse ANY source file.
Well.. obviously the compiler knows the difference, which should make it obvious that you can devise a set of rules that does so (like, if the method name is the same as the class name, it is counted as a constructor... if it is prepended with a primitive type or class name it is obviously a variable and not a method, etc.). But that is going to be a world class pain in the neck.
This is assuming that you want to break up the actual source using a parser. If you are happy just getting the method signatures and so forth you can use reflection.
Why in the world would you need to do this?
Drake -
Dumping Global ABAP Objects Source Code to Text File
Hello People, this is my first post and my first time to join the forums.. and also my first time to code in ABAP.
Anyways, I was wondering if there is a way to dump the source code definition of any class/interface made in SE24 (Object Builder) onto a Text File; all the methods, attributes etc... of a class/interface. I've used SEO_METHOD_GET_SOURCE but it doesn't work.
Thanks for the help.Suhas,
I have created some wiki links (may be 3-4 months back) which seems similar to this requirement.
[Extracting Implementation details of global Interface using class - CL_RECA_RS_CLIF |http://wiki.sdn.sap.com/wiki/display/ABAP/ExtractingImplementationdetailsofglobalInterfaceusingclass-+CL_RECA_RS_CLIF]
[Information of Class Objects using CL_OO_CLASS |http://wiki.sdn.sap.com/wiki/display/ABAP/InformationofClassObjectsusing+CL_OO_CLASS]
[Source code Download and Syntax Check using CL_RECA_RS_SERVICES|http://wiki.sdn.sap.com/wiki/display/ABAP/SourcecodeDownloadandSyntaxCheckusing+CL_RECA_RS_SERVICES]
Expecting your comments.
Regards
Vinod Kumar
Edited by: Vinod Kumar on May 5, 2011 11:33 AM -
ITS 6.20 & Templates always shows HTML Source code
Hello forum.
I just generated a new services with a dynpro template for transaction FB01 in SAP R/3 Enterprise for an external ITS (6.20 V28). This works fine and I can publish the service to the external ITS (at least I can see the template folder being populated). For this services I activated the following parameters:
~webtransactiontype = EWT
~webgui = 1
~language = EN
~generatedynpro = 1
So I do not want to jump directly into my transaction (I hope that does not matter). All other transactions work fine from the webgui session of the new service but whenever I start my transaction with its published template I only see some the source code of my page. Here you can see an extract:
<!--
This page was created by the
SAP Internet Transaction Server (ITS, Version 6200.1028.7503.5, Build 950057 LIN64, Virtual Server QR2, Add. service info none, WGate-AGate Host its-server, WGate-Instance QR2)
All rights reserved.
Creation time: Fri May 16 17:00:47 2008
Charset: iso-8859-1
Template: zmst/99/sapmf05a_100.html
-->
<pre>
<html class="MobileHtml">
<head>
`if ( ~itsmobileDeviceInclude != "" )
deviceinclude = ~itsmobileDeviceInclude & ".html";
include(service=service, ~language="", theme=theme, ~name=deviceinclude);
end`
Now I'm very confused that the content of my template is enclosed in <pre> tags and I do not know where to disable that tag generation.
Has anyone a clue for me.
Thank you very much in advance.
MarkusSorry but I forgot to say, that I selected ITSMobile as the template generator. Everything works like a charm when I use the WebGui template generator.
So I can narrow down the problem: Does anyone know how to display itsmobile templates correct in an standalone ITS 6.20 28.
Best regards.
Markus -
Read Source code of a Web Page
Hi,
Could anyone suggest an ABAP Function module which when given a web page URL as input downloads the source code of the web page into an internal table. Thanks.
Regards,
Prabaharan.Hi,
Chek this link:
Extracting data from a HTML / XML web page
Hope it helps you.
Pleae reward helpful answers.
Best Regards,
Anjali
Maybe you are looking for
-
I have just got a new desk top and I am trying to work out how to get The creative Cloud programs I use (light Room and Photo Shop) off my old Desk top and onto the new desktop. Does any one know how to do this or have already done it, or do you have
-
Bring a page from one Application to another
Hi, how can I bring a page from one Application to another ? Many thanks.
-
Does anyone know if the latest CHUD dev tools (4.3.2) are Universal binaries? I want to use some of the tools but I noticed there are pref panes in the tool set and I don't want them if they aren't Universal. Anyone know? Peter
-
Printer needs static IP address - I think I know what to do, but not sure
I got a new HP 8500A wireless network printer. I have used a US Robotics MAXg wireless router (Model 5461A) for years with zero issues. I have 2 Windows XP PRO computers, and 1 Windows 7 Home Premium. (Plus the Wii, a Kindle, Blu-Ray player, and coup
-
Self Services-- Payroll & Compensation--- Tax Saving Declarations IND
Hi, Hope you are doing well, am using Peopletools 8.52.12 HRMS 9.1 FP2 Sql server 2008R2 on windows server 2008 In PIA: Self Services-->Payroll & Compensation--->Tax Saving Declarations IND page displaying "You do not have privilege to access the Sel