Is there a deconstructor for Java

I know in C++ they use the name of the class with a tildy in front of it (~Class) for a deconstructor and VB has a method as well but I didn't see any way for Java to do this. Is there a way?

The thing you can't invoke (in theory) is garbage
collection. You can try with System.gc()twice
(I'm under the impression this works), or failing
that, you could cause an OOM exception, whichwould
force a GC of collectable objects.That is not the same as calling delete on a
pointer/reference. And calling System.gc to allocate
an object should never be done. There are a bunch of
articles that says why calling System.gc is bad.Where did I say it was good?
You can even call the '.finalize()' methoddirectly,
of course.That won't free the memory.
Sorry, but you are wrong :)Sorry, you misunderstood. Read again. I never suggested anything about freeing memory. Read your own post, and consider my response...

Similar Messages

  • Is there a market for Java 3d?

    Hi, i'm just about to finish college this year and have worked with lots of programming languages during my time in college but found java to be the most interesting... After a while i got into making games in java with the help of the java 3d api. I'm interested in going into this market when i finished colelge but i was just wondering...
    Is there a future for java 3d in the games development market?

    Iron Monkey wrote:
    Apple tried this before, it was called the G4 Cube and it didn't sell so well at the time, although, I think the outrageous sticker price had something to do with poor sales...
    Yuh think ! ? !
    That was 75% of the reason. It was waaaaay overpriced.
    The ports being on the bottom, where no one could get at them, was another big reason it was not accepted by the public.
    I am among those who have been pushing for a desktop system with a mini-like footprint, but imac-like performance -- but I've been advocating this since before the Mini existed.
    One idea I put forward in my Mac User Group's newsletter was for a machine just slightly taller than a mini that docks into a cinema display-type monitor. This would allow apple to sell them together for an imac experience, or separately.
    Regardless of whether or not they did the docking thing, this is the computer system that could really bring about great Mac acceptance in the corporate world. But of course Apple ignores that space and seem deaf to the needs of industry.

  • Is there a way for java plug-in to get the browser login authentication

    I have an applet that is loaded from a password protected html page. I use java plug-in with the applet.
    When I try to read this page I get the browser window asking for password and username. So far so good.
    Then I log in successfully and starts using the applet.
    If the applet wants to access pages on the same PW protected area, I have to give the plug-in PW and UN.
    My question is then:
    Is there a way that java plug-in can get hold of the login information that the browser has obtained? (So that I wont have to give the same information twice)
    I thought the answer would be no, but then I started experimenting with https and found out that if I use the same scenario as above, except from that I give a certificate to the browser before the first login, then the plug-in will get certificate info from the browser, and it wont promt me for UN and PW either!
    When it is possible for the plug-in to obtain certificate info and login info from the browser then it should be possible just to get the login info with ordinarily http?

    bump

  • Is there a forum for Java GUI Application Design?

    Hi all,
    I've used this forum a lot and found a lot of help on it for Swing usage specifics. However, whenever I ask a question about broader design or architecture of a full Swing app I get little or no response. Sadly I'm no stranger to "view 50, replies 0" :o(
    Either I'm asking stupid questions or I'm asking the in the wrong forum - does anyone know of a good place to ask about design/best practices for Java, GUI applications? I've seen some of the "programmer"/"developer" groups on Google Groups.
    Many thanks.
    Yours, hoping for at least one reply,
    Chris

    You're right, I typed that wrong. The method signature should be addDataChangeListener(DataChangeListener lis, DataChangeType type)
    When a component registers itself as a change listener, say it wants to know whenever an object of type Foo is changed, it calls DataChangeType.addDataChangeListener(this, DataChangeType.FOO). (the Enum elements coorespond to the objects we want to listen for) Then it implements the dataChanged(DataChangeType type, Object obj) method that will be called by the controller when objects of type Foo are changed. (obviously this is an interface) Whenever a component updates an object of type Foo, it calls DataChangeControl.dataChanged(DataChangeType.FOO, theFooObject), and then the controller will notify all listeners who are interested in Foo objects changing.
    The DataChangeControl maintains a hashmap of <DataChangeType, List < DataChangeListener> >. So when a new listener is added, it checks the type to see if a list is already keyed to that object type in the hashmap. If so it adds the listener to that list, if not it creates a new list in the hashmap with the type as the key. That way when an object is changed, it notifies only those listeners who are registered to listen to that type of object being changed. Hopefully that makes sense.

  • Is there a forName() for java.lang.reflect.Type?

    Is there an equivelant to Class.forName() for all types?
    For example:forName("java.util.List<java.lang.Sring>");
    //or
    forName("int");Such a method would return a java.lang.reflect.Type, instead of return a java.lang.Class
    See also
    Field.getGenericType()
    Method.getGenericReturnType()

    incidentally, getGenericType() will give you the
    generic type of the member being examined, not the
    parameterized type.
    that is, if I declare a method like this:
    public <T extends MyInterface> T getStuff() {
    }I won't be able to reflectively find out what types
    of T are being used at runtime, only that it's of
    type 'T'. of limited use really
    Java's implementation of Generics isn't as good as it
    could be, mainly to maintain backwards compatibiityYou are right in that case because that is not a ParameterizedType that is a TypeVariable.
    Type can encompass both Types.

  • Is there a app for java/flash player

    Hi
    Is thre a way of using java/flash or an app so I can chat to my friends online ??

    No Java, no Flash:
    No Flash for iPads, iPhones, or iPods
    Here's why there's is no Flash available for iDevices or other mobile devices. Adobe was unable to provide a product that was suitable to the needs of battery powered mobile devices used for Internet browsing. Existing Flash technology used too much memory, ate battery life, and was buggy. Simply put Flash did not work well on mobile devices.
    Apple's Steve Jobs led the escape from Flash dependency when Apple introduced the iPhone, and later introduced the iPad. There was a hue and cry over the omission. Time proved Jobs was right on target.
    So this is why there is no Flash for your iPhone or iPad or iPod nor for most SmartPhones. Flash has been abandoned by many sites in favor of supported technologies such as HTML5 or by providing their own custom app.
    Here is Steve Jobs official comment on his momentous decision to omit Flash from iDevices: Steve Jobs on Flash.
    Here is Adobe's later announcement to cease development of Flash for mobile devices: Adobe on Mobile Flash.
    Now, you are not necessarily out on a limb. There are some apps that can display some Flash, but don't count on there ability to display anything using Flash.
    Apps that can display some Flash from the Web:
    Puffin
    SkyFire
    Photon Flash
    Browse2Go
    iSwifter
    Also, note that many sites that use Flash provide their own app for accessing their material. So check with your favorite sites and find out if "there's an app for that."

  • Chomp for java?

    Hello,
    Is there a chomp for java similar to perl's chomp? I just want to remove the line separator.
    I used something like:
    private char lineSep = System.getProperty("line.separator").charAt(0);
    <code here to get messageText string>
    messageText = messageText.replace(lineSep,' ');
    messageText.trim();
    I am just wondering if there is a better way to do this or a chomp type function for strings.
    David

    trim removes anything <= 32h. which would include new lines
        public String trim() {
         int len = count;
         int st = 0;
         int off = offset;      /* avoid getfield opcode */
         char[] val = value;    /* avoid getfield opcode */
         while ((st < len) && (val[off + st] <= ' ')) {
             st++;
         while ((st < len) && (val[off + len - 1] <= ' ')) {
             len--;
         return ((st > 0) || (len < count)) ? substring(st, len) : this;

  • Opengl and directx for java or c++ or Java3D

    I am new to the 3D programming and I have many queries and I hope those expect can answer me. Thank you very much.
    I have some experience in writing directx 7.0 in C++. I find that the IDirect3DDevice7 in directx7.0 does not support 256 colors but direct3ddevice in directx5.0 does.
    However, the direct3ddevice in directx5.0 in 16 or 32 bit color performs very strange. Distortion is found in displaying a 3D image.
    1.     Do you have this experience? Does direct3ddevice in directx5.0 not work in 16 or 32 bit colors?
    2.     If I want to write a 3D directx program in C++ that can be work in every resolution, what can I do?
    3.     Can opengl work in every resolution 256 colors, 16, 32 bits?
    4.     Does opengl work in every platform?
    5.     Can I write an opengl program in window platform and run it in Linux without any modification or compilation ?
    6.     Does the opengl runtime different from platform to platform ?
    7.     If I deploy an opengl progam, do I need to deploy the runtime for a particular platform with it.
    8.     Opengl is claimed to be open source. What does it mean ? Can I modify the code of the opengl sdk or runtime and re-complie it and make it my own version of opengl ?
    9.     I find many version of opengl sdk in the web. Some is special to a particular hardware eg. NVIDIA. Some is not bounded to any hardware. What is the different between them ? How can I choose from them ?
    10.     I know that there is directx for java and opengl for java. Is it the so called java 3D ?
    11.     Does opengl or directx together with Java2 become Java 3D ?
    12.     However I cannot find any directx code or directive for importing the directx package in the Java 3D sample code.
    13.     Does the Javax provide the utility for 3D programming by hiding the 3D device or texture surface creation ?
    14.     I find some code segment from MSDN which shows the way to create a directdraw object in an applet. I wonder what is the proper way to use directx or opengl in java since my main goal is to create a directx application that can be worked in the web.
    15.     Lastly, from my understanding, directx is a com api which can be used in every programming languages. Does it imply that with a directx sdk, I can write a directx application in C++, java, or vb ?
    16.     But, I find that the code to do the same task in the three programming languages is very different. The object creation methods, the data structure for directx in the three programming languages is different. Is the same sdk realy used in different programming languages ? The object name for e.g. direct3ddevice is different from vb (Direct3DDevice7) and c++ (IDirect3DDevice7).

    I'm no expert in 3D graphics programming, but I have some experience. I'll try to answer some of your questions.
    2.     If I want to write a 3D directx program in C++ that
    can be work in every resolution, what can I do?I think both DirectX and OpenGL supports any resolution and color depth. It's more a matter of which resolutions your graphics driver supports.
    3.     Can opengl work in every resolution 256 colors, 16,
    32 bits?Yes.
    4.     Does opengl work in every platform?OpenGL is available on many platforms. Look at GL4Java if you want to use OpenGL in Java, it's available on many platforms. Look at: http://www.jausoft.com/gl4java.html
    5.     Can I write an opengl program in window platform
    and run it in Linux without any modification or
    compilation ?Yes, if you write it in Java. In C++ you will need to recompile the app.
    6.     Does the opengl runtime different from platform to
    platform ?No, it's a standard. There are some extensions that are driver dependant, but if you stick to the standard it will run unmodified on all platforms.
    7.     If I deploy an opengl progam, do I need to deploy
    the runtime for a particular platform with it.I don't think OpenGL is available by default on all platforms.
    8.     Opengl is claimed to be open source. What does it
    mean ? Can I modify the code of the opengl sdk or
    runtime and re-complie it and make it my own version
    of opengl ?OpenGL is not open source. OpenGL is a standard, it can't be open source since there is no source code.
    9.     I find many version of opengl sdk in the web. Some
    is special to a particular hardware eg. NVIDIA. Some
    is not bounded to any hardware. What is the different
    between them ? How can I choose from them ?If you have modern graphics card the driver includes support for OpenGL on MS Windows. For Linux you use Mesa I think. See GL4Java homepage for more info.
    10.     I know that there is directx for java and opengl
    for java. Is it the so called java 3D ?GL4Java implements the OpenGL functions in Java. Java3D is a high level API that runs on either OpenGL or DirectX.
    11.     Does opengl or directx together with Java2 become
    Java 3D ?No. The Java3D package is available for download at java.sun.com.
    12.     However I cannot find any directx code or
    directive for importing the directx package in the
    Java 3D sample code.You can't call DirectX directly in Java3D. It hides the underlying layers.
    13.     Does the Javax provide the utility for 3D
    programming by hiding the 3D device or texture surface
    creation ?Java3D is platform independent and hides things like the hardware, drivers etc.
    14.     I find some code segment from MSDN which shows the
    way to create a directdraw object in an applet. I
    wonder what is the proper way to use directx or opengl
    in java since my main goal is to create a directx
    application that can be worked in the web.I dont know if DirectX is available for Java. I recommend that you use OpenGL instead, or Java3D if you want an easy, high level API.
    15.     Lastly, from my understanding, directx is a com
    api which can be used in every programming languages.
    Does it imply that with a directx sdk, I can write a
    directx application in C++, java, or vb ?In C++ and VB, yes. Dont know if there are any Java DirectX bindings available.
    16.     But, I find that the code to do the same task in
    the three programming languages is very different. The
    object creation methods, the data structure for
    directx in the three programming languages is
    different. Is the same sdk realy used in different
    programming languages ? The object name for e.g.
    direct3ddevice is different from vb (Direct3DDevice7)
    and c++ (IDirect3DDevice7).Don't mix programming languages in the same app. Decide if Java or C++ is the right language for you, then use the tools available for the language you choose.
    My recommendation is to go for Java and Java3D if you are inexperienced with 3D graphics programming. Use Java + OpenGL if you know about vertices, textures, transforms etc.

  • Java update 51 for Mac OS X 10.6 causes several programs to break, will there be an update for 10.6? I saw that there is one for OS x 10.7 available, but not for any earlier versions

    Can anyone tell me if there will be such an update soon, and possible when we can expect this?
    Thanks!

    Yes, it's Java update 16 for Mac OS 10.6 that broke lots of stuff.  The 51 comes from it updating Java to 1.6_51.  There is an update to the update for 10.7 and up posted, but is there one for 10.6?
    UPDATE:  Never mind.  If you go to the download page for Java update 16, it appears that it has been silently updated.  Although there isn't any indication of the fact that it has been fixed, the build number is different (20.51-b01-457 instead of -456).

  • How many softwares are there to create a setup file for java programs

    Hi, i am new to java
    I want to know how many softwares are there to create a setup file for java programs.
    I know one software i.e java launcher to create a setup file.
    I want to know about any other softwares are available to create a setup file for java programs.
    I created a setup file for swings program in JCreator.
    And don't think that i am wastiing ur time with this question .
    Help me regarding this topic.
    Thanks in Advance

    superstar wrote:
    I want to know how many softwares are there to create a setup file for java programs.13, no wait, 42.
    I know one software i.e java launcher to create a setup file.You should clearly identify what you think you already know.
    I want to know about any other softwares are available to create a setup file for java programs.
    I created a setup file for swings program in JCreator.Is this the one you talked before, or is this different?
    And don't think that i am wasting ur time with this question .Why should I not think that?

  • In Web DYnpro for java there is any Configuration controller?

    Hi,
    Experts,
    I am having a confusion that is there any "Configuration Controller" present in Web dynpro for java.Where as i know that it is present in Web dynpro for abap could u please pass some idea on it.And how can identify the type of component in metadata files.
    Thanks in advance,
    Shabeer Ahmed.

    Hi,
    you have Configuration Controller that we can call it as CC in Webdynpro application which developed using FPM that is Floor Plan Manager, which is used as part of developing the ESS and MSS business package.
    The configuration Component is used to difine all the View Navigations and Road Map steps and define prespectives, and Vac's, Events for navigation from one view to another view.
    go through this link u came to know abt FPM
    http://help.sap.com/saphelp_erp2005/helpdata/en/43/3b8e8cb4ab1800e10000000a1553f6/frameset.htm
    Cheers,
    Apparao.

  • Is there a standard package available for JAVA for MM in Enterprise Portal

    Hi
    I would like to know if there is a standard package available for JAVA in MM for Enterprise Portal as we want to create purchase requests in the portal and send them to SAP .

    Standman--
    If you want a somewhat more powerful tool (albeit more complicated) check out TOra:
    http://sourceforge.net/projects/tora/
    As an Oracle DBA I've used this at client's sites when I can't pay for PL/SQL Developer to be installed, and it has quite a few useful things built into it. I think that it's going to see a boom in popularity now that Oracle came out with XE.
    ~Jer

  • Is there work flow engine on netweaver for java?

    I know work flow engine on sap was for abap.
    Is there work flow engine  on netweaver for java?

    [Check this link|http://help.sap.com/saphelp_nw70/helpdata/en/26/fa6d4d34a84840b2ca346c7cad64f4/frameset.htm]
    and more over to say briefly a workflow engine is a logical system/ server. which is responsible to handle the requests regaridng the workflows.

  • Is there a active record class similar to the one in codeigniter for java

    I was wondering if there's a way to build sql statements in java similar to active record in codeigniter which is a PHP framework. Basically you call functions that builds your sql statements like so:
    db.from('users');
    db.select('id');
    db.where('name', name);
    results = db.get();
    instead of something like this:
    "select id from users where name='" + name + '";
    Top methods cleaner, easier to read and modify, and less likely to miss a punctuation. Is there a class that does something like this for java. Sorry haven't used Java in awhile and just trying to get back in.

    >
    instead of something like this:
    "select id from users where name='" + name + '";
    Nope - the correct way is to use a prepared statement.
    Top methods cleaner, easier to read and modify, and less likely to miss a punctuation. None of those would be true for the way I write code.
    And I doubt that any of those would be true for non-trivial examples, for example a union with several complex clauses. And absolutely useless if you need a dba who is only a dba to help with your SQL.
    Is there a class that does something like this for java. Sorry haven't used Java in awhile and just trying to get back in.Not in the standard API there isn't.

  • Is there a way for Flex to detect whether the Java Plug-In is installed?

    Hi All,
    Need your help.
    Is there a way for Flex to detect whether the Java Plug-In is
    installed? This may be require a JavaScript External-Interface. Can
    we get if the Java Plug-In is installed and if so, whether it is
    JRE 1.6.X ?
    Regards,
    Amit

    Not knowing what server your app will run on... but something
    like that can be done relatively easy serverside with for instance
    ImageMagick if you run PHP.
    Otherwise, look into Bitmap programming.

Maybe you are looking for

  • How do I use For loop to check each node and import them to a new document?

    In my function I would like to use a For loop to get all the statutes (xml) inside the object objXmlBcaResponseDoc. In my case there are 2 statutes. I would like the output to look like the one I have posted here below. I am not sure how to do the Fo

  • Enhancement

    Hi, How to enhance the standerd tcodes  by using user exits, i want brief explanation about user exits with exmple, how to find out the user exits and how we write our functionality code  in that. plz give some suggestions   links to learn  enhanceme

  • I buy second hand phone, but its lock, now i want to use zain SIM in it so how i can unlock it

    i buy second hand phone, but its lock, now i want to use zain SIM in it so how i can unlock it

  • LG Versa

    Hey so I have a basic prepaid plan which includes a $20 monthly unlimited text plan to any carrier, and a $.99 daily unlimited calling plan to other cellular devices. I currently have a Pantech Caper, which is almost broken. I was hoping I could move

  • Can any1 provide the notes on "ABAP dictionary"

    can any one provid me the the notes of "ABAP dictionary" . Edited by: rajeel jain on Jun 22, 2011 10:57 AM Moderator Message: Please read the [Forum Rules Of Engagement|https://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement] before posting your