Help in source code

This code generate the exception can someone help me...
Exception in thread "main" java.lang.ClassNotFoundException: Hello
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
at New.main(New.java:21)
public class New
public static void main(String[] args)
throws Exception
URL u = new URL("http" , "www.javageeks.com",
"/SSJ/examples/");
URLClassLoader ucl = new URLClassLoader(new URL[] { u });
Object obj =
ucl.loadClass("Hello").newInstance();

It appears that the "Hello" class has disappeared from the URL you were trying to get it from. I put a Hello class out at jroots.org, if you use the line
URL u = new URL("http://www.jroots.org");to build your URL and leave the rest of your code as is then you should get some success, the class has one method, getMessage(), that returns a string. You can cast your obj object to be a Hello object and call that method as:
Hello newClass = (Hello)obj;
System.out.println(newClass.getMessage());Hope that helped.
Lee

Similar Messages

  • Help With Source Code

    Heya,
    I have a small problem with my source code and I can't seem to figure out where the problem is.
    Description of problem:
    String getTracks(String artist) in class TrackList displays the tracks in an album in numerical order. For instance:
    The tracks are:
    1. xxxxxxxxxx
    2. xxxxxxxxxx
    3. xxxxxxxxxx
    4.
    The problem is, an additional number would appear after all the tracks have been displayed. In this case, 3 tracks are displayed and a redundant number (4.) appears below. And if there are 4 tracks to be displayed, a (5.) would appear and so on. Does anybody know where the source of the problem is?
    My source code for class TrackList is as follows:
    import java.util.ArrayList;
    public class TrackList
    private ArrayList trackList;
    public TrackList()
    trackList = new ArrayList();
    public void add(String artist, String album, String tracks)
    trackList.add(new Artist(artist,album,tracks));
    public void remove(String artist)
    for (int n = 0 ; n < trackList.size() ; n++)
    Artist a = (Artist)trackList.get(n);
    if (a.getArtist().toLowerCase().equals(artist.toLowerCase()))
    trackList.remove(n);
    public String getAlbum(String artist)
    for (int n = 0 ; n < trackList.size() ; n++)
    Artist a = (Artist)trackList.get(n);
    if (a.getArtist().toLowerCase().equals(artist.toLowerCase()))
    return a.getAlbum();
    return "";
    public String getTracks(String artist)
    String tracksToReturn = "";
    int trackNumber = 1;
    for (int n = 0 ; n < trackList.size() ; n++)
    Artist a = (Artist)trackList.get(n);
    if (a.getArtist().toLowerCase().equals(artist.toLowerCase()))
    tracksToReturn += trackNumber + ". " + a.getTracks() + "\n";
    trackNumber++;
    return tracksToReturn;
    public void writeToFile(FileOutput file)
    for (int n = 0 ; n < trackList.size() ; n++)
    Artist a = (Artist)trackList.get(n);
    file.writeString(a.getArtist());
    file.writeNewline();
    file.writeString(a.getAlbum());
    file.writeNewline();
    public void readFromFile(FileInput file)
    String artist = file.readString();
    String album = file.readString();
    String tracks = file.readString();
    while (!file.eof())
    add(artist,album,tracks);
    artist = file.readString();
    album = file.readString();
    tracks = file.readString();
    Not sure if this other class has an impact on this. It's class Catalogue. Look at void TrackList(String artist).
    public class Catalogue
    private KeyboardInput in;
    private TrackList trackList;
    public Catalogue()
    in = new KeyboardInput();
    trackList = new TrackList();
    public void go()
    boolean quit = false;
    while (!quit)
    System.out.println("\nCatalogue");
    System.out.println("1. Search artist, album and tracks");
    System.out.println("2. Add new artist, album and tracks");
    System.out.println("3. Remove artist, album and tracks");
    System.out.println("4. Save entry to a file");
    System.out.println("5. Add an entry from a file");
    System.out.println("6. Quit");
    System.out.print("\nSelect an option from the menu: ");
    int option = in.readInteger();
    switch (option)
    case 1 :
    searchForEntry();
    break;
    case 2 :
    addEntry();
    break;
    case 3 :
    removeEntry();
    break;
    case 4 :
    saveList();
    break;
    case 5 :
    loadList();
    break;
    case 6 :
    quit = true;
    break;
    default :
    System.out.println("\nThat option is invalid. Please try again.");
    public void addEntry()
    System.out.println("\nAdd entry to catalogue");
    System.out.print("Enter the artist's name: ");
    String artist = in.readString();
    System.out.print("Enter the artist's album: ");
    String album = in.readString();
    System.out.println("Enter the track names and enter when done: ");
    int trackNumber = 1;
    String tracks;
    do
    System.out.print("Enter track " + trackNumber + ": ");
    tracks = in.readString();
    trackList.add(artist,album,tracks);
    trackNumber++;
    while (!tracks.equals(""));
    public void removeEntry()
    System.out.println("\nRemove entry from catalogue");
    System.out.print("Enter the artist's name: ");
    String artist = in.readString();
    trackList.remove(artist);
    public void searchForEntry()
    System.out.println("\nSearch catalogue");
    System.out.print("Enter the artist's name: ");
    String artist = in.readString();
    String album = trackList.getAlbum(artist);
    if (album.equals(""))
    System.out.println("\nThere were no matches for your search. Please try again.");
    else
    System.out.println("The album is: " + album);
    boolean quit = false;
    while (!quit)
    System.out.println("\nSelect an option: ");
    System.out.println("1. Display the tracks for this album");
    System.out.println("2. Back");
    int option = in.readInteger();
    switch (option)
    case 1 :
    trackList(artist);
    break;
    case 2 :
    quit = true;
    break;
    default :
    System.out.println("\nThat option is invalid. Please try again.");
    public void trackList(String artist)
    String tracks = trackList.getTracks(artist);
    if (tracks.equals(""))
    System.out.println("\nThere were no tracks entered for this album.");
    else
    System.out.println("\nThe tracks are:");
    System.out.println(tracks);
    public void saveList()
    System.out.println("\nSave catalogue to a file");
    System.out.print("Enter the file name: ");
    String fileName = in.readString();
    FileOutput out = new FileOutput(fileName);
    trackList.writeToFile(out);
    out.close();
    public void loadList()
    System.out.println("\nAppend catalogue from a file");
    System.out.print("Enter the file name: ");
    String fileName = in.readString();
    FileInput fileIn = new FileInput(fileName);
    trackList.readFromFile(fileIn);
    fileIn.close();
    public static void main(String[] args)
    Catalogue catalogue = new Catalogue();
    catalogue.go();
    Thank you very much indeed!
    Sincerely,
    e360

    This is not about JavaHelp technology. Please use another forum, thank you.
    /M

  • Source code help plz

    hi
    ineed help with source codes of undeniable digital signature implementation and subliminal channals...plz any1 help
    regards

    Stop crossposting!
    http://forum.java.sun.com/thread.jspa?threadID=575408

  • How can I print source code with connecting lines on control structures?

    Anyone know of any programs that will format source code printouts and print connecting lines from the start to the end of control structures (such as: if--"end if", while-"end while" etc.)?

    Indentations and comments do help read source code. However, when you have a large program with many levels of nesting of control structures the readability of the code (even with indentations) becomes very difficult.

  • I need Expert Decomposition of classes in Source Code for my reaserch purpose. Any body can help me in this regard?

    <blockquote>Locked by Moderator as a duplicate/re-post.
    Please continue the discussion in this thread: [tiki-view_forum_thread.php?comments_parentId=698286&forumId=1]
    Thanks - c</blockquote>
    == Issue
    ==
    I have another kind of problem with Firefox
    == Description
    ==
    I need Expert Decomposition of classes in Source Code of Firefox for my research purpose. Any body can help me in this regard?
    == This happened
    ==
    Not sure how often
    == Firefox version
    ==
    3.0.19
    == Operating system
    ==
    Windows XP
    == User Agent
    ==
    Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.19) Gecko/2010031422 Firefox/3.0.19
    == Plugins installed
    ==
    *-Default Plug-in
    *RealPlayer(tm) LiveConnect-Enabled Plug-In
    *6.0.12.1662
    *Office Plugin for Netscape Navigator
    *Google Update
    *Shockwave Flash 10.1 r53
    *Yahoo Application State Plugin version 1.0.0.7
    *Next Generation Java Plug-in 1.6.0_18 for Mozilla browsers
    *Adobe PDF Plug-In For Firefox and Netscape
    *DRM Netscape Network Object
    *Npdsplay dll
    *DRM Store Netscape Plugin

    Please let me tell you that I Expert Decomposition may be of any Version of Firefox or Thunder Bird.

  • The jsp file does not open the new login window but opens the source code.....plz help

    When i try to log in to the log in link at the site https://efp.bpcl.in the log in page does not open but the firefox wants to ask with which program the firefox should open the file and when we give firefox or internet explorer than it opens the source code.Plz help...

    Those files are send as application/octet-stream and that makes Firefox display a download dialog.
    http://developer.mozilla.org/en/docs/Properly_Configuring_Server_MIME_Types

  • I Need Help to Access The Source Code From A Form to Know the Calculation Formula

    Hi,
    I Need Help to Access The Source Code From A Form to Know the Calculation Formula. The application is a windows form application that is linked to SQL Server 2008. In one of the application forms it generates an invoice and does some calculations. I just
    need to know where behind that form is the code that's doing the calculations to generate the invoice, I just need to get into the formula that's doing these calculations.
    Thank you so much.

    Hi, 
    Thanks for the reply. This is a view and [AmountDue] is supposed to be [CurrentDueAmount] + [PastDueAmount] - [PaidAmount]. The view is not calculating [PaidAmount] right . Below is the complete code of the view. Do you see anything wrong in the code ?
    Thanks. 
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [iff].[FacilityFeeID], [LoanID] = NULL, [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = [isis_fee].[SectionType], [Name]
    = [iff].[Name], [ReceivedAmount], [dates].[CurrentDueAmount], 
                          [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount],
    0) > 0 THEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply reset to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [pastdue].[PastDueFeeAmount]
    + ISNULL([ReceivedAmount], 0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [pastdue].[PastDueFeeAmount] < 0 THEN 0 ELSE
    [pastdue].[PastDueFeeAmount] END, [PaidAmount] = CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [pastdue].[PastDueFeeAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([pastdue].[PastDueFeeAmount]
    + ISNULL([ReceivedAmount], 0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [pastdue].[PastDueFeeAmount] < 0 THEN - [pastdue].[PastDueFeeAmount]
    ELSE 0 END, [AmountDue] = [unpaid].[UnpaidFeeAmount], [ID] = [iff].[FacilityFeeID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_FacilityFee] iff ON [if].[ID] = [iff].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_fee].[ID],
    [sis_fee].[SectionTypeCode], [SectionType] = [st_fee].[Name], [sis_fee].[INV_FacilityFeeID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_fee JOIN
                   [dbo].[INV_SectionType] st_fee ON [sis_fee].[SectionTypeCode] = [st_fee].[Code]
                                WHERE      [INV_FacilityFeeID]
    IS NOT NULL AND [StatusCode] = 'BILL') isis_fee ON [iff].[ID] = [isis_fee].[INV_FacilityFeeID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedFeeAmount]), 
                   [ReceivedAmount] = SUM([iffa].[ReceivedFeeAmount])
                                FROM      
       [dbo].[INV_FacilityFeeAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_fee].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     *
                                FROM      
       [dbo].[INV_FacilityFeeAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [SectionID],
    [PastDueFeeAmount] = SUM([PastDueFeeAmount])
                                FROM      
       [dbo].[INV_FacilityFeeAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]
    UNION
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = [isis_loan].[SectionType], [Name]
    = [il].[Name], [ReceivedAmount], [CurrentDueAmount], [PastDueAmount] = CASE WHEN ISNULL([ReceivedAmount], 
                          0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount],
    0) WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
    0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
    END, 
                          [PaidAmount] = CASE WHEN [isis_loan].[SectionTypeCode]
    = 'LOAN_PRIN' THEN 0 ELSE CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
    0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN - [PastDueAmount]
    ELSE 0 END END, 
                          [AmountDue] = CASE WHEN [isis_loan].[SectionTypeCode]
    = 'LOAN_PRIN' THEN [CurrentDueAmount] ELSE [unpaid].[AmountDue] END, [ID] = [il].[LoanID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_loan].[ID],
    [sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_loan JOIN
                   [dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
                                WHERE      [INV_LoanID]
    IS NOT NULL AND [StatusCode] = 'BILL') isis_loan ON [il].[ID] = [isis_loan].[INV_LoanID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[ExpectedPrincipalAmount]), 
                   [ReceivedAmount] = SUM([ReceivedPrincipalAmount])
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization] iffa
                                GROUP BY [iffa].[SectionID]
                                UNION
                                SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                  [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                  [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID]
                                UNION
                                SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                  [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                  [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     [AmountDue]
    = [UnpaidPrincipalAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization]
                                UNION
                                SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual]
                                UNION
                                SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [PastDueAmount]
    = SUM([PastDuePrincipalAmount]), [SectionID]
                                FROM      
       [dbo].[INV_LoanPrincipalAmortization]
                                GROUP BY [SectionID]
                                UNION
                                SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
      [dbo].[INV_LoanCashInterestAccrual]
                                GROUP BY [SectionID]
                                UNION
                                SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
      [dbo].[INV_LoanPIKInterestAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]
    UNION
    SELECT     [isi].[InvoiceID], [ii].[DueDate], [SubInvoiceID] = [isi].[ID], [INV_FacilityID] = [if].[ID], [if].[FacilityID],
    [FacilityFeeID] = NULL, [il].[LoanID], [isi].[PortfolioID], [isi].[Portfolio], 
                          [PaymentType] = 'PIK Interest Applied', [Name]
    = [il].[Name], [ReceivedAmount], [CurrentDueAmount] = - [dates].[CurrentDueAmount], 
                          [PastDueAmount] = - CASE WHEN ISNULL([ReceivedAmount],
    0) > 0 THEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN 0 ELSE [PastDueAmount] + ISNULL([ReceivedAmount],
    0) END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN 0 ELSE [PastDueAmount]
    END, [PaidAmount] = - CASE WHEN ISNULL([ReceivedAmount], 0) 
                          < 0 THEN /* We bring past due to zero and
    apply rest to current. */ CASE WHEN [PastDueAmount] + ISNULL([ReceivedAmount], 0) 
                          < 0 THEN - ([PastDueAmount] + ISNULL([ReceivedAmount],
    0)) ELSE 0 END WHEN ISNULL([ReceivedAmount], 0) = 0 AND 
                          [PastDueAmount] < 0 THEN - [PastDueAmount]
    ELSE 0 END, [AmountDue] = - [AmountDue], [ID] = [il].[LoanID]
    FROM         [dbo].[INV_SubInvoice] isi JOIN
                          [dbo].[INV_Invoice] ii ON [isi].[InvoiceID]
    = [ii].[ID] JOIN
                          [dbo].[INV_Facility] [if] ON [isi].[ID] = [if].[SubInvoiceID]
    JOIN
                          [dbo].[INV_Loan] il ON [if].[ID] = [il].[INV_FacilityID]
    JOIN
                              (SELECT     [sis_loan].[ID],
    [sis_loan].[SectionTypeCode], [SectionType] = [st_loan].[Name], [sis_loan].[INV_LoanID]
                                FROM      
       [dbo].[INV_SubInvoiceSection] sis_loan JOIN
                   [dbo].[INV_SectionType] st_loan ON [sis_loan].[SectionTypeCode] = [st_loan].[Code]
                                WHERE      [INV_LoanID]
    IS NOT NULL AND [StatusCode] = 'BILL' AND [sis_loan].[SectionTypeCode] = 'LOAN_INT_PIK') isis_loan ON 
                          [il].[ID] = [isis_loan].[INV_LoanID] JOIN
                              (SELECT     [iffa].[SectionID],
    [AccrualDeterminationDateMax] = MAX([iffa].[AccrualDeterminationDate]), 
                   [AccrualDeterminationDateMin] = MIN([iffa].[AccrualDeterminationDate]), [CurrentDueAmount] = SUM([iffa].[AccruedInterestAmount]), 
                   [ReceivedAmount] = SUM([ReceivedInterestAmount])
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual] iffa
                                GROUP BY [iffa].[SectionID])
    dates ON [isis_loan].[ID] = [dates].[SectionID] LEFT JOIN
                              (SELECT     [AmountDue]
    = [UnpaidInterestAmount], [SectionID], [AccrualDeterminationDate]
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual]) unpaid ON [dates].[SectionID] = [unpaid].[SectionID] AND 
                          [dates].[AccrualDeterminationDateMax] = [unpaid].[AccrualDeterminationDate]
    LEFT JOIN
                              (SELECT     [PastDueAmount]
    = SUM([PastDueInterestAmount]), [SectionID]
                                FROM      
       [dbo].[INV_LoanPIKInterestAccrual]
                                GROUP BY [SectionID]) pastdue
    ON [dates].[SectionID] = [pastdue].[SectionID]

  • Help me in finding the entry points in the source code of java.....

    hi...
    I want to design a compilation server and apply some of the optimization technique's like inlining, SSA and others.
    So i require to find the entry points in source code from where i can include my code and check the performance of the program at level it is performing .
    Please help in this problem....
    and i also like to know what are hot methods in java context?

    BigDaddyLoveHandles wrote:
    Do you even know Java? Why not just let the HotSpot optimization do its thing?Good point, I would try either of two things.
    If you have a good understanding of Java internals and are confident you could optimise code better, I suggest you contribute to the OpenJDK and we can all benefit.
    Otherwise I suggest you try using the optimisation built into the compiler and the JVM.
    Note: the JVM optimises the code dramatically in ways most normal people won't have thought possible.
    The compiler doesn't optimise the code so much as it leaves this job to the JVM.
    Two examples;
    - say you call a small method often. The JVM can inline this method for you. (the same way a compiler would) However say this method can be over-ridden and later your program calls a different implementation, it can inline both methods even if the new method in a new class didn't exist when the first method was inlined.
    - In a 32-bit JVM, 32-bit registers and references are used. In a 64-bit JVM 64-bit registers and references are used without needing to recompile the code. However there is a third option of using 32-bit references in a 64-bit JVM. In this case, it assumes the bottom 3 bits are always 000 so it shifts the reference down 3 bits allowing you to access 32 GB using 32-bit references. Again, you can use this with libraries which were compiled before 64-bit JVMs were available.

  • Getting an Object Identifier String given a line of source code? HELP!

    (forgot to close the code tag on that last one!)
    Hi there,
    I am in desparate need of getting the object identifier given a particular line of source code. I need this for the debugger I'm writing, and since the jdb forum never gets reponses; just more unanswered questions.
    Right so, here's my problem in more detail. I can find out when a method is called in the Java virtual machine, and what its name is, and arguments and values and such like - using the Java Debugging Interface. BUT: unfortunately I cannot get the object identifier used in the source code that generated this call. I can however get a unique long id that identifies this object .. if that helps?(thinking hashtables here maybe?!)
    So, I may know that the constructor of EddClass has been called, and this the following line generated this call:
    EddClass edd = new EddClass();.. so what I need is a fail safe way of finding out "edd" from this - given all types of method calls.
    This is quite tricky because there are loads of ways methods can be called e.g.
    tty.getClassExclusions(); // Here I would know getClassExclusions had been called, and I would need to find out the object identifier "tty" called it
    Temp a, b, c;
    a = b = c = new Temp(); // Here I would know the constructor for Temp had been called, but now I would just want to know "c"
    AnotherEg ae = (new Egg()).getAnotherEg(); // and in this last case if I had found out that the Egg constructor had been called, I don't want to find out any object identifier from this line of code - since the object is anonymous; however if I had found out that getAnotherEg() had been called I would want "ae"Ok, well - please help: I'm making a Java Animator that will be freely available - that serves to graphically animate the execution of another java program. It'd be cool if one of you guys could help make it really cool. Plus there are Dukes available!!
    - Edd.

    this is quite a complicated question I think!
    I'm not sure but you maybe need to know just about the whole java lang. spec to do this.
    I'm sure there are plenty of free java parsers around, so unless you have a lot of time available its probably best to download one, figure some way to feed it a single line from within a code block, and extract its symbol table.
    Once you have the symbol table, there will probably be some other data available from the parser to say which are identifiers.
    Its then up to your debugger to figure out which one is the interesting one!
    sorry this is so vague but I think you've asked for something that is quite involved!
    asjf

  • Help to Compile the B1DE Source Code

    Hi Experts,
    I downloaded the B1DE 2.1 for 2007A source code. I need a template for SAP Wizard Installer for VS2010, Can you please help me on how to recompile the B1AddOnInstallerNETWizard so that i can have a new template for VS2010 for B1DE. Thanks
    Ben

    For example, the native methods, for instance,
    socketcreate() ,are dependent upon the default socket
    implementation. If the system contained more than one
    socket implementations, how would I make the javac to
    use my required implementation????
    OKay, we just seem to be going in circles here.
    First of all, please, give up this idea. Even if you make these changes and get it to compile you are not going to be able to redistribute this application. So it's a non-starter.
    So let us move on to trying to actually solve your problem. What exact problem are you having? What are these "other" socket implementations that you need/want?
    Please give some details about the problem you trying to solve.

  • Can anyone help - VIA VT6656 WLAN Controller - GPL source code package

    I recently purchased a new netbook, and I would very much like to run Arch Linux on it. I downloaded the Chakra installer USB image, copied it to a SDHC card using dd, and then booted from it. Everything appeared to go swimmingly during the installation except for the Wireless LAN device, it was simply not detected.
    Unfortunately this appears to be a very obscure device. There is nothing like it mentioned on the Arch Linux wiki. I tried several ways to try to discover what the chip was, and to find a Linux driver for it. It appears to be a VIA chip, reported by lshw as a "VNT USB 802.11 Wireless lan adapter". It appears to use the VIA VT6656 wireless chipset. This one:
    http://www.via.com.tw/en/products/netwo … ss/vt6656/
    I tracked down a "bug" on Ubuntu forums about the chip that I think it is.
    https://bugs.launchpad.net/ubuntu/+bug/162671
    This Ubuntu bug report includes a message that, very recently, VIA have released new GPL v2 license source code for a driver for this chip. There is talk about trying to get the driver included in the Linux kernel, and other musings about the possibility of making a dkms package for it.
    The source code is Version - 1.19.12, released on 02 February 2009. The source code is a 4.4 MB zip file, so it is probably too big to attach to this post.
    Link to source code:
    http://www.viaarena.com/default.aspx?Pa … bCatID=176
    So this post is a hopeful appeal for help. I do not personally have the skills required to compile this source for myself, and thereby make a working driver for Arch from it. Would there possibly be anyone interested enough to take this on?
    I would be immensely grateful if so.
    Last edited by hal2k1 (2009-04-23 13:04:57)

    A very quick-and-dirty build attempt fails here:
    $ make
    set -e; for d in driver; do make -C $d ; done
    make[1]: Entering directory `/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver'
    make -C /lib/modules/2.6.29-ARCH/build SUBDIRS=/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver modules
    make[2]: Entering directory `/usr/src/linux-2.6.29-ARCH'
    CC [M] /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.o
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_release_WPADEV':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:783: warning: assignment makes integer from pointer without a cast
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'vntwusb_found1':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:902: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_open':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1208: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_close':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1351: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_dma0_tx_80211':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1510: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_xmit':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1538: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'Config_FileOperation':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1663: error: 'struct task_struct' has no member named 'fsuid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1664: error: 'struct task_struct' has no member named 'fsgid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1665: error: 'struct task_struct' has no member named 'fsuid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1666: error: 'struct task_struct' has no member named 'fsgid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1700: error: 'struct task_struct' has no member named 'fsuid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1701: error: 'struct task_struct' has no member named 'fsgid'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_set_multi':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1766: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_get_stats':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1831: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'device_ioctl':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:1838: error: 'struct net_device' has no member named 'priv'
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c: In function 'vntwusb_init_module':
    /home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.c:2387: error: implicit declaration of function 'info'
    make[3]: *** [/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver/main_usb.o] Error 1
    make[2]: *** [_module_/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver] Error 2
    make[2]: Leaving directory `/usr/src/linux-2.6.29-ARCH'
    make[1]: *** [default] Error 2
    make[1]: Leaving directory `/home/tomk/src/VT6656_Linux_src_v1.19_12_x86/driver'
    make: *** [all] Error 2
    It's possible the 1.19.12 release needs a kernel older than our current 2.6.29 version.
    Oh, and the Arch "automated package compiler script" is called makepkg, and it's the heart of the Arch Build System (ABS). Full details available in the wiki.

  • AWT SOURCE CODE---PLS HELP

    Can anyone help me on the how to develop GUI using only AWT..(the source code)
    FIRST SCREEN --> Opening Splash Screen "Application to view log details" with the sub topics "daily transmission Statistics and "Hourly Transmission Statistics" and a ok button at bottom.My own logo in a canvas should be displayed
    2nd screen---> Menu bar has 2 items such as file and help..If a button is pressed before using the File menu to open a file,then a dialog box should appear to tell the user to chose a file before selecting an option.

    Post your completly runnable demo program andget
    a
    complete solution,a runnable one!Alternatively, I will write it for you for $100.I'll lower the bid to $90 :-)I'm going to have to get nasty if you keep undercutting me like this.

  • Help me for coice over ip source code

    hi, i have a source code for a project security for voip i can't exucute this project because com.ibm.media.codec.audio.AudioCodec, com.sun.media.BasicPlugIn; javax.media.*; javax.media.format.AudioFormat; java.security.*, java.security.spec.*; don't exist in jbuilder 6 idon't no the good jdk for this package
    please help me.

    Hi,
    i m chirag and i m intrest in new tech like voip so can u help me out for that.

  • Help needed to use Source code control system

    Hi all
    I am working on Suse 9.2 and I use JSP and Servlet in my project.I like to use Source Code Control System (SCCS) . But I have no idea about that.I need some help to initiate my project.
    Thanks in advance.
    -jegan

    I don't know this "SCCS" but I advice you to use Subversion as it is widely used open source standard.

  • Help!!! I lost all my source code...

    I need help!!!
    I finally able to finish my assignment and I lost all the source code as my hard disk blew up... and I need to print out all the source code I have written....
    The only thing I have left is the files in my floppy disk which is the executable jar file. I can run the program but I cannot find the source code... Could anyone help me? I have only the *.class files which is after the extraction of the Jar file.... How do I get all the source codes only from the *.class files?
    Please help me.... The dateline is tomorrow for this assignment and I won't be able to write all the codes within such a short period of time....

    You won't be able to get the original source code, but you might want to look into using a decompiler. I unfortunatly don't know any good ones, but others might.
    It'll look terrible, but it might be sufficent.
    I'm assuming that when you look in the cotents of your .jar file, .java files arn't amongst those?
    Also, are you using an IDE? If so which, depending on the IDE, you might be able to recover the files. I wouldn't count on it.
    I suggest using the decompiler, and doing your best to rewrite the program again. Since you already wrote it, a lot of stuff should be fresh in your memory.
    And good luck.

Maybe you are looking for