Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

3 java questions: debugging, templating and Swing app for Texts cleansing

Thread view: 
lbrtchx@hotmail.com - 29 Apr 2007 22:03 GMT
// __ how do you debug debug:
~
Exception in thread "main" java.lang.OutOfMemoryError: Java heap
space
~
kinds of errors?
~
// __ How can you make this method taking in an array on ints and
enlarging it, make the same thing for long[]('s), byte[]('s) in fact
any possible array.
~
// __ (((iAr != null) && ((iArL = iAr.length) > 0)) || (iNwL > 0))
public int[] _enlargeIntArr(int[] iAr, int iNwL) throws
InputContextException{
 boolean Is = false;
 int[] iNwAr = null;
 int iArL;
// __
 if((iAr != null) && ((iArL = iAr.length) > 0)){
  if(iNwL > iArL){
   iNwAr = new int[iNwL];
   System.arraycopy(iAr, 0 , iNwAr, 0, iNwL);
   iAr = null;
   System.gc();
  }// (iNwL > iArL)
  else{
   String aX = "// __ New Length must be greater than previous one.
iNwL: |" + iNwL + "|, iArL: |" + iArL + "|";
   throw new InputContextException(aX);
  }
 }// ((iAr != null) && ((iArL = iAr.length) > 0))
 else if(iNwL > 0){ iNwAr = new int[iNwL]; }
 else{
  String aX = "// __ New Length must be greater than 0. iNwL: |" +
iNwL + "|";
  throw new InputContextException(aX);
 }
// __
 return(iNwAr);
}
~
// __ Do you know of any swing application to compare two text files,
partially programatically, partially by eyeballing them?
The j app. should syncronize teh scrolling of both texts to that the
same section would be visible even if you scroll one of them
~
thanks
lbrtchx
Daniel Pitts - 29 Apr 2007 23:29 GMT
On Apr 29, 2:03 pm, lbrt...@hotmail.com wrote:
> // __ how do you debug debug:
> ~
>  Exception in thread "main" java.lang.OutOfMemoryError: Java heap
> space
There are heap profilers out there which will tell you what objects
are allocated.
> ~
>  kinds of errors?
[quoted text clipped - 3 lines]
> any possible array.
> ~
[snip code]
You can't really... Java Generics are not like C++ Templates. They may
have a similar appearance, but their functionality is quite different
except in the most basic cases.  If you need to support multiple types
of arrays of primitives, you have to manually support it.
> ~
> // __ Do you know of any swing application to compare two text files,
> partially programatically, partially by eyeballing them?
>  The j app. should syncronize teh scrolling of both texts to that the
> same section would be visible even if you scroll one of them
I don't know about a swing application specifically, but there are
plenty of graphical diff programs available. google is your friend.

> ~
>  thanks
>  lbrtchx

Hope this helps.
shterke - 30 Apr 2007 01:18 GMT
> On Apr 29, 2:03 pm, lbrt...@hotmail.com wrote:> // __ how do you debug debug:
> > ~
[quoted text clipped - 28 lines]
>
> Hope this helps.

cool


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.