Multiple instances of objects

Ok, so I am making an RPG kind of like Dungeons and Dragons. Unfortuantely with that comes the need for multiple, different objects of the same class: Monster
import java.util.*;
public class BattleCall
     public static void main(String[] args)
          State h = new State();
          final Monster Goblin = new Monster(12,10,12,1,8,-1,13,1,8,2,"Goblin");
          final Monster Pirate = new Monster(14,10,14,2,9,-1,12,1,10,4,"Pirate");
          h.h(Goblin,Pirate);
          This calls two instances of the monster class. Because of sheer frustration I have gotten rid of the whole battle scheme for now. All I am trying to do right, through the State class is show the AC's of the two monsters (the first parameter)
Here is my monster class
//Beginning stuff here, too lazy to retype, no method
int AC;
//All other variables here, AC is the first one
Monster(int AC1)//All other variables also in here, program on laptop not desktop, too lazy to retype
AC = AC1;
}Mind my laziness, it's late and I'm just about to go to bed.
Anyways, through the tow instances I need to keep the variables seperate, here is the code for the State class
//beginning stuff here
public void h(Monster mon1,Monster mon2)
System.out.println(mon1.AC+","+mon2.AC);
//end stuffOk so you have all my code, now for the output...... 14,14 it should be 12,14 (12 being goblin, 14 being pirate) If I run my battle with two enemies, it places the pirate in twice, it's name, intelligence, strength, everything instead of pirate once goblin once..... I have tried using arrays to achieve this but to no avail... If this is possible PLEASE help me out.

ok, and can you please tell me how it doesn't follow those guidelines? If he where to make it shorter then it wouldn't be self contained. He showed us just the methods that where causing the problem. How would you present the problem "Hlpes prgrm no wrk!!!!!" and leave it at that? I'll just point this out before you say anything else:
U nEd 2 b clearer bout wot d prob iz!_
Fact is your not helping him at all.
Now on to his question. I have run code similar to yours in my own sessions and everything turns works out fine.
public class Monster{
     public int AC;
     public Monster(int a){
          AC = a;
public class State{
     public State(){}
     public void h(Monster mon1, Monster mon2){
          System.out.println(mon1.AC+","+mon2.AC);
public class Test{
     public static void main(String[] args){
          State h = new State();
          final Monster Goblin = new Monster(12);
          final Monster Pirate = new Monster(14);
          h.h(Goblin, Pirate);
}That outputs "12,14". So the problem most be somewhere else in the code.

Similar Messages

  • How to reference multiple instances of the same Java object from PL/SQL?

    Dear all,
    I'm experimenting with calling Java from PL/SQL.
    My simple attempts work, which is calling public static [java] methods through PL/SQL wrappers from SQL (and PL/SQL). (See my example code below).
    However it is the limitation of the public static methods that puzzels me.
    I would like to do the following:
    - from PL/SQL (in essence it needs to become a forms app) create one or more objects in the java realm
    - from PL/SQL alter properties of a java object
    - from PL/SQL call methods on a java object
    However I fail to see how I can create multiple instances of an object and reference one particular object in the java realm through public static methods.
    My current solution is the singleton pattern: of said java object I have only 1 copy, so I do not need to know a reference to it.
    I can just assume that there will only ever be 1 of said object.
    But I should be able to make more then 1 instance of an object.
    To make it more specific:
    - suppose I have the object car in the java realm
    - from PL/SQL I want to create a car in the java realm
    - from PL/SQL I need to give it license plates
    - I need to start the engine of a scpecific car
    However if I want more then 1 car then I need to be able to refrence them. How is this done?
    Somehow I need to be able to execute the following in PL/SQL:
    DECLARE
    vMyCar_Porsche CAR;
    vMyCar_Fiat CAR;
    BEGIN
    vMyCar_Porsche = new CAR();
    vMyCar_Fiat = new CAR();
    vMyCar_Porsche.setLicensePlates('FAST');
    vMyCar_Porsche.startEngine();
    vMyCar_Fiat.killEngine();
    END;
    Thanks in advance.
    Best Regards,
    Ruben
    My current example code is the following:
    JAVA:
    ===
    CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED CODAROUL."RMG/BO/RMG_OBJECT" as package RMG.BO;
    public class RMG_OBJECT {
    private static RMG_OBJECT instance = new RMGOBJECT();
    private String rmgObjectNaam;
    private RMG_OBJECT(){
    this.rmgObjectNaam = "NonDetermined";
    public static String GET_RMGOBJECT_NAAM () {
    String toestand = null;
    if (_instance == null) {toestand = "DOES NOT EXIST";} else { toestand = "EXISTS";};
    System.out.println("instance : " + toestand);
    System.out.println("object name is : " + _instance.rmgObjectNaam);
    return _instance.rmgObjectNaam;
    public static Integer SET_RMGOBJECT_NAAM (String IN)
    try
    _instance.rmgObjectNaam = IN;
    return 1;
    catch (Exception e)//catch
    System.out.println("Other Exception: " + e.toString());
    e.printStackTrace();
    return 5;
    } //catch
    PL/SQL Wrapper:
    ==========
    CREATE OR REPLACE FUNCTION CODAROUL.SET_RMGOBJECT_NAAM(NAAM IN VARCHAR2) return NUMBER AS
    LANGUAGE JAVA NAME 'RMG.BO.RMG_OBJECT.SET_RMGOBJECT_NAAM (java.lang.String) return java.lang.Integer';
    Calling from SQL:
    ==========
    CALL dbms_java.set_output(2000);
    select CODAROUL.GET_RMGOBJECT_NAAM() from dual;
    Edited by: RubenS_BE on Apr 6, 2012 5:35 AM
    Edited by: 925945 on Apr 6, 2012 5:41 AM

    You can do this by manually creating a new iterator binding in your binding tab.
    So instead of dragging the VO directly to the page, go to the binding tab, add a new executable iterator binding, and point to that one from your ELs in the page itself.

  • Creating multiple instances of a class in LabVIEW object-oriented programming

    How do you create multiple instances of a class in a loop?  Or am I thinking about this all wrong?
    For instance, I read in a file containing this information:
    Person Name #1
    Person Age #1
    Hobby #1
    Hobby #2
    Hobby #3
    Person Name #2
    Person Age #2
    Hobby #1
    Hobby #2
    Hobby #3
    Person Name #3
    Person Age #3
    Hobby #1
    Hobby #2
    Hobby #3
    If I define a Person class with name, age, and an array of strings (for the hobbies), how can I create several new Person instances in a loop while reading through the text file?
    FYI, new to LabVIEW OOP but familiar with Java OOP.  Thank you!

    First of all, let's get your terminology correct.  You are not creating multiple instances of a class.  You are creating Objects of the class.
    Use autoindexing to create an array of your class type.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Shared Objects: How to store and read multiple instances

    Hi,
    Can we store multiple instances of Shared Objects in memory and read the desired instance.
    e.g
    If i execute the below program twice then also it will create only a single instance in the memory.
    Can we create a memory object with a key and then read the instance with the object with key
    data: handle type ref to ZCL_SHM_AREA_XX,
          root   type ref to ZCL_SHM_AREA_ROOT_XX.
    handle = ZCL_SHM_AREA_XX=>attach_for_write( ).
    create object root AREA HANDLE handle.
    root->FORM = 'Termination'.
    handle->set_root( root ).
    handle->detach_commit( ).

    Hi Sameer,
    check my reply to Recursive methods..
    Cheers
    Graham Robbo

  • Multiple instances of a Singleton-Object by updaterule ?

    Hi folks,
    I'm trying to load > 1 Mio. records from an ODS into another InfoProvider. Every record gets some keyfigures out of a very very expensive table-join.
    I tried creating this join in an ABAP-Singleton-Object to reduce uploading-time.
    This object holds a private-static attribute 'instance' as a reference to a instance of the object and a public-static 'getInstance()'-method, which returns the 'instance'-value. This method is standard-Singleton-like designed.
    Then I created a process-chain with:
    - an ABAP-process, which calls the 'getInstance()'-method
      of this Singleton.
      At the first pass this method calls the constructor and
      after that a private method, which creates the join and
      holds the result in an internal table.
      So the constructor is empty.
    - after that the data should be transfered (by an Info-
      Package) from the ODS to the other InfoProvider. In some
      fields of the update-rule and in the startroutine of
      the rule the 'getInstance()'-method of the Singleton is
      been called and by this reference to the only (so I
      thought) instance some other methods should return a
      calculated value out of the join.
    So theory .... the startroutine is been called for multiple datapackages (no problem) --- but for every package in the startroutine the 'getInstance()'-method calls the constructor, so I get multiple instances of a Singleton.
    The time-gap between the package-calls is > 10 secs., so the static-attribute should been set immediately in the first pass of the 'getInstance()', since the constructor is empty.
        Any ideas ???
        Bye Ralf

    -/-

  • How do I prevent a user from opening multiple instances on the same computer?

    On the site oldnavyweekly.com there is a .swf that prevents users from opening multiple instances of the site at the same time on the same computer. If you open the site, and try to open it a second time in another window, it won't load. You can't open the site again until the first window is closed. How did they implement this?
    From my analysis it is NOT:
    1. Cookies - The block still takes place if you try opening it in IE and also try opening it in Firefox simultaneously.
    2. Flash Cookies - The block still takes place if I disable flash cookies.
    3. IP Based Block - You are not blocked if you open the site on two separate computers with the same outbound IP address. From my analysis, their server does not assist in the block at all.
    It seems as if their .swf is creating some kind of global system-wide object that can be detected in other instances of the application on the same machine. How did they implement this?
    Thanks!

    you're welcome.
    actually, unless you take an extra step, the first opened swf will close.  if you want the 2nd to close, the initial receiving lc will send a message to sender that causes the sender to close.

  • Multiple instances of the same bean class in session?

    I�m trying to think of a way to have multiple instances of the same bean class in session scope using JSF. For example, let�s say that I have two <h:dataTable>s on the same page. They both use the backing bean called genericBean. Now, the content for genericBean will be different for each <h:dataTable>. In fact, the data source that backs genericBean is not known until runtime. It could be a database, web service, etc.
    What I would like is for when JSF needs access genericBean instead of looking for the value with key �genericBean� in the session map it looks for �genericBean_[some runtime ID]�. I could specify this id in EL on a custom component, as a request parameter or whatever.
    I think that I need the bean to be in session scope because the tables are complex and I want them to be editable.
    I have some ideas about how I can do this but I was wondering if someone has already solved this problem or if there is a standard way to do this using tools like Shale, etc.
    Thanks,
    Randy

    Well, I came up with an interesting solution to this so I thought that I would post it here.
    I have a page that looks like this.
    <html>
    <head>
    <title>My Page</title>
    </head>
    <body>
    <f:view>
    <f:subview id="component1">
    <jsp:include page="component.jsp">
    <jsp:param name="id" value="a" />
    </jsp:include>
    </f:subview>
    <hr>
    <f:subview id="component2">
    <jsp:include page="component.jsp">
    <jsp:param name="id" value="b" />
    </jsp:include>
    </f:subview>
    </f:view>
    </body>
    </html>
    And component.jsp looke like this.
    <f:verbatim>
    <p>
    <h1>Component
    </f:verbatim>
    <h:outputText value=" #{param.id}" />
    <f:verbatim>
    </h1>
    </p>
    </f:verbatim>
    <h:form>
    <h:outputText value="#{component.id}" />
    <h:outputText value="#{component.value}" />
    <h:commandButton value="increment" action="#{component.increment}" />
    <h:commandButton value="decrement" action="#{component.decrement}" />
    <f:verbatim>
    <input type="hidden" name="id"
    value="</f:verbatim><h:outputText value="#{param.id}"/><f:verbatim>" />
    </f:verbatim>
    </h:form>
    The idea is that I want component.jsp to be initialized differently based on the id param. The component managed bean is configured to be in session scope but I want the component instance for id a and id b to be different instances in session scope. Therefore, I added a custom variable resolver to handle this.
    public Object resolveVariable(FacesContext context, String name) {
    // This id will be different for the different subviews.
    HttpServletRequest request = (HttpServletRequest) context.getExternalContext() .getRequest();
    String id = request.getParameter("id");
    // If there is an id in the request then check if this is a bean that can have multiple
    // instances in session scope.
    if ((id != null) && (id.length() > 0)) {
    ExternalContext ec = context.getExternalContext();
    // Build the new name for the key of this bean
    String newName = name + "_" + id;
    Object value = null;
    // See if the bean instance already esists.
    if ((null == (value = ec.getRequestMap().get(newName))) &&
    (null == (value = ec.getSessionMap().get(newName))) &&
    (null == (value = ec.getApplicationMap().get(newName)))) {
         // We could not find the bean instance in scope so create the bean
         // using the standard variable resolver.
    value = original.resolveVariable(context, name);
    // Now check if the bean implements that page component interface. If it is
    // a page component then we want to rename the key to access this bean so
    // that the instance is only used when the id is provided in the request.
    // For example, if there are two components (a and b) we will have in session scope
    // component_a and component_b. The will each point to a unique instance of the
    // Component bean class.
    if (value instanceof PageComponent) {
    // Try to get the value again
    if (null != (value = ec.getRequestMap().get(name))) {
         // Initialize the bean using the id
    ((PageComponent) value).initInstance(id);
    ec.getRequestMap().remove(name);
    ec.getRequestMap().put(newName, value);
    } else if (null != (value = ec.getSessionMap().get(name))) {
    ((PageComponent) value).initInstance(id);
    ec.getSessionMap().remove(name);
    ec.getSessionMap().put(newName, value);
    } else if (null != (value = ec.getApplicationMap().get(name))) {
    ((PageComponent) value).initInstance(id);
    ec.getApplicationMap().remove(name);
    ec.getApplicationMap().put(newName, value);
    return value;
    return original.resolveVariable(context, name);
    }

  • Multiple instances of Page Flows

    I have a legacy application that I am working on migrating to Weblogic. The
    legacy application allowed the user to have multiple windows of the same
    module open at the same time. Users found this useful if they wanted to look
    at two different records in the same module. For example, if you had a
    registration app and you wanted to look at Joe's registration information
    and Sue's registration. Is it possible to have two browsers within the same
    session open and pointing to the same RegistrationController.jpf?
    We currently have our form beans stored in the page flow which seems to
    cause a problem as when we open another browser instance in the same session
    pointing to the same page flow, the form beans from the first window are
    overwritten. An approach we are possbily looking at is to store the form
    beans in an object in the session and identify a set of form beans as
    belonging to a particular window instance - perhaps by uniquely naming the
    windows as they are opened.
    Has anyone done this before with needing to have multiple instances of the
    same page flow or multiple instances of different non-nested page flows open
    at the same time?
    Michelle

    Hi Vijay,
    Thanks for the reply, But that's not the right aproach.
    I cannot change the application to stateless, Since the standard application where the page resides is statefull.
    Also some of the business logic I cannot achive with stateless application
    Regards
    Geogy

  • Multiple instances of FileOutputStream

    Hi, I'm learning how to use Java's multithreading features. I created a class called "ObjectMaker". An instance of this class serializes some objects into a file, using a FileOutputStream (inside an ObjectOutputStream) for writing. In the mean time an other object of another class deserializes those objects reading from the file. Each concurrent access to the file (for writing,reading) is synchronized. Here's the problem:[ u]if each writer has its own FileOutputStream, then the concurrent writing on the file doesn't work (despite of every writer is synchronized on the same object), and the reader aren't able to read anything from the file; if the FileOutputStream is static (every instance share the same FileOutputStream reference) everything works. I read on Documentation that some OS "allow a file to be opened for writing by only one FileOutputStream (or other file-writing object) at a time" .But it also says that I would recive an exception from FileOutputStream if I try to open a file for writing that is already open by another FileOutputStream....and It doesn't happen, no exception are thrown.Then here is the problem:It's possible to manage Multiple instances of FileOutputStream linked on the same file?

    Hello Joseph,
    Have u been successful on the installation.
    There were no replies after yours.
    Can you please let me know about installing 2 MDS instances on the same host.
    If you have any document you followed please mail me to [email protected]
    It will be more helpful as the dead line to this is killing me.
    Regards,
    VishnuM

  • Multiple instances of the same VI running in parallel

    Hi,
    I have a timestamping subVI that looks at a counter channel and applies timestamps. I want to create multiple instances of this subVI (8 to be exact) and have them all run in parallel (looking at 8 different channels). Someone gave me the following advice:
    >>
    Also, in case you want to call multiple instances of the same SubVI, and you want these multiple instances to execute in parallel, you will have to set the SubVI to execute in reentrant mode. Do this by opening the SubVI and going to "Edit >> VI Properties >> Execution" and enable "Reentrant execution".
    <<
    I've tried this but only my second instance (I started simple with only 2 instances) seems to monitor its channel and pass data along to the queue. I've included my code below, I have two signal simulators which simulate singles coming in on channels 2 and 3. I'm using a PCQI 6602 counter/timer card.
    Any help would be greatly appreciated, thanks in advance,
    Chris
    Attachments:
    LabView App (June 28, 2005).zip ‏158 KB

    good news! Your reentrant VI is working and all three instances are running (as execution highlighting clearly shows). The problem is going to be an error that is occuring but you don't see because you are ignoring the error clusters internally in the timer. It looks like at one point it was set to quit if an error occurred. That still needs to be there.
    Always hookup error clusters...
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • Multiple instances of mplayer with jack

    "_R_ealtime software mixing ?!?! wtf thats awesome--actually im not a studio junkie, i just need sound on one of them"
    i understand that the casual nature of my involvement with jackd suggests a less-than-appropriate level of respect and diligence for what this almighty app is capable of serving up.  i just need to level audio volume on multiple instances of mplayer with software mixing (my sound card is cheap).
    all my jackd configs are vanilla from the wiki as stated below.  if anyone has another solution or a request for information in regard to this solution please reply.  as always, thanks in advance
    --here is some err... background
    i have a some files that i would like to run with mplayer and a video file [with its own audio] that i would like to run concurrently.  it should be possible to use jackd to let one instance of mplayer show video with no sound while permitting the audio from the other instance to play at arbitrary volume.  without jack, i cannot control sound independantly since both instances seem to use the same device (PCM0).  furthermore i have found that starting multiple instances of mplayer leads to weird artifacts which persist after all running instances of mplayer concurrent with artifact appearance have been closed. 
    so i installed jack-audio-connection-kit following the wiki verbatim.  then i installed qjackctl.  starting jackd as root and qjackctl with sudo allowed me to see the first instance of mplayer but not the second.
    what is the difference between running mplayer through alsa and running mplayer through jack through alsa (not sure if the objects are accurately laid out there but whatever)?  the wiki basically provides an out of the box solution for software mixing a bunch of inputs (i have friends who do sound professionally though not with linux and im envisioning way more complicated stuff than my humble pair of mplayers
    Last edited by poopship21 (2010-09-25 15:20:56)

    ngoonee wrote:
    karol wrote:
    ngoonee wrote:And running mplayer through alsa won't be able to do what you want, simply because the mixing is fixed. JACK and pulseaudio are sound servers which allow you to control the mixing, both can do what you want.
    If you run one file with '-ao null' and the other one with '-vo null' you can manipulate them independently, there's no sound mixing involved, it just allows you "to add visuals to an audio feed spontaneously". They can both be run with 'af scaletempo' to speed up / slow down etc.
    Hmm, wonder if that's what the OP was looking for?
    From his first posts:
    poopship21 wrote:it should be possible to use jackd to let one instance of mplayer show video with no sound while permitting the audio from the other instance to play at arbitrary volume
    Also, read his second post. <shrugs>

  • Multiple instances of Crystal Reports Viewer possible in WPF?

    Hi, I've dragged and dropped three Crystal Reports Viewer controls on my WPF application. The goal is to be able to select up to 3 reports from a listbox and click run to generate the reports simultaneously. When I select just one report, it works fine. However when I select multiple reports it throws errors (object not found, etc). It seems there is a problem with multiple threads. Is it possible to have multiple instances of the Crystal Report Viewer display reports simultaneously? I am using version 13.0.9.1312 from the link below along with VS2013 C# WPF.
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads
    Thanks,
    Syed

    I was able to quickly cobble together a two viewer app that looks like this:
    The code is like this:
    Public Sub New()
            ' This call is required by the designer.
            InitializeComponent()
            ' Add any initialization after the InitializeComponent() call.
            Dim crReportDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            crReportDocument.Load("C:\tests\formulas.rpt")
            CrystalReportsViewer1.ViewerCore.ReportSource = crReportDocument
            Dim crReportDocument2 As New CrystalDecisions.CrystalReports.Engine.ReportDocument
            crReportDocument2.Load("C:\tests\report1.rpt")
            CrystalReportsViewer2.ViewerCore.ReportSource = crReportDocument2
        End Sub
    For more details see the document WPF Project Using the Crystal Reports WPF Viewer in 8 Easy Steps
    Now a couple of things to keep in mind;
    1) The report engine is based on 3 Concurrent Processor License (CPL) model. Meaning you can process at most three reports at the same time. In my test, doing the above code for four reports worked, but the reports are very, very simple - and with saved data. What a "real" world reports will do, I am not sure. I do know that in a web app, the reports are queued up until one report is done and thus a CPL is freed up. You will also need to keep in mind any database connection limits, etc.
    2) There is also a Print Job limit. This by default is set to 75. In a nutshell, almost anything done with a report is a Print Job. E.g.; paging, zooming, drilling, searching, etc., etc. In addition subreports are considered to be Print Jobs. Thus a report with one subreport in a detail section that returns a thousand rows of data and therefore running 1000 subreports will error out.
    You can read more about Print Job limits here:
    Crystal Reports Maximum Report Processing Jobs ... | SCN
    - Ludek
    Senior Support Engineer AGS Product Support, Global Support Center Canada
    Follow us on Twitter

  • Need Multiple Instances Of A Data Structure

    Is it possible to create multiple instances of a Queue or Stack within a for loop? Or any way for that matter?
    For the life of me, I can't figure out how to do this.
    If I need to build 3 queues, I'd like them to be named q0, q1, & q2. Is there some way to convert or cast the value of "i" to part of the queue's name? I know I can't do it the way I posted it below but it kind of shows what I'm trying to accomplish.
    int elements=Integer.parseInt(in.readLine());
    for(int i=0;i<elements;i++){
         Queue q+"i" = new Queue();
    }

    I tried an array of queues but I can't handle it
    correctly. I tried:
    Queue []q = new Queue[3]
    but when I try to fill up a one of the queues they
    always stay null. I tried something like:
    q[0].enqueue(object)
    but q[0] will never fill up. I dont think its my
    Queue class thats incorrect because if I have a stand
    alone queue I can fill it up and/or remove elements.You are right--the array has three null elements. Right after you call "new Queue[3]", do this (preferably in a loop, and passing constructor parameters as necessary):
    q[0] = new Queue();
    q[1] = new Queue();
    q[2] = new Queue();Then you can safely call:
    q[0].enqueue(object);Don't forget code tags (see button above posting box) when posting code, so that it gets formatted nicely.

  • Open excel files in multiple instances

    When ever i open the excel files it opens as different windows of the same instance . Is there any way to open in multiple instances of excel ...  I saw some answes in forums which says about about unchecking 'Ignore other application that use DDE'
    .. once i set that the excel file doesnot open again giving an error "there was a problem sending the command" ....
    Could some one help me on this .. this is pretty urgent for me ...  i am using this in my vb.net project with process.start(file)  ...
    i dont think i want to create an excel application and open the file in the code as i may not be able to release the com objects properly in my fuinctionality .... 

    Try this one:
    1. To begin, we go to the registry. Click START, and in the RUN command line type REGEDIT and hit ENTER or click OK. This will start the registry editor.
    2. Navigate to the following key: HKEY_CLASSES_ROOT\Excel.Sheet.8\Shell\Open\Command
    3. Double click on the (Default) instance over to the right. Right now this probably says something like:
    If you have Office 2007 installed:
    C:\Program Files\Microsoft Office\Office12\EXCEL.EXE /dde
    Or, if you have Office 2010 installed
    C:\Program Files\Microsoft Office\Office14\EXCEL.EXE /dde
    Change this value to:
    C:\Program Files\Microsoft Office\Office12\EXCEL.EXE /e "%1"
    for Office 2007 and for Office 2010 change it to:
    C:\Program Files\Microsoft Office\Office14\EXCEL.EXE /e "%1"
    4. Navigate to the following key: HKEY_CLASSES_ROOT\Excel.Sheet.12\Shell\Open\Command
    Again, double click the (Default) entry to the right and change
    C:\Program Files\Microsoft Office\Office12\EXCEL.EXE /dde
    to
    C:\Program Files\Microsoft Office\Office12\EXCEL.EXE /e "%1"
    When you exit the registry this should be all you need to do. Each time you double click on your Excel shortcut or type excel.exe in the command line a new instance of Excel is launched with the default spreadsheet.
    Quote from:
    http://blogs.technet.com/b/the_microsoft_excel_support_team_blog/archive/2011/09/06/opening-excel-in-multiple-instances.aspx
    Max Meng
    TechNet Community Support

  • Log messages from multiple instances in single file.

    Hi!
    I have a requirement that i need to log messages from muliple instances of the same object in a file. The new file will be created every day. Likewise, multiple objects might have various instances each.
    One class
    ->multiple instances
    -> log message stored in single file.
    Note :
    I am using the Message driven bean. I need to log from the bean class. JDK 1.3
    If u could help me out that would be great.

    As long as they are all from the same OS program (a single Java VM), that's OK - you can use Log4j, and use a rotating file logger.
    If you point two different virtual machine processes at the same file, one may have it open when the other is trying to rotate it, and your rotation may fail (at best) and/or you may lose the old log (the worst case).
    If you need to collect log messages from multiple processes (or even multiple machines), use a syslog-based logger (Log4j has a SyslogAppender) or use Log4j's SocketAppender to write to a log4j-builtin log listener (SocketNode).

Maybe you are looking for

  • Display issues when disconnecting from an external display

    While I have found 3 bugs since my upgrade to 10.6 the biggest and most frequent issue is the MBP display when using and external monitor. When I connect a monitor all is well (mirroring mode). When I disconnect the MBP screen gets the major jitters

  • Trasport Request ---Problem Vurgent

    Hi ALL I have traspported some requests to the Testing environment can i call back the request or can i cancel the trasport resquest that was released.. help me on this Thanks in Advance KA

  • Genius stopped to work, can't fix it. Error -9810 Any suggestions?

    Hi there. I somehow damaged my media Library and create a new one with the same media files. Genius won't finish the initial sending process to apple but stops with an unknown error -9810. Have tried to reinstall Itunes 9.0.3 - 9.1.0, talked to the a

  • Suppressing directories and .css files for excluded FrameMaker .fm files?

    The source for this project I recently inherited is in FrameMaker. I noticed that the WebHelp output included the PDF title page (Title.fm in FM), so I checked the Excluded Unreferenced Topics from Output and Exclude Unreferenced boxes. The Title.fm

  • CD-Rom for Mac 10.5 won't download on to my Mac 10.9.5.

    I am currently using a Macbook Pro with Mac OSX 10.9.5. On the CD it says for 10.5 or 10. When I put the CD in it pops up saying "add to Applications" which I did then when trying to open it a pop up says "The program unexpectedly quit would you like