Problem loading PipedInputStream in Properties object

Hi there!
Well, I'm having some problems trying to load a PipedInputStream into a Properties object.
First of all I read a file with FileInputStream and BufferReader and every time I find a special token it's opened a new Thread to save this piece of the whole file into a PipedInputStream/PipedOutputStream. The thing is once I have the PipedInputStream I want to load this stream into a Properties object (Properites.load(PipedInputStream pis))
I mean....
I have a file like this
OBJECT = CLIENT
NAME = JOE
EMAIL = [email protected]
END OBJECT = CLIENT
END
OBJECT = CLIENT
NAME = ANGELINA
EMAIL = [email protected]
END OBJECT = CLIENT
END
and I want to save each CLIENT OBJECT into a Properties object. That's why every time I find the token "END" I open a new Thread and write to an PipedOutPutStream. The problem is that once the PipedInputStream is available I try to load it into the Properties but it doesn't load anything at all.I dont get any Exception, when I debug, after loading the PipedInputStream the Properties object still remain void but when I echo the stream to the console It works fine so it might not be a problem of the PipedInputStream but of Propreties.load()
Thanks for your help!!!!!
Here it is my code
* DictionaryReader.java
* Created on October 21, 2002, 5:02 PM
import java.io.*;
import java.util.Properties;
import java.util.Enumeration;
* @author
public class DictionaryReader {
String _filePath = null;   
private final String _TOKEN = "END";
/** Creates a new instance of DictionaryReader */
public DictionaryReader(String path) {
this._filePath = path;
public static void main(String[] args){
if(args.length != 1){
System.err.println("Usage java <file path>");
DictionaryReader dr = new DictionaryReader(args[0]);
dr.readFile();
private void readFile() {
String line_ = null;
try{
FileInputStream in_ = new FileInputStream(_filePath);
BufferedReader readIn_ = new BufferedReader(
new InputStreamReader(in_));
PipedOutputStream pout_ = new PipedOutputStream();
PipedInputStream pin_ = new PipedInputStream(pout_);
ReadDictionary readDictionary_ = new ReadDictionary(pin_);
Thread t = new Thread(readDictionary_);
t.start();
while((line_ = readIn_.readLine()) != null){
if(line_.trim().equals(_TOKEN)){
pout_.close();
pout_= new PipedOutputStream();
pin_ = new PipedInputStream(pout_);
readDictionary_ = new ReadDictionary(pin_);
t = new Thread(readDictionary_);
t.start();
} else {
line_ += "\n";
pout_.write(line_.getBytes());
System.exit(1);
} catch (FileNotFoundException e){
System.err.println(e.getMessage());
} catch (IOException ioEx){
ioEx.printStackTrace();
* ReadDictionary.java
* Created on October 22, 2002, 11:08 AM
import java.io.*;
import java.util.Properties;
import java.util.Enumeration;
* @author
public class ReadDictionary implements Runnable {
private PipedInputStream _pin;
Properties _propFile = null;
/** Creates a new instance of ReadDictionary */
public ReadDictionary(PipedInputStream pin) throws IOException {
this._pin = pin;
public void run() {
try {
// Making sure that the PipedInputStream
// has some content inside
String line = null;
BufferedReader read = new BufferedReader(new InputStreamReader(_pin));
while((line=read.readLine()) != null){
System.out.println(line);
//Here it is the problem
Properties prop_ = new Properties();
prop_.load(_pin);
Enumeration enum = prop_.elements();
while(enum.hasMoreElements()){
String element = (String)enum.nextElement();
System.out.println(element);
} catch(Exception e) {
e.printStackTrace();
Thanks for your help!!!!!
Cheers,
I�aki

Comment out these lines of code and see what happens:// Making sure that the PipedInputStream
// has some content inside
    String line = null;
    BufferedReader read = new BufferedReader(new InputStreamReader(_pin));
    while((line=read.readLine()) != null){
        System.out.println(line);
    }Streams tend to be readable only once and by using the reader you have read through to the end of the stream so that there is nothing left for the properties object to read. Some streams will support 'mark' so that you can 'rewind' but you're not using that here.

Similar Messages

  • Problem Updating Business Partner DI Object loaded via XML

    Hello,
    I'm working with  SB1 8.81 PL 08
    I have to Update a Business Partner Object in a Target SB1 Company Database starting from a Business Partner Objects saved as XML from the Source SB1 Company Database.
    Normally this works fine, I load from XML this Object and calling the Method Update all data is Syncronized in the Target DB.
    But if the Business Partner Object has at least a Contact Person and in the Target Company DB a Marketing Document has been created for this particular Business Partner the Update Method called on the loaded by XML object always fail giving the following error:
    Error: -10
    Message: Contact Person is referenced by another object.  , 'Sales Quotations [...contact Person ID...]'
    The modifications I need to update do not involve contact person in the BP object but only other simple properties like Tel Nr. ...
    In conclusion ... if the target BP has a marketing document created it seems no more possible to update it with an XML load, instead if a load the BP using the   GetByKey() Method and changing manually some properties of the object the Update works fine.
    Thank you for support.
    Max

    Hi,
    First Use the getbykey to get the Business partnet then update.
    sample code is available with B1WS package
    Regards.

  • Problems loading the SCCM 2007 R2 console

    Hello
    One of our clients has been having problems loading the SCCM 2007 R2 console.  When you open the console it returns the following error:
    “The ConfigMgr console could not connect to the ConfigMgr site database. Verify that this computer has network connectivity to the SMS Provider computer and that your user account has Remote Activation permissions on both the ConfigMgr
    site server and SMS Provider computers. For more information, see “”How to Configure DCOM Permissions for Configuration Manager Console””
    We have checked the permissions of WMI and DCOM, and everything is configured as it should be:
    http://technet.microsoft.com/en-us/library/bb932151.aspx
    http://technet.microsoft.com/en-us/library/bb633148.aspx
    The SmsAdminUI.log  is logging the following error each time that we start the ConfigMgr console:
    SQLMessage = "[HY018][11][Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.";
    The same error is logged in the smsprov.log:
    SQL Error: [HY018][11][Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.
    Can't create instance of CSecuredSource for SMS_Site [HY018][11][Microsoft][ODBC SQL Server Driver][DBNETLIB]General network error. Check your network documentation.
    The infrastructure is made of 2 servers:
    1 Server with all the SCCM roles: Primary Site Server, SMS Provider, Distribution Point, etc.
    1 Server which holds the site database: this server is hosting databases of other applications, and these other applications are working without any kind of problem.
    The firewall on both servers is down. There is no firewall device between those servers.
    Those servers are VMs hosted in a Hyper-V CSV Cluster.
    I would appreciate all the help that you can provide me with this incident.
    Thank you in advanced

    To grant Remote Activation permissions to the SMS Admins group
    From the Start menu, click Run and type Dcomcnfg.exe.
    In Component Services, click Console root, expand Component Services, expand Computers, and then click My
    Computer. On the Action menu, click Properties.
    In the My Computer Properties dialog box, on the COM Security tab, in the Launch and Activation Permissions section,
    click Edit Limits.
    In the Launch Permissions dialog box, click Add.
    In the Select User, Computers, or Groups dialog box, in the Enter the object names to select (examples): box, type SMS Admins and
    click OK.
    In the Permissions for SMS Admins section, select the check box to allow Remote Activation.
    Click OK twice, and then close Computer Management.
    http://technet.microsoft.com/en-us/library/bb633148.aspx
    Kamala kannan.c| Please remember to click “Mark as Answer” or Vote as Helpful if its helpful for you. |Disclaimer: This posting is provided with no warranties and confers no rights

  • Custom component  - how to store java Properties object in ucm environment

    Hi Experts,
    I am developing a custom component.
    my custom component code is reading a properties file and load in Properties object. Everytime this custom Service is called, properties file is read from file system and new Properties Object is created.
    Is there any way to load the Properties object once and store somewhere in UCM context ? (just like we do in JSP using application object"
    thanks!!
    Edited by: user4884609 on Jul 12, 2010 3:01 PM

    I'd say there are quite a few ways how to do it, but many of them have nothing in common with UCM.
    - I'd opt for the only "UCM" way I' aware of: as a part of custom component you can create your own properties file (it's also called environment variables) as a part of your custom component. You can, then, easily read (and write?) properties from/to the file.
    - The first option could have disadvantage, if there are too many properties. In this case you could use Java serialization - it should be UCM independent
    - Another option is to create your properties in the database - it is a bit similar to the first option, but it's more robust. Plus, you may use features of the database if you want to have some additional logic in you properties.
    - Note that you can also create a static object, which could be initialized e.g during class load

  • Hot to convert a properties object to a InputStream object?

    hot to convert a properties object to a InputStream object?

    peter321 wrote:
    The two property files need further process and filter out some values. The two configuration files come from different application. I want to use java.util.logging.LogManager.readConfigure(InputStream).For the last time, you've made it clear how you want to solve some as-of-yet undescribed problem. What you haven't made clear is what problem you're trying to solve. From the class you mention, it sounds like you want to read in two logging configurations (since that's what a LogManager is for) from separate applications and "filter out some values". Those are mysterious requirements at best, and if you're intending to use LogManager to process some arbitrary properties files, you're headed down the wrong path entirely. There are [much better solutions readily available|http://commons.apache.org/configuration/].
    ~

  • Problem creating non-persistent Child Objects

    I have the need to create a non persistable child object in the
    jdoPreStore of a parent object. I then perform some tests on the parent
    to determine if the child object needs to be persisted or not. If I leave
    the child non persistent it still writes to the database.
    I was performing the follwoing piece of code
    Class Parent {
    // The relationship is a 0 to many
    public Child createChild() {
    Child child = .....//create non persistent object
    child.setParent(this);
    getChild().add(child);
    It appears that if I remove the getChild().add(child). It does not
    persist (as desired).
    Is this correct behaviour?? I dont think that it should be, but if it is
    then I have a further problem.
    If that child object inherits from another object and you remove the
    getChild().add(child) kodo outputs an invalid object to the database. It
    doesnt insert a row to the child table. But it inserts a row to the
    childs inherited object table. This is now an invalid object and will
    fail upon loading.
    Any help on this would be appreciated.
    Thanks
    Luke.

    JDO has something called persistence by reachability. This means that
    objects do not have to explicitly be marked as to be persistent as JDO
    will traverse the object graph to ensure that all nodes are persistent.
    I think you are seeing this behavior combined with another side
    behavior: Kodo requires that both sides of a relation be set.
    Basically, keep your objects in synch (set both sides of the relation).
    And if you want to hold onto a reference to non-persistent object
    before you decide what to do with it, add a transient field or a field
    marked "persistence-modifier="none"" in your metadata and then process
    those transient fields in jdoPreStore ().
    i.e.
    if (//businessLogic is true)
    persistentField = transientField;
    Luke wrote:
    I have the need to create a non persistable child object in the
    jdoPreStore of a parent object. I then perform some tests on the parent
    to determine if the child object needs to be persisted or not. If I leave
    the child non persistent it still writes to the database.
    I was performing the follwoing piece of code
    Class Parent {
    // The relationship is a 0 to many
    public Child createChild() {
    Child child = .....//create non persistent object
    child.setParent(this);
    getChild().add(child);
    It appears that if I remove the getChild().add(child). It does not
    persist (as desired).
    Is this correct behaviour?? I dont think that it should be, but if it is
    then I have a further problem.
    If that child object inherits from another object and you remove the
    getChild().add(child) kodo outputs an invalid object to the database. It
    doesnt insert a row to the child table. But it inserts a row to the
    childs inherited object table. This is now an invalid object and will
    fail upon loading.
    Any help on this would be appreciated.
    Thanks
    Luke.
    Steve Kim
    [email protected]
    SolarMetric Inc.
    http://www.solarmetric.com

  • Problem loading applet from tomcat

    I am facing a problem loading the batik applet from tomcat. I have placed all the jar files of batik in ROOT directory in tomcat. Along with the folder containing the batik applet. Still i receive the following exception when trying to load the html page containing batik applet.
    Applet tag in html page is:
    <applet codebase = "." code="batik_applet.BatikApplet.class" name="myApplet" width="1600" height="1200" hspace="0" vspace="0" align="middle" archive="batik-swing.jar,batik-gvt.jar,batik-bridge.jar,xml-apis-ext.jar,batik-css.jar,batik-util.jar,batik-dom.jar,batik-svg-dom.jar,batik-anim.jar,batik-awt-util.jar,batik-codec.jar,batik-ext.jar,batik-extension.jar,batik-gui-util.jar,batik-parser.jar,batik-script.jar,batik-svggen.jar,batik-transcoder.jar,batik-xml.jar,js.jar,pdf-transcoder.jar,xalan-2.6.0.jar,xerces_2_5_0.jar,xml-apis.jar">
    </applet>
    I already have a folder named batik_applet containing BatikApplet.class in the ROOT directory.
    ========Exception===========
    network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet.class with proxy=DIRECT
    network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet.class with cookie "JSESSIONID=1A75299B77372108560B4DF8DC65A3A6"
    network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet/class.class with proxy=DIRECT
    network: Connecting http://localhost:8080/servlet/batik_applet/BatikApplet/class.class with cookie "JSESSIONID=1A75299B77372108560B4DF8DC65A3A6"
    load: class batik_applet.BatikApplet.class not found.
    java.lang.ClassNotFoundException: batik_applet.BatikApplet.class
         at sun.applet.AppletClassLoader.findClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadClass(Unknown Source)
         at java.lang.ClassLoader.loadClass(Unknown Source)
         at sun.applet.AppletClassLoader.loadCode(Unknown Source)
         at sun.applet.AppletPanel.createApplet(Unknown Source)
         at sun.plugin.AppletViewer.createApplet(Unknown Source)
         at sun.applet.AppletPanel.runLoader(Unknown Source)
         at sun.applet.AppletPanel.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.IOException: open HTTP connection failed.
         at sun.applet.AppletClassLoader.getBytes(Unknown Source)
         at sun.applet.AppletClassLoader.access$100(Unknown Source)
         at sun.applet.AppletClassLoader$1.run(Unknown Source)
         at java.security.AccessController.doPrivileged(Native Method)
         ... 10 more
    basic: Exception: java.lang.ClassNotFoundException: batik_applet.BatikApplet.class
    Any help would be appreciated.

    Assuming that your applet is not in a jar file (don't see a value for archive)
    you have a file callsed ProcessStatus.class in a folder WEB-INF\classes relative to
    the location of the jsp file.
    So if the jsp file is in
    myJSPFileFolder
    the class should be in:
    myJSPFileFolder\WEB-INF\classes
    If you want to see when the jre is trying to load and where it it trying to load it from you
    can inspect a full trace, to turn the full trace on (windows) you can start the java console, to be found here:
    C:\Program Files\Java\j2re1.4...\bin\jpicpl32.exe
    In the advanced tab you can fill in something for runtime parameters fill in this:
    -Djavaplugin.trace=true -Djavaplugin.trace.option=basic|net|security|ext|liveconnect
    if you cannot start the java console check here:
    C:\Documents and Settings\userName\Application Data\Sun\Java\Deployment\deployment.properties
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    add or change the following line:
    javaplugin.jre.params=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    for 1.5:
    deployment.javapi.jre.1.5.0.args=-Djavaplugin.trace\=true -Djavaplugin.trace.option\=basic|net|security|ext|liveconnect
    The trace is here:
    C:\Documents and Settings\your user\Application Data\Sun\Java\Deployment\log\plugin...log
    I think for linux this is somewhere in youruserdir/java (hidden directory)
    The trace should show something like :
    Caused by: java.io.FileNotFoundException: http://server/location/filename.class (The system cannot find the path specified)

  • Format Plug-In : problem loading a 4 channels image with CS4

    Hi!
    I wrote a format plug-in to support our own in-house file format. That plugin works fine with CS2 but I have some problems with CS4.
    Since my plug-in behaves exactly as the "simpleformat" provided with the CS4 SDK, we can center the discussion around that sample project and completely ignore my own plug-in.
    In CS2, I can load a 4-channel BMP and save it with the SMP (simpleformat) format. When I load back the SMP file, I recover my 4-channels perfectly.
    In CS4, I can also load the same 4-channel BMP and save it in SMP format. However, when I load it back, I lost the 4th channel. I can confirm by looking at the binary contentof the SME file that the 4 channels are there and with no mistake. Is there a reason that would explain why the 4th channel will not load with CS4 but it will with CS2?
    I dont know if it is related but I also noticed that the image is loaded as a "Smart Object" in CS4. Other file formats dont seem to do that by default when you just do "open".
    Thank you!
    Gilbert

    /*****************************************************************************/static  void DoReadFinish (void)
         /* Test the ability to create the file inside a smart object */
         /* This flag also tells you which menu item was selected */
         // if openAsSmartObject is already true then you cannot turn it off
         gFormatRecord->openAsSmartObject = gData->openAsSmartObject;
         // every other time we open as smart, that should be confusing enough for a user!
         gData->openAsSmartObject = !gData->openAsSmartObject;
         /* Dispose of the image resource data if it exists. */
         DisposeImageResources ();
         WriteScriptParamsOnRead (); // should be different for read/write
         AddComment (); // write a history comment
    Found the problem: the routine DoReadFinish() in SimpleFormat.cpp  ( sample file format plug-in in SDK for CS4) has the routine DoReadFinish() as shown above. I just needed to delete the 2 lines related to smart object. Everything works fine after that. I had overlooked that routine a bit I suppose but those 2 lines do not add much to the undestanding othe plug-in mechanism and they should be deleted from the example IMHO.

  • Problem – loading HTMLtext from a text file

    Problem – loading HTMLtext from a text file
    Hi, I have a dynamic text set up to render text as HTML and I
    am loading the text into the text object by using the code below.
    var loadText:LoadVars = new LoadVars();
    loadText.load("Nyheter.txt");
    loadText.onLoad = function(success){
    if(success){
    Nyheter_txt.htmlText = this.VariabelTekst;
    The textfile looks like:
    VariabelTekst=<p align
    ="Right">(13.11.2006)</p><p><b><font
    size="12">This is the tittle</b></p><p>Here
    comes the text</p>
    It works almost fine but the first problem is that the
    paragraph text in the textfile should be written in Norwegian. This
    involves some Nordic characters. By default these characters are
    just shown as small square in the text control when running the
    flash file. If I try to enter these characters in the textbox
    “Include these characters” within the dialog for
    embedding, the text within the bold tag of the text file is not
    shown when the text is rendered. It looks as if it effect the HTML
    rendering of the text. The Nordic characters are still not showing
    but instead the small square placeholders for the characters are
    gone.
    Am I doing it wrong, or is there a work around for solving
    this problem?
    Any ideas?
    TIRislaa

    Problem – loading HTMLtext from a text file
    Hi, I have a dynamic text set up to render text as HTML and I
    am loading the text into the text object by using the code below.
    var loadText:LoadVars = new LoadVars();
    loadText.load("Nyheter.txt");
    loadText.onLoad = function(success){
    if(success){
    Nyheter_txt.htmlText = this.VariabelTekst;
    The textfile looks like:
    VariabelTekst=<p align
    ="Right">(13.11.2006)</p><p><b><font
    size="12">This is the tittle</b></p><p>Here
    comes the text</p>
    It works almost fine but the first problem is that the
    paragraph text in the textfile should be written in Norwegian. This
    involves some Nordic characters. By default these characters are
    just shown as small square in the text control when running the
    flash file. If I try to enter these characters in the textbox
    “Include these characters” within the dialog for
    embedding, the text within the bold tag of the text file is not
    shown when the text is rendered. It looks as if it effect the HTML
    rendering of the text. The Nordic characters are still not showing
    but instead the small square placeholders for the characters are
    gone.
    Am I doing it wrong, or is there a work around for solving
    this problem?
    Any ideas?
    TIRislaa

  • How to save a properties object to a file / how to create a properties file

    hi,
    i am writing an application in which all the database and user information is stored in a properties object and is later retreived from it when a database connection or login etc is required.
    i wanna know how can i save this object / write it to a file i.e. how do i create a properties file.
    so that every time the application is run to create a new dbase etc the entire info regarding that will be stored in a new property file.

    Load:
    Properties p = new Properties();
    FileInputStream in = new FileInputStream("db.properties");
    p.load(p);
    String username = p.getProperty("username");
    String password = p.getProperty("password");
    // ...Save:
    String username = "user";
    String password = "pw";
    Properties p = new Properties();
    p.setProperty("username", username);
    p.setProperty("password", password);
    FileOutputStream out = new FileOutputStream("db.properties");
    p.store(out, null); // null or a String header as second argumentThe file will look something like
    username=user
    password=pw

  • Loading a tree of objects from a cache in a single call using an aggregator

    Hi,
    I currently have the following problem. I am trying to load a tree of objects from coherence by recursing up an object tree from a child object.
    What is currently in place is something like this (not actual implementation).
    Child child...// initialisation of Child;
    List<Parent> parents = new LinkedList<Parent>();
    Parent parent = null;
    int parentId = child.getParentId();
    while (true) {
    parent = cache.get(parentId);
    if (parent != null) {
    parents.add(parent);
    parentId = parent.getParentId();
    } else {
    break;
    However, this results in a number of calls over the network to the coherence cache and is proving to be quite inefficient. What I would like is to be able to write something like a filter or an aggregation function which will simply take in the child, or the parent id of the child, and return a list of all the parents (with the recursion logic taking place on the coherence node). This will hopefully reduce network latency considerably.
    Does anybody know how to go about doing this within coherence?

    XML might be a better solution, but using tags should work.
    The Sun tutorial at http://java.sun.com/j2ee/tutorial/1_3-fcs/doc/JSPTags5.html#68205 should be helpful to you.
    When processing a tag, determine if there is a parent tag by using getParent() or findAncestorWithClass().
    If there is no parent, instantiate your site navigation object based on the tag arguments and save a reference within the tag object. You'll probably want to also add the reference to page or session scope as an attribute for later use.
    If there is a parent, instantiate the new navigation object and then retrieve the parent navigation object from the parent tag (create a getNavigation() method in tag?). Then add the new navigation object to the array in the parent navigation object.

  • Problem loading and playing samsung videos in elements

    Samsung videos will not play in elements

    hibernian
    No enough information to help you. Answers will be in the details.
    1. What version of Premiere Elements are you using and on what computer operating system is it running?
    2. What Samsung device is recording your videos that you want to edit in Premiere Elements?
    3. What are the properties of those videos, including video and audio compression, frame size, frame rate, variable frame rate, interlaced or progressive, file extension, and pixel aspect ratio?
    4. What are you or the program setting as the project preset to match the properties of your source media?
    5. Are you getting any error messages associated with "problem loading and playing samsung videos in elements"?
    6. Is there a problem loading and playing both video and audio or just video or just audio?
    Let us start here and then we can plan troubleshooting strategy.
    Thank you.
    ATR

  • Persisting a properties object across the whole of my program.

    Hello all,
    As per usual, sorry for any idiocy on my part and thanks for any guidance.
    I have written a wrapper class for the Properties class.
    I have an MDI which creates a properties object and loads it at start up, and I have tried to use the same object again (to save any property changes) when the app terminates. However, I get a nullPointerException when I try and use it when the program closes. Below is what I hope are the relevant pieces of code. I don't include it all as it a couple of hundred lines long - but can easily do so if you think it will help. Many thanks once again:
    Here is the load properties method:
    private void yLoadProperties(){
            String workingDirectory = System.getProperty("user.dir");
            File yFile = new File(workingDirectory + "\\KTProperties.ini");
            YPorperties yProperties = new YPorperties(yFile);
            yProperties.yLoadProperties();
            // Retrieve application name - no conversion required
            yApplicationName = yProperties.yGetProperty("ApplicationName");
    }and here is the exit program method with the call the the save properties method
    private void yExitApplication(){
            // Save properties back to disk
            yProperties.ySaveProperties();
            // Exit
            System.exit(0);
        }I have also declared the yProperties variable thus:
    private YPorperties yProperties;
    I was hoping to use the yProperties object anywhere within my program to adjust properties as required. Any help, gratefully received.
    Steve

    That's just the way Java works. I'm sure someone is able to quote chapter and verse of the Java Language Specification that spells it out, but the basic distinction is this:
    A variable declaration has the form: <Type> <variableName> [= <value expression>];.
    A variable assignment (which assigns a value to an existing variable) has the form: <variableName> = <value expression>;
    When you specify the type of a variable, Java assumes you are declaring a new variable in the current scope, regardless of whether the name of the variable already existing in a enveloping scope. When you don't specify the type, Java will look for an existing variable with that name in the current scope and any enveloping scopes.
    In my mind, when I explicitly declared yProperties, thus:> private YPorperties yProperties;> I was making it available to the whole program.With that line you declared a member variable of type YPorperties (shouldn't that be YProperties, by the way?), which means a separate yProperties variable is available as a member of each instance of your class. Note that you already specify the type of the variable yProperties in that line, so there is no need to specify that type again when using the variable further on in your application.
    But yes, you are correct in saying that this variable would be available anywhere inside that one instance of your class. However, it is possible in Java to declare a variable with the same name in a different, narrower scope (as you have seen).
    Java looks for variables from the narrowest scope outward, so in this case it sees the local variable yProperties before it sees the member variable yProperties.
    (BTW for future reference, note that a class or an instance of a class is not a "program" as such. So declaring a private member variable does not make it available to your "program", it makes it available to an instance of a class. The fact that you use that class to start your application is irrelevant)

  • Problems loading Adobe Flash SWF file

    Our users are experienceing problems loading Adobe Flash SWF
    files.
    One example of a problem file is:
    http://www.adobe.com/enterprise/accessibility/popup_acr8_accessibility.html
    User traffic is flowing through a Cisco ASA firewall - these
    problems do not seem to occur from home networks or a Netscreen
    firewall. The Cisco ASA does NOT have http deep packet inspection
    turned on, and any traffic initiated by clients inside the firewall
    should be allowed. The symptom is that Internet Explorer will begin
    to download the video, but will hang at some point along the way
    (for this particular URL it hangs at about 7%). No error messages
    are displayed, but the video never displays on the screen either. I
    would appreciate hearing from anyone who may have run into this
    before, or if someone can explain what is different about this type
    of file from regular Adobe Flash, that might help figure out what
    the ASA is objecting to. The ASA does not appear to generate any
    log messages about denying this type of traffic either.
    Thanks in advance for any help you can provide...

    Thanks, but I use publish/export settings with GPU hardware acceleration and flash version 11.2 (and 11.8) but nothing happening.
    And why gif file is not all transparenty then I insert on lightblue background? It can't export good quality? Also I use Photoshop, After Effects, Adobe Edge Animate. And nothing happening. Egde animate file .oam is not good for old website navigation. It can't be inserted in freeshop site from navigation... I use logo file .oam just for example here - http://e-shoptagras.graphicsrim.eu
    In reality I want swf file, but we don't find why logo flickering? here http://tagraseshop.graphicsrim.eu
    All file's are transparenty - https://mega.co.nz/#!f8B2CD5R!J8uCJt9Sdq4Suz4HLhTHz8bzJcSWXMBIKcKZgkD3z8c
    I need help! Please!

  • Problems Loading Photoshop  & Premiere Elements 11

    I am having problems loading Elements 11 on my PC .It loads up and just near the end I get a message "Installing required shared technologies" then the program rolls back and askers to restart the PC.
    I removed all old Adobe & other photo software and ran the adobe help thing .It gave this message "cpsid-82829s1 a restart is pending Bootstrapper error has occurred" .
    Can someone HELP I've been trying to load this software for 3 days.

    Ed Cowan
    Windows 8
    If you go to the Desktop app, then to the File Explorer icon in its taskbar, then right click Computer to select Properties, what do you see for:
    Windows Edition
    and
    System
    If you have Windows 8 64 bit, you should see that. If you have 32 bit Windows 8, the System reading should tell you that.
    When you talk about software box are you referring to the box that the disc came packaged in.
    If you have Windows 8 32 bit, then your Premiere Elements 11 will install as a 32 bit application running in the 32 bit compatibility mode of a 64 bit application and will have all the resource limitations of a 32 bit system. If you have Windows 8 64 bit, using that same installation disc, you should then have Premiere Elements 11 as a 64 bit application running of 64 bit system, capable of taking advantage of the 64 bit resources. Although I do not believe this to be linked to your Shared Technologies install issue, this detail should be clarified.
    Have you read through all the varied fixes suggested for your type of problem. One of them will work. Which one for you is the question.
    We will be watching for further developments.
    Thanks.
    ATR

Maybe you are looking for

  • No active nametab exists for SY

    Hi, I have created a BAPI and it has IMPORT and EXPORT values. I have checked the REMOTE-ENABLED MUDULE redio buttoms. This bapi works perfectly well for Java Web Dynpro. I now create a ABAP web dynpro and create a SERVICE CALL. Everything looks ok,

  • IPod mini shows up as having 328.9 GB capacity in updater and iTunes

    I have a 6 GB mini, and I have updated to the new iTunes since I last used it. So when I connnected it, it showed up as "Data" instead of my iPod name, and iTunes claimed it didn't have any songs on it even though it did. I got the 1.4.1 updater (200

  • ITunes Content missing from Music Player on iPhone

    Certain iTunes content that I sync to my iPhone 4 is present on the device, but missing from certain categories in the Music Player. For example, I have an many albums from the The Rolling Stones, when I search by artist, pull up The Rolling Sones, c

  • Vendor Invoice Verification

    How does an invoice verification process happen in SAP FI and what are all the steps?

  • All of a sudden for once Delta DTP acts like a Full DTP

    Hello SCNer's, Delta DTP has been running fine for a while fetching only the unloaded requests from the source cube to the target cube but at one instance last week it actually loaded all the available requests again from the source which were alread