question on the GC in Java

Given
Given:
3. class Beta { }
4. class Alpha {
5. static Beta b1;
6. Beta b2;
7. }
8. public class Tester {
9. public static void main(String[] args) {
10. Beta b1 = new Beta(); Beta b2 = new Beta();
11. Alpha a1 = new Alpha(); Alpha a2 = new Alpha();
12. a1.b1 = b1;
13. a1.b2 = b1;
14. a2.b2 = b2;
15. a1 = null; b1 = null; b2 = null;
16. // do stuff
17. }
18. }
Why there is 1 single object will be eligible for GC. I need an explanation claire pls

Newbie says:

jverd wrote:

Newbie says:

Pinto wrote:
Because this looks like a duty, how about you, you post what you think, what is the answer. Instead of just gave you the answer that you will just hand as your own work.

It is not a duty. It's the SCJP practice test.

However, as you try to learn, you will learn better if you think that it through as much as possible, post what you think and why and get feedback on that, rather than just a question for the answer.

Objects how you qualify and why?

Thank you for your joy. First of all, I have rename the variable Alpha object instance. now, I have

Given:
3. class Beta { }
4. class Alpha {
5. static Beta x;
6. Beta y;
7. }
8. public class Tester {
9. public static void main(String[] args) {
10. Beta b1 = new Beta(); Beta b2 = new Beta();
11. Alpha a1 = new Alpha(); Alpha a2 = new Alpha();
12. a1.x = b1;
13. a1.y = b1;
14. a2.y= b2;
15. a1 = null; b1 = null; b2 = null;
16. // do stuff
17. }
18. 

I have a stack containing a1, a2, b1, b2 and the pile is containing 2 objects of type Alpha, 2 objects of the beta type, x, y *(AM I RITE AT HERE) *.

Yes. Note that x and are among the two objects of Alpha.

On line 12 and 13, the instance y variable and the class variable x class Alpha point to an object of class b1 Beta.

Close. The instance y variable to one of the Alpha (not of the Alpha class) and the class variable x of class Alpha point to a Beta - the same beta object that is indicated by b1.

On line 14, * instance of variable y * points to an object of class Beta b2.

Variable y of another Alpha object instance pointing to the second Beta - the same object as that is indicated by b2.

Note that there are two variable y (one for each Alpha object) and a variable x (a for class global Alpha). It's the difference between an instance variable (non-static member) and a class variable (static member).

Finally, at line 15, a1, b1, b2 are set to null.

Well Yes.

Therefore, I think that there are 2 items that are eligible for GC (1 object of type Alpha and beta type 1 object)

Well, let's see.

A1 is null, then nothing no points to the first Alpha, GC-able. In addition, y of this first Alpha is more advanced on the first beta version, so if you think that this makes this inaccessible Beta. However, the class variable x (which is not specific to an instance of Alpha) always points to the first beta version. So far, a single GC-able object.

B1 is zero, so it is more pointing to the first beta version, but still Alpha.x points to the first beta version. Still a GC-able object.

B2 is zero, so it is no longer points to the second Beta, but Alpha is second again is the case, then the second Beta is always accessible. Still a GC-able object.

Remember, there are two variables y - one for each instance - Alpha - and one variable x a for class Alpha as a whole.

Part of what makes this confusing example is that they followed a syntactically legal approach but bad practice to use a reference variable to refer to a static class member, rather than the name of the class.

a1.x // legal, but confusing
Alpha.x // preferred

a1.y // the only legal way
Alpha.y // error, won't compile -- how would the compiler know WHICH Alpha instance's y variable we mean?

Tags: Java

Similar Questions

  • Another question on the activation of Java...

    Sorry for you ask same question from others, but the responses I've read are not useful for me.

    Problem: Plugin Java not detected (topic: plugin) in my Firefox 10.0.6
    1.7.0_05 Java installed. Java Console open normally.
    symlink checked with readlink command:
    ./usr/Java/jre1.7.0_05/lib/amd64/libnpjp2.so

    Using Red Hat Enterprise Linux Server v6.3 (64-bit).

    No indication of what makes me mad?

    Thank you!

    The normal version of Firefox 1.0.6 is a 32-bit version,

    You will need to install a 32-bit version of Java and to place a symbolic link to the 32-bit libnpjp2.so in a place where Firefox scans for plugins.

  • Question on the fields and Java...

    First of all, let me say that I am not a programmer so not sure if this is possible in Acrobat. I use Acrobat 9 Pro on Mac.

    I have a small timesheet form I want to automate to a certain extent. In the form is an area where I now enter a job number and my initials. I think that it would save time if I could retrieve this information from the file name of the form by using a script. Every work I do has a new timesheet created for her file, so the first 7 characters of the file name is the same information that goes into the field. Script of the field would save some typing time.

    It would go like this:

    1 copy the model form of timesheet of the server and rename for the work in progress.

    2. open the new file and click on the form field, where the number of jobs must be entered.

    3. click the mouse, the auto field by recovering the first 7 characters of the name of the file open.

    Seems very simple to me; I don't know if it's possible, or how to do and haven't found a recipe for Java coding book that has something like that.

    Any ideas?

    To do this, use the following in a mouse in JavaScript:

    MouseDown JavaScript

    Event.Target.Value = documentFileName.substr (0, 7);

  • Date Format question - calling a procedure stored on the side of java

    What is the best approach to managing a DATE as a parameter to a procedure?

    (1) the emp table has a column called hire_date and its data type is DATE.
    (2) the procedure has tried to retrieve all employees hired on a specific date, there is a parameter called p_hire_date, type what data it should use? Something like p_hire_date IN emp. HIRE_Date % TYPE? < == is that correct?
    (3) both within the body of the procedure, during the recuperation of registration,
    SELECT first_name, last_name
    FROM EMP
    Where hire_date = p_hire_date < == is that correct? or when should I use to_date()?

    (4) on the coast of Java, when you call this procedure, what data type the hire_date is?

    Thank you
    new2Oracle

    Hello

    Procedure seems correct, do not use to_date.

    Switch argument as a java.sql.Timestamp.

    (Or java.sql.Date If you are absolutely certain that you DATE of Oracle is a component "hour")

    Concerning
    Peter

  • In the reactivation of Java suggest allowing the add-on (in my case Java Deployment Toolkit 6.0.340.4) isn't that an old man?

    In regards to your opinion on "old versions of Java were blocked - updated and unlock Java" to
    http://support.Mozilla.org/en-us/KB/update-and-unblock-Java

    In the Java section re-conducive to the list point 3, you declare:
    Find the element of the Java platform / Java Runtime, and then click Activate.

    My question is:
    The item is listed in the Add-ons like Java Deployment Toolkit 6.0.340.4 Manager (disabled) 6.0.340.4
    These are the numbers that concern me. I are enabling the latest version of Java, or an old one?

    Cheers, Tony Smith, Sydney, Australia

    Do you still need the Java Deployment Toolkit?

    That "toolkit" is usually necessary only for development work Java programmers.

  • Yes, another question regarding the freezing of Safari - EtreCheck report included

    Yes, another question regarding the freezing of Safari.

    From a little over a month (I think), Safari started freezing regularly whenever I want to open new tabs or switch between tabs. I found myself to leave the program several times per day / hour. I can't identify any specific common cause (other than my MacBook being old) or any new software or updates that might have initiated the question. At first I thought he might have many tabs, I tried to open, but recently it happens even with only a few tabs open.

    I worked through the steps I found in this forum and others: empty the cache, start in safe mode, etc nothing works.

    Based on the previous suggestions, I have downloaded and run EntreReport which I included below. The note and maybe just a distraction, but EntreReport has crashed three times tonight, before he was able to produce the sub report. I ran the report after restarting my system with no other programs running.

    Suggestions are welcome at this stage because I want to start using Chrome or Firefox because I like the transfer procedure between my devices.

    Thank you in advance.

    Ben

    -----------

    EtreCheck version: 2.9.11 (264)

    Report generated 2016-04-28 22:48:58

    Download EtreCheck from https://etrecheck.com

    Time 05:45

    Performance: Below average

    Click the [Support] links to help with non-Apple products.

    Click [details] for more information on this line.

    Click on the link [check files] help with unknown files.

    Problem: Apps are broken

    Description:

    Safari freeze when opening new tabs / switching between the tabs.

    Hardware Information:

    MacBook Pro (15-inch, mid 2009)

    [Data sheet] - [User Guide] - [warranty & Service]

    MacBook Pro - model: MacBookPro5, 3

    1 2.66 GHz Intel Core 2 Duo CPU: 2 strands

    4 GB of RAM expandable - [Instructions]

    BANK 0/DIMM0

    OK 2 GB DDR3 1067 MHz

    BANK 1/DIMM0

    OK 2 GB DDR3 1067 MHz

    Bluetooth: Old - transfer/Airdrop2 not supported

    Wireless: en1: 802.11 a/b/g/n

    Battery: Health = battery check - Cycle count = 389

    Video information:

    NVIDIA GeForce 9400M - VRAM: 256 MB

    Color LCD 1440 x 900

    NVIDIA GeForce 9600M GT - VRAM: 256 MB

    Software:

    OS X El Capitan 10.11.4 (15E65) - since startup time: less than an hour

    Disc information:

    FUJITSU MJA2320BH FFS G1 disk0: (320,07 GB) (rotation)

    EFI (disk0s1) < not mounted >: 210 MB

    Macintosh HD (disk0s2) /: 319,21 go-go (54,93 free)

    Recovery HD (disk0s3) < not mounted > [recovery]: 650 MB

    HL-DT-ST DVD - RW GS23N)

    USB information:

    Built-in ISight from Apple Inc..

    Card reader Apple

    Apple Inc. BRCM2046 hub.

    Apple Inc. Bluetooth USB host controller.

    Apple Inc. Apple keyboard / Trackpad

    Computer, Inc. Apple IR receiver.

    Guardian:

    Mac App Store and identified developers

    Unknown files:

    ~/Library/LaunchAgents/com. GoodShop.updater.plist

    ~/Library/application support/GoodShop/updater

    A unknown file found. [Check files]

    Kernel extensions:

    / Library/Application Support/Symantec/virus

    [no charge] com.symantec.kext.SymAPComm (11.1.2f17 - 2015-05-23) [Support]

    / Library/Extensions

    [no charge] expressvpn.tap (20150118 - 2016-04-12) [Support]

    [loading] expressvpn.tun (20150118 - 2016-04-12) [Support]

    / System/Library/Extensions

    [no charge] com.DYMO.usbprinterclassdriver.kext (1.1 - SDK 10.9-2016-04-12) [Support]

    com.Silex.driver.sxuptp [no charge] (1.5.1 - 2016-04-12) [Support]

    com.symantec.kext.internetSecurity [no charge] (1.3.2 - 2016-04-12) [Support]

    com.Symantec.kext.IPS [no charge] (3.2 - 2016-04-12) [Support]

    Startup items:

    CMA: path: / Library/StartupItems/cma

    RosettaStoneLtdDaemon: Path: / Library/StartupItems/RosettaStoneLtdDaemon

    Startup items are obsolete in OS X Yosemite

    Launch system officers:

    [loaded] 8 tasks Apple

    [loading] 165 tasks Apple

    [operation] 65 tasks Apple

    Launch system demons:

    [loaded] 45 tasks Apple

    [loading] 161 tasks Apple

    [operation] 83 tasks Apple

    Launch officers:

    [no charge] com.adobe.AAM.Updater - 1.0.plist (2016-04-28) [Support]

    [failure] com.adobe.ARMDCHelper.cc24aef4a1b90ed56a... plist (2015-10-31) [Support]

    [operation] com.epson.Epson_Low_Ink_Reminder.launcher.plist (2015-01-19) [Support]

    [loading] com.epson.esua.launcher.plist (2015-06-29) [Support]

    [operation] com.epson.eventmanager.agent.plist (2014-09-21) [Support]

    [loading] com.google.keystone.agent.plist (2016-03-01) [Support]

    [operation] com.mcafee.menulet.plist (2016-03-23) [Support]

    [operation] com.mcafee.reporter.plist (2016-03-23) [Support]

    [loading] com.oracle.java.Java - Updater.plist (2013-11-14) [Support]

    [operation] com.symantec.uiagent.application.plist (2010-11-16) [Support]

    [operation] com.trusteer.rapport.rapportd.plist (2016-03-19) [Support]

    Launch demons:

    [loading] com.adobe.ARMDC.Communicator.plist (2015-10-31) [Support]

    [loading] com.adobe.ARMDC.SMJobBlessHelper.plist (2015-10-31) [Support]

    [loading] com.adobe.fpsaud.plist (2016-04-15) [Support]

    com.DYMO.pnpd.plist [no charge] (2014-10-16) [Support]

    [loading] com.expressvpn.tap.plist (2016-01-27) [Support]

    [loading] com.expressvpn.tun.plist (2016-01-27) [Support]

    [loading] com.google.keystone.daemon.plist (2016-03-01) [Support]

    [loading] com.macpaw.CleanMyMac3.Agent.plist (2016-04-18) [Support]

    [operation] com.mcafee.cspd.plist (2015-05-08) [Support]

    com.mcafee.ssm.ScanFactory.plist [no charge] (2016-03-16) [Support]

    com.mcafee.ssm.ScanManager.plist [no charge] (2016-03-16) [Support]

    [operation] com.mcafee.virusscan.fmpd.plist (2016-03-22) [Support]

    [loading] com.microsoft.office.licensing.helper.plist (2010-08-25) [Support]

    [loading] com.oracle.java.Helper - Tool.plist (2013-11-14) [Support]

    [loading] com.symantec.MissedTasks.plist (2009-11-10) [Support]

    [loading] com.symantec.Sched501 - 1.plist (2014-08-27) [Support]

    [loading] com.symantec.Sched501 - 4.plist (2015-01-08) [Support]

    [loading] com.symantec.Sched501 - 5.plist (2015-01-08) [Support]

    [loading] com.symantec.avscandaemon.plist (2009-10-10) [Support]

    [operation] com.symantec.diskMountNotify.plist (2009-09-14) [Support]

    [loading] com.symantec.navapd.plist (2009-09-14) [Support]

    [loading] com.symantec.navapdaemonsl.plist (2009-11-14) [Support]

    [operation] com.symantec.sharedsettings.plist (2009-07-22) [Support]

    [operation] com.symantec.symSchedDaemon.plist (2009-11-10) [Support]

    [operation] com.symantec.symdaemon.plist (2009-03-27) [Support]

    [operation] com.trusteer.rooks.rooksd.plist (2016-03-19) [Support]

    User launch officers:

    com [running]. GoodShop.updater.plist (2013-09-24) [Support]

    [loading] com.adobe.AAM.Updater - 1.0.plist (2015-10-25) [Support]

    [failure] com.facebook.videochat. [entrenched passage] .plist (2014-08-09) [Support]

    [loading] com.macpaw.CleanMyMac3.Scheduler.plist (2016-04-25) [Support]

    Items in user login:

    iTunesHelper Application (/ Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)

    Application of Google Reader (Google Drive.app/Applications /)

    Dropbox application (/ Applications/Dropbox.app)

    ExpressVPN application (/ Applications/ExpressVPN.app)

    CleanMyMac 3 Menu Application (/ Applications/CleanMyMac 4.app/Contents/MacOS/CleanMyMac 3 Menu.app)

    Other applications:

    [ongoing] com.DYMO.pnpd

    [ongoing] com.getdropbox.dropbox.83552

    [ongoing] com.google.GoogleDrive.81632

    [ongoing] com.macpaw.CleanMyMac3.Menu.80672

    [ongoing] com.mcafee.ssm.ScanManager

    [ongoing] com.mcafee.virusscan.ssm.ScanFactory

    [loading] 420 tasks Apple

    [operation] 193 tasks Apple

    Plug-ins Internet:

    o1dbrowserplugin: 5.41.3.0 - 10.8 SDK (2015-12-16) [Support]

    Default browser: 601 - SDK 10.11 (2016-04-18)

    Flip4Mac WMV Plugin: 2.4.4.2 (2012-12-25) [Support]

    DYMO Safari Addin: Unknown - SDK 10.9 (2014-10-26) [Support]

    AdobePDFViewerNPAPI: 15.010.20060 - SDK 10.8 (2016-03-11) [Support]

    FlashPlayer - 10.6: 21.0.0.226 - SDK 10.6 (2016-04-25) [Support]

    Silverlight: 5.1.30514.0 - SDK 10.6 (2015-09-16) [Support]

    QuickTime Plugin: 7.7.3 (2016-04-12)

    Flash Player: 21.0.0.226 - SDK 10.6 (2016-04-25) [Support]

    googletalkbrowserplugin: 5.41.3.0 - 10.8 SDK (2015-12-11) [Support]

    iPhotoPhotocast: 7.0 (2010-11-15)

    AdobePDFViewer: 15.010.20060 - SDK 10.8 (2016-03-11) [Support]

    SharePointBrowserPlugin: 14.3.0 - SDK 10.6 (2013-02-09) [Support]

    SiteAdvisor: 2.0 - 10.1 SDK (2015-03-30) [Support]

    JavaAppletPlugin: Java 8 updated 77 03 (2016-04-18) check the version of build

    Safari extensions:

    AdBlock - BetaFish, Inc. - https://getadblock.com (2016-03-30)

    Add to wishlist Amazon - Amazon.com - http://www.amazon.com/wishlist?ref=cm_wl_saf_ext (2011-07-09)

    GoodShop - GOODSEARCH LLC - http://www.GoodSearch.com (2013-09-24)

    SiteAdvisor - McAfee - http://www.siteadvisor.com (2015-09-28)

    PIN button - Pinterest, Inc. - http://www.pinterest.com/ (2015-07-03)

    3rd party preference panes:

    Flash Player (2016-04-15) [Support]

    Flip4Mac WMV (2012-05-15) [Support]

    Growl (2015-09-16) [Support]

    Java (2016-04-18) [Support]

    Norton\nQuickMenu (2010-11-16) [Support]

    Trusteer Endpoint Protection (2016-04-18) [Support]

    Time Machine:

    Time Machine not configured!

    Top of page process CPU:

    5% WindowServer

    1% kernel_task

    0% fontd

    0% SymDaemon

    Top of page process of memory:

    445 MB kernel_task

    Mdworker (18) 430 MB

    164 MB Google Reader

    Dropbox 123 MB

    VShieldScanner (4) 66 MB

    Virtual memory information:

    106 MB free RAM

    4.15 GB used RAM (770 MB cache)

    6 MB used Swap

    Diagnostic information:

    April 28, 2016, 22:42:12 ~/Library/Logs/DiagnosticReports/EtreCheck_2016-04-28-224212_[redacted].crash

    com.etresoft.EtreCheck - /Applications/EtreCheck.app/Contents/MacOS/EtreCheck

    28 April 2016, 22:21:42 self-test - spent

    April 28, 2016, 19:49:12 ~/Library/Logs/DiagnosticReports/EtreCheck_2016-04-28-194912_[redacted].crash

    April 28, 2016, 19:47:10 ~/Library/Logs/DiagnosticReports/EtreCheck_2016-04-28-194710_[redacted].crash

    April 28, 2016, 19:38:58 ~/Library/Logs/DiagnosticReports/EtreCheck_2016-04-28-193858_[redacted].crash

    April 28, 2016, 19:04:58 ~/Library/Logs/DiagnosticReports/rapportd_2016-04-28-190458_[redacted].crash

    /Library/rapport/*/rapportd.app/Contents/MacOS/rapportd

    April 28, 2016, 06:06:59 /Library/Logs/DiagnosticReports/Safari_2016-04-28-060659_[redacted].hang

    /Applications/Safari.app/Contents/MacOS/Safari

    April 28, 2016, 12:48:04 AM /Library/Logs/DiagnosticReports/SubmitDiagInfo_2016-04-28-004804_[redacted].cpu _resource.diag [details]

    / System/Library/CoreServices/SubmitDiagInfo

    April 27, 2016, 22:01:10 /Library/Logs/DiagnosticReports/Safari_2016-04-27-220110_[redacted].hang

    April 27, 2016, 21:57:37 /Library/Logs/DiagnosticReports/Safari_2016-04-27-215737_[redacted].hang

    April 27, 2016, 19:05:50 ~/Library/Logs/DiagnosticReports/EtreCheck_2016-04-27-190550_[redacted].crash

    April 27, 2016, 06:57:28 ~/Library/Logs/DiagnosticReports/Airmail 2_2016-04-27-065728_ .crash [deleted]

    / Applications/Airmail 2.app/Contents/MacOS/Airmail 2

    26 April 2016, 19:48:11 /Library/Logs/DiagnosticReports/Safari_2016-04-26-194811_[redacted].hang

    Remove all apps viruses you have

    Symantec, McAfee, Norton...

    CleanMyMac3

  • Why my question to the assistance it has apparently been removed?

    It is a complaint.

    I posted a very detailed question on my problem, need help.

    I understand that, since he is apparently a forum volunteer supported, I must be patient in waiting for a response. No problem.

    I posted my question end Sunday, January 29. Now I can't find it. I found and verification of responses every day, but now we have gone (deleted?).

    To say the least, this has not been a very positive experience.

    Any suggestions? My original message can be recovered?

    Find your questions and your answers to the questions asked by other users

    1. Log on to the forum ( https://support.mozilla.org/en-US/questions/ ) with your username and password (click on "Sign In" in the top right of the page)
    2. Once the forum page reloads, click on "My Contributions" in the line just above the first question (which lists your questions and your answers to the other questions)
    3. to return to a list of questions about the forum, click on 'All' in the line just above the first question

    Your question 2 days ago is > here-> https://support.mozilla.org/en-US/questions/916200?s= & r = 1 & e = sph & as = s

    If this answer solved your problem, please click 'Solved It' next to this response when connected to the forum.

    Not related to your question, but...

    You may need to update some plug-ins. Check your plug-ins and update if necessary:

  • Java with Minecraft error "error: could not create the Virtual Machine Java.»

    When I try to open Minecraft SP, it won't let me open and there is a message saying:

    "Error: could not create the Virtual Machine Java.".
    Error: A fatal error has occurred. Program will exit. »
    How can I solve this problem?

    Hello

    What is the operating system installed on your computer?
     
    You can ask your question on the Minecraft forums for assistance. Check out the following link.
    http://www.minecraftforum.NET/viewforum.php?f=1002
  • Error message: your browser must have Java enabled to use the Client for Java when you try to access the Citrix server.

    Original title: java question.

    I'm trying to access the Citrix server to access my work server.  When I click on an application, I get an error message: your browser must have Java enabled to use the Client for Java.  I checked and the right version of Java installed and removed the old Java applications but still this message when trying to access Citrix.  Please meet w / directions for a fix.

    Start by seeing if Java has been installed correctly:

    http://www.Java.com/en/download/testjava.jsp

    or
    http://javatester.org/

  • A few questions for the first blackberry development

    Hello

    First of all, my apologies for this being placed in the Java section, it seemed, the nearest section of what it is, but please move if need be.

    We have an application in development for the iOS platform that uses some geolocation and Web services.  We believe that we should have a version for the blackberry also platform, so we're looking in this evolution.  However, not being not to developers or users of blackberry, the different options for creating an application are quite overwhelming.  My questions are the following:

    (a) what language (Java?) is the most compatible?  Ideally, we would like to write the backend once, don't have to change the interface for devices of the curve through to the new playbook.  Java is also based on all of these devices?  None of us have any idea of Adobe Air, this is probably out of the question.

    (b) what are the operating systems are supported by what?  The curve I picked up seems to have Blackberry OS5 on it.  All operating systems support Java everything too, and whose support wifi location and cell tower map (the curve does not have a GPS unit).

    (c) I understand that during the development in Java there is a blackberry UI api, that's fine.  However, what version of Java is supported?  Is - this SE6, or we are talking about mobile Java here?

    (d) distribute the Apps.  The Blackberry App World seems to be the best route.  Do most people use?  It seems that the Blackberry is not restricted like iOS devices in how applications can be distributed.  Is there any other App stores (e.g. Amazon for Android?).  I guess it would be silly not not to enumerate the BB App World.

    Thanks in advance, any help is much appreciated.

    S.

    It is a really difficult game of questions.

    (a) Yes is the short answer.

    The long answer involves noting that the PlayBook does not directly support Java, and development platforms only available to this end are currently Adobe Air and Web works.  I can't give you a good explanation, since I dabbled only in them, but in summary,

    (a) with Web works you are essentially creating a Web application using HTML and JavaScript, with some JavaScript interfaces to the native operating system

    (b) air seems to me be in another development environment where screens and treatment are defined in a "Scripting" language that runs on the device.

    Work Web development is possible on the current BlackBerry phones as well, although I have no idea how compatible the two are - in other words how much you would have to change to a PlayBook Web app works works on the Palm and vice versa.

    I suggest you ask a similar question in the forums for these two platforms and see what they say.

    Anyway, there is a train of thought that phones current based Java will stop at some point, and phones will become based QNX, as PB.  So right now, if you want to learn something, then Web works.  But the works Web will be able to do what you want?  I don't know, but I don't know that Java is.

    But whatever the customer, you should be able to write the backend once.  Everything should speak http towards it.

    (b) there is not a BONE by device. Most devices come out with only one level and can be upgraded, usually at the next big release.

    Take a look at this good:

    http://us.BlackBerry.com/developers/choosingtargetos.jsp

    OS 5.0 in theory supports the location of the cell tower.  I say in theory because I never had to work in the United Kingdom.  But I have not tried very hard.  In my view, WiFi is available in the OS 6.0.

    (c) blackBerry support J2ME, with a significant number of extensions.  Think of it as Java 1.4 without all the useful bits, but the then RIM tried to add their useful in bits.

    (d) cannot speak for others, but BB App World is all I use.  Tried another one and didn't get anywhere.  YMMV.

    I hope this helps.

  • General question about the Browser element

    Will look for an alternative, I found the Browser element and now I have a few questions about that:

    As I am not yet experienced on the Interfaces of Java development, I was wondering if following senario is possible:

    Have some HTML Pages which do the job of the Interface.

    If you submit a form, the JAva Base program (the Master application) process all Information.

    If you are viewing a list, the info is from a json of the Base program output.

    As the Communication Server Client HTML, the only difference is, that all communications remains inside the app.

    Is this possible?

    I can't speak to the idea of dealing with the entry of html, but I can confirm that it is possible for an application program to create a html page and providing the BrowserField for display.

  • How to use the nocopy with java stored procedures parameters

    
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    CORE    11.2.0.3.0      Production
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production
    
    

    I'm a PL/SQL programmer, but not a Java programmer. I have the following java function that does what it's supposed to add a pdf at the end of another pdf document:

    import oracle.sql.BLOB;
    import org.apache.pdfbox.util.PDFMergerUtility;
    import oracle.jdbc.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    import java.io.OutputStream;
    
    public class PDFUtilities {
    public static BLOB appendPDF(BLOB pdfdoc1, BLOB pdfdoc2) throws Exception {
           
            //create a connection object to the current instance
              OracleConnection conn = (OracleConnection)new OracleDriver().defaultConnection();
            //create the output blob using the connection
              BLOB outPDF = BLOB.createTemporary(conn, true ,BLOB.DURATION_SESSION);
            //create an output stream to the output blob
              OutputStream os = outPDF.setBinaryStream(0);               
            //instantiate the pdf merger utility
              PDFMergerUtility mergerUtility = new PDFMergerUtility();       
            //connect the merger to the output stream
              mergerUtility.setDestinationStream(os);
            //stream from each input blob into the merger utility
              mergerUtility.addSource(pdfdoc1.getBinaryStream());
              mergerUtility.addSource(pdfdoc2.getBinaryStream());
            //merge the 2 input pdfs
              mergerUtility.mergeDocuments();             
            //do not close the output stream
            //return the blob
            return outPDF;
        }
    
    }
    

    CREATE OR REPLACE package PDFTOOLS.pkg_pdf_utilities
    as
    function f_get_merged_pdf (
              pi_pdf1       blob
            , pi_pdf2    blob
      )
      return blob;
    end pkg_pdf_utilities;
    /
    
    CREATE OR REPLACE package body PDFTOOLS.pkg_pdf_utilities
    as
    function f_get_merged_pdf (
              pi_pdf1       blob
            , pi_pdf2    blob
      )
      return blob
      as language java name 
      'com.mycode.pdftools.PDFUtilities.appendPDF(oracle.sql.BLOB, oracle.sql.BLOB) return oracle.sql.BLOB';
    end PDFTOOLS.pkg_pdf_utilities;
    /
    

    It's very basic, but doesn't seem to work. However, I want to my function from PL/SQL to a procedure that looks like this:

    CREATE OR REPLACE package PDFTOOLS.pkg_pdf_utilities
    as
    procedure sp_append_pdf (
              pio_pdf2append2   IN OUT NOCOPY blob
            , pio_pdf2append   IN OUT NOCOPY blob
      )
    end pkg_pdf_utilities;
    /
    

    What is important, what I'm trying to do is to NOCOPY the BLOBs. Otherwise, I have to read my PDF files into 2 BLOBs and create a 3rd blob as output. I prefer to be able to keep the pio_pdf2append2 as the final output. What I actually do call thing in a loop to gradually add a PDF file to a big. I'm not linking this in one operation because of concerns over the use of the system and because the pdfbox library java has would have been question after 850 in PDF format, which is not completely unrealistic in my approach.

    How could I achieve this?

    Post edited by: Pollocks01 only formatted code blocks because atlassian {code} tags didn't work.

    Passage of an argument as input/OUTPUT requires the mapping to a Java array.

    Simplified example that adds one FOR the other:

    create or replace and compile java source named blob_appender_src as
    import oracle.sql.BLOB;
    import java.sql.SQLException;
    import java.io.OutputStream;
    import java.io.InputStream;
    import java.io.IOException;
    
    public class BLOBAppender {
        public static void run (BLOB[] p1, BLOB p2) throws SQLException, IOException { 
    
            InputStream is = p2.getBinaryStream();
            OutputStream os = p1[0].setBinaryStream(p1[0].length()+1);                
    
            byte[] buffer = new byte[1024];
            int len;
            while ((len = is.read(buffer)) != -1) {
                os.write(buffer, 0, len);
            }
            os.close();
            is.close();
        }
    }
    
    create or replace procedure blob_append (
      p_lob1  in out nocopy blob
    , p_lob2  in            blob
    )
    as language java name 'BLOBAppender.run(oracle.sql.BLOB[], oracle.sql.BLOB)' ;
    /
    
    SQL> declare
      2    p_lob1  blob := utl_raw.cast_to_raw('ABC');
      3    p_lob2  blob := utl_raw.cast_to_raw('DEF');
      4  begin
      5    blob_append(p_lob1, p_lob2);
      6    dbms_output.put_line(utl_raw.cast_to_varchar2(p_lob1));
      7  end;
      8  /
    
    ABCDEF
    
    PL/SQL procedure successfully completed.
    
  • Need help with the coding of java base

    Hi I am new to java, please help me!

    Here the topic requires:

    circle2S.png

    • display the result of c1.contain (3.3)
    • C1. Contains (new Circle2D (4, 5, 8.5))
    • C1. Overlaps (new Circle2D (3, 5, 0.3))

    Here's my question:

    the circle contains must have (x, y, and radius)

    Why the contain (3.3) still work when there is no RADIUS?

    My code is correct?

    It's my circle2D code:

    public class Circle2D {}

    The center of the circle

    Private double x;

    Private double y;

    The RADIUS

    RADIUS double private;

    Constructor without parameters

    public Circle2D() {}

    This (0, 0, 3);

    }

    Constructor with x, y, and radius

    public Circle2D (double x, double y, double radius) {}

    This.x = x;

    This.y = y;

    This.RADIUS = RADIUS;

    }

    Get the zone method

    {} public double getArea()

    Return Math.PI * RADIUS * RADIUS;

    }

    Get the perimeter

    {} public double getPerimeter()

    return 2 * Math.PI * RADIUS;

    }

    Check if the point (X, Y) is in the circle

    public boolean contains (double X, double Y) {}

    If (Math.sqrt ((x-X) * (x - X) + (y - Y) * (y - Y)) < radius) {}

    Returns true;

    } else {}

    Returns false;

    }

    }

    Check if the new circle is the circle

    public boolean contains {(Circle2D circle)

    If (Math.sqrt ((x-circle.x) * (x - circle.x) + (y - circle.y) * (y - circle.y)) + circle.radius < radius) {}

    Returns true;

    } else {}

    Returns false;

    }

    }

    Check if the new circle overlaps the circle

    public boolean overlaps (circle Circle2D) {}

    If (Math.sqrt ((x-circle.x) * (x - circle.x) + (y - circle.y) * (y - circle.y)) + circle.radius > RADIUS)

    (& & Math.sqrt ((x-circle.x) * (x - circle.x) + (y - circle.y) * (y - circle.y)) + circle.radius < RADIUS + circle.radius) {}

    Returns true;

    } else {}

    Returns false;

    }

    }

    public static main (String [] args) {} Sub

    Circle2D c1 = new Circle2D (2, 2, 5.5);

    System.out.println (C1. Contains (3.3));

    }

    }

    I think you're confused by the abstraction.

    C1 is a Circle, a figure of dimension 2 covering an area. That's why he needs a RADIUS.

    The contains(x,y) of the method in the class circle valid a Point which is a figure without any Dimension. That is why the method does not have a RADIUS.

    Good bye

    DPT

  • [JDev12.1.2, ADF, GlassFish 4] A few questions on the tutorial of Shay "Deploy Oracle ADF Essentials Applications to Glassfish"

    Hallo (Shay),

    I want to deploy my application Web ADF to GlassFish that is installed on a different server from the development computer.

    The application interacts with a MS SQL Server database.

    I have some doubts/questions on the tutorial of Shay https://blogs.oracle.com/shay/entry/deploying_oracle_adf_applications_to

    So far in the development phase, I deployed the application only to the JDeveloper-itegrated WebLogic Server on the development computer.

    Creating a connection pool

    • I could successfully creates a pool of connections only by copying the sqljdbc4.jar library in the C:\glassfish4\glassfish\libdirectory. Is this OK or should the library remain in C:\glassfish4\glassfish\domains\domain1\lib?
    • Is there a way to hide the password in the additional properties?
    • Is there any setting for the property should do (especially for MS SQL Server)? For example, somewhere I read that the isolation of transactions should be set to read uncommitted... but I did not understand why.
    • What is the difference between types java.sql.DataSource resources and java.sql.XADataSource?

    In JDeveloper application configuration

    • Since the beginning of its development, the local configuration of the application Module has the name of data source (JDBC data source) set to java: comp/env/jdbc/MyDatabase_DB_SQLServerDS. If I change this field value to jdbc / < name_of_jdbc_resource_created_in_GlassFish >, as in the tutorial of Shay, it is not longer possible to run the application in JDeveloper (so using the WebLogic JDeveloper-itegrated server). Why? What's wrong?
    • JDeveloper offers only the choiche GlassFish 3.1 as a platform for the deployment, but I'll use GlassFish 4. Perhaps this cause problems?

    Taking care of the libraries used by the application

    • In the project properties, between the libraries and railways class there are a few additional libraries I've used in applications. Here's the JAR files I put in C:\JDeveloper\lib. I copy these libraries on the production server? If Yes, where?

    Other questions

    • What is the difference between putting a library in the lib of GlassFish folder and put it in the folder lib of Domain1?
    • Deployment procedure used by Shay in his tutorial might also be used to deploy the application on a remote production server?
    • Is there a way to manually delploy an application, for example by copying manually under GlassFish project folder?
    • My final goal is as follows. I have a clean Setup that allows me (1) to continue to run the application in JDeveloper on its built-in WLS, (2) to test the application to the GlassFish that I have installed on the computer development and (3) delploy the application on the remote production server. Could help me do that?

    These are a lot of questions.

    I thank in advance all the users who want to respond and I hope that the answers to these questions will help also others.

    Ciao,.

    Federico

    Federico - most of your questions is generic Glassfish questions that do not specifically have anything to do with ADF - I recommend that you post on the forum of Glassfish. (Or read the Glassfish documentation for things like the difference between directories and deployment/admin console).

    >>

    • Since the beginning of its development, the local configuration of the application Module has the name of data source (JDBC data source) parameter tojava:comp / env/jdbc/MyDatabase_DB_SQLServerDS. If I change the value of this field of jdbc /, as in the tutorial of Shay, it is not longer possible to run the application in JDeveloper (so using the WebLogic JDeveloper-itegrated server). Why? What is the problem?

    This is because JDeveloper uses an integrated WebLogic when you run and therefor cannot use the data source of Glassfish.

    I suggest that make you this change only when you go to deploy on Glassfish.

    >>

    • JDeveloper offers only the choiche GlassFish 3.1 as a platform for the deployment, but I'll use GlassFish 4. Perhaps this cause problems?

    We don't know, as the matrix of certification for the ADF will show that we have not tested/certified this combination.

    Oracle JDeveloper and ADF 12 c (12.1.3) supported systems

    >>

    • In the project properties, between the libraries and railways class there are a few additional libraries I've used in applications. Here's the JAR files that I put inC:\JDeveloper\lib. I copy these libraries on the production server? If Yes, where?

    Use the properties of project-> libraries and class path to add the jar or create a library and add it to your project.

    Make sure that this library is deployed by default.

    >>

    • Deployment procedure used by Shay in his tutorial can also be used to deploy the application on a remote production server

    Yes

    > Is there any property setting should do (especially for MS SQL Server)?

    Oracle ADF business with several databases components

  • Dreamweaver asks me to download Java SE6 and it is no longer available. I downloaded the update of Java 7 71 and Dreamweaver will not accept that to open (or not my Adobe Illustrator). What should I do?

    QUESTION please help: Dreamweaver will not launch and asks me to download Java SE6. It seems to not be available. I downloaded the update of Java 7 71 and Dreamweaver will not accept that either (nor will my Adobe Illustrator). What should I do?

    Direct download:

    Java for OS X 2014-001

    Nancy O.

Maybe you are looking for

  • I am looking for an adblocker.

    I am looking for an adblocker.

  • Satellite A100-599 - video update cart

    I have A100-599. I want to improve video cart. What video carts available and where can I get?

  • Installation of chome

    I am not able to install chrome to my windows computer laptop 7. I don't know why please help I uploaded the notification that appears when I try to install it the notification that appears when I try to install it

  • Set up for the signature of 10 BlackBerry applications (error: null)

    Hello I am recording my WebWorks for BB10 debugging application token so I can try an application on a device (Playbook). I followed the exact steps that lie in this documentation: https://bdsc.webapps.blackberry.com/html5/documentation/ww_publishing

  • Web authentication WISN and COMMENTS

    I have a WISN and we use open web Cisco authentication with a user's e-mail address. When executing this CLI command: > config network secureweb disable > save config > the system This will make the web authentication come HTTP instead of HTTPS?