BufferedWriter can use threaded i/o?

Dear all,
I read BufferedWriter.java from java source code, and found that it is not using thread to flushBuffer. I am wondering if we use thread to write out buffer when buffer is full, whether it will improve the write performance? -- That is, when the buffer size > nChars (the capacity of the buffer), we just use another thread to write out this buffer.
Is it possible to do so? How this can be implemented? Since I need to write out a very large file, but requires the processing time to be minimized.
   void flushBuffer() throws IOException {
          ensureOpen();
          if (nextChar == 0) return;
          out.write(cb, 0, nextChar);
          nextChar = 0;
   public void write(int c) throws IOException {
          ensureOpen();
          if (nextChar >= nChars)
               flushBuffer();
          cb[nextChar++] = (char) c;
   }Thanks!

No doubt it could be done, although there's obviously
no flag to tell the existing BufferedWriters to do it.
You would have to write your own version. One thread
writing full buffers, another one creating new buffers
and filling them. Could be an interesting project.
Would also be interesting to find out whether that
shortened the total time required to write the file at
all.Thanks DrClap, I think I only need to modify the flushBuffer() method in BufferedWriter code, since all other write() method will call this method when the
buffer is full. In flushBuffer(), first set nextChar = 0; then just create a thread for io output, such as:
new WriterThread(buffer); // inner class
                          // in constructor call run()
and in thread run method, do actually write:
public void run() {
   if (buffer.length == 0) return;
   ensureOpen(); // ensure the writer is open
   out.write(buffer, 0, buffer.length ); // write out buffer
}Is this ok?
Thanks!

Similar Messages

  • Can use the same thread safe variable in the different processes?

    Hello,
    Can  use the same thread safe variable in the different processes?  my application has a log file used to record some event, the log file will be accessed by the different process, is there any synchronous method to access the log file with CVI ?
    David

    Limiting concurrent access to shared resources can be better obtained by using locks: once created, the lock can be get by one requester at a time by calling CmtGetLock, the other being blocked in the same call until the lock is free. If you do not want to lock a process you can use CmtTryToGtLock instead.
    Don't forget to discard locks when you have finished using them or at program end.
    Alternatively you can PostDeferredCall a unique function (executed in the main thread) to write the log passing the apprpriate data to it.
    Proud to use LW/CVI from 3.1 on.
    My contributions to the Developer Zone Community
    If I have helped you, why not giving me a kudos?

  • Can we use threads in Clusters?

    Hi,
    My application is previously running on Iplanet4 webserver. We are migrating it to weblogic application server for reducing load on the application. We want to utilise the weblogic clustering concept for load balancing.
    Now when we deploy our application in weblogic we are getting below warning...
    <Web application: ServletContext(id=13686851,name=CCTS3_5May,context-path=/CCTS3_5May)
    tried to place a non-serializable attribute: ccsession into the session: C61wF726pZpozohwzPefgQaX7yaXXHOJY7S9XufjU3tWmvA09z6o!789533662!1115354608350. This attribute will be lost upon redeployment. This message is logged only once per session.>
    That is coming because one thread object is there in the CCSession class. When we are trying to serialize the object of that CCSession class we are getting warning of the above.
    And i had seen in one of the forums that "when threads are there in any web application, it is impossible to use clustering"? Is any other way is there for migrating my application to weblogic server and use the clustering concept.
    We are using weblogic especially for clustering concept only.
    Is there any solution for this problem?
    Please share your suggestions,
    Thanks in advance,
    Chandra Sekhar.

    Hi
    You can use objects that extents java.io.Serializable class ...
    Jin

  • Can we use threads in servlets

    Hi,
    can we use threads in servlets.
    cheers
    Sen

    You can also use java.io.Serializable at the end of you class
    eg:
    public class MyClass implements java.io.Serializable{

  • How can I  get System dates  with time scheduler using threads

    how can I get System dates with time scheduler using threads.is there any idea to update Date in my application along with system Date automatic updation...

    What the heck are you talking about and whatr has it to do with threads?
    Current time: System.currentTimeMillis. Date instances are not supposed to be updated.

  • Can each Thread say how much memory it wants to use ?

    Can each Thread say how much memory it wants to use ?
    or any other way to identify this ?
    namanc

    No

  • Can multiple threads write to the database?

    I am a little confused from the statement in the documentation: "Berkeley DB Data Store does not support locking, and hence does not guarantee correct behavior if more than one thread of control is updating the database at a time."
    1. Can multiple threads write to the "Simple Data Store"?
    2. Considering the sample code below which writes to the DB using 5 threads - is there a possibility of data loss?
    3. If the code will cause data loss, will adding DB_INIT_LOCK and/or DB_INIT_TXN in DBENV->open make any difference?
    #include "stdafx.h"
    #include <stdio.h>
    #include <windows.h>
    #include <db.h>
    static DB *db = NULL;
    static DB_ENV *dbEnv = NULL;
    DWORD WINAPI th_write(LPVOID lpParam)
    DBT key, data;
    char key_buff[32], data_buff[32];
    DWORD i;
    printf("thread(%s) - start\n", lpParam);
    for (i = 0; i < 200; ++i)
    memset(&key, 0, sizeof(key));
    memset(&data, 0, sizeof(data));
    sprintf(key_buff, "K:%s", lpParam);
    sprintf(data_buff, "D:%s:%8d", lpParam, i);
    key.data = key_buff;
    key.size = strlen(key_buff);
    data.data = data_buff;
    data.size = strlen(data_buff);
    db->put(db, NULL, &key, &data, 0);
    Sleep(5);
    printf("thread(%s) - End\n", lpParam);
    return 0;
    int main()
    db_env_create(&dbEnv, 0);
    dbEnv->open(dbEnv, NULL, DB_CREATE | DB_INIT_MPOOL | DB_THREAD, 0);
    db_create(&db, dbEnv, 0);
    db->open(db, NULL, "test.db", NULL, DB_BTREE, DB_CREATE, 0);
    CreateThread(NULL, 0, th_write, "A", 0, 0);
    CreateThread(NULL, 0, th_write, "B", 0, 0);
    CreateThread(NULL, 0, th_write, "B", 0, 0);
    CreateThread(NULL, 0, th_write, "C", 0, 0);
    th_write("C");
    Sleep(2000);
    }

    Here some clarification about BDB Lock and Multi threads behavior
    Question 1. Can multiple threads write to the "Simple Data Store"?
    Answer 1.
    Please Refer to http://docs.oracle.com/cd/E17076_02/html/programmer_reference/intro_products.html
    A Data Store (DS) set up
    (so not using an environment or using one, but without any of the DB_INIT_LOCK, DB_INIT_TXN, DB_INIT_LOG environment regions related flags specified
    each corresponding to the appropriate subsystem, locking, transaction, logging)
    will not guard against data corruption due to accessing the same database page and overwriting the same records, corrupting the internal structure of the database etc.
    (note that in the case of the Btree, Hash and Recno access methods we lock at the database page level, only for the Queue access method we lock at record level)
    So,
    if You want to have multiple threads in the application writing concurrently or in parallel to the same database You need to use locking (and properly handle any potential deadlocks),
    otherwise You risk corrupting the data itself or the database (its internal structure).
    Of course , If You serialize at the application level the access to the database, so that no more one threads writes to the database at a time, there will be no need for locking.
    But obviously this is likely not the behavior You want.
    Hence, You need to use either a CDS (Concurrent Data Store) or TDS (Transactional Data Store) set up.
    See the table comparing the various set ups, here: http://docs.oracle.com/cd/E17076_02/html/programmer_reference/intro_products.html
    Berkeley DB Data Store
    The Berkeley DB Data Store product is an embeddable, high-performance data store. This product supports multiple concurrent threads of control, including multiple processes and multiple threads of control within a process. However, Berkeley DB Data Store does not support locking, and hence does not guarantee correct behavior if more than one thread of control is updating the database at a time. The Berkeley DB Data Store is intended for use in read-only applications or applications which can guarantee no more than one thread of control updates the database at a time.
    Berkeley DB Concurrent Data Store
    The Berkeley DB Concurrent Data Store product adds multiple-reader, single writer capabilities to the Berkeley DB Data Store product. This product provides built-in concurrency and locking feature. Berkeley DB Concurrent Data Store is intended for applications that need support for concurrent updates to a database that is largely used for reading.
    Berkeley DB Transactional Data Store
    The Berkeley DB Transactional Data Store product adds support for transactions and database recovery. Berkeley DB Transactional Data Store is intended for applications that require industrial-strength database services, including excellent performance under high-concurrency workloads of read and write operations, the ability to commit or roll back multiple changes to the database at a single instant, and the guarantee that in the event of a catastrophic system or hardware failure, all committed database changes are preserved.
    So, clearly DS is not a solution for this case, where multiple threads need to write simultaneously to the database.
    CDS (Concurrent Data Store) provides locking features, but only for multiple-reader/single-writer scenarios. You use CDS when you specify the DB_INIT_CDB flag when opening the BDB environment: http://docs.oracle.com/cd/E17076_02/html/api_reference/C/envopen.html#envopen_DB_INIT_CDB
    TDS (Transactional Data Store) provides locking features, adds complete ACID support for transactions and offers recoverability guarantees. You use TDS when you specify the DB_INIT_TXN and DB_INIT_LOG flags when opening the environment. To have locking support, you would need to also specify the DB_INIT_LOCK flag.
    Now, since the requirement is to have multiple writers (multi-threaded writes to the database),
    then TDS would be the way to go (CDS is useful only in single-writer scenarios, when there are no needs for recoverability).
    To Summarize
    The best way to have an understanding of what set up is needed, it is to answer the following questions:
    - What is the data access scenario? Is it multiple writer threads? Will the writers access the database simultaneously?
    - Are recoverability/data durability, atomicity of operations and data isolation important for the application? http://docs.oracle.com/cd/E17076_02/html/programmer_reference/transapp_why.html
    If the answers are yes, then TDS should be used, and the environment should be opened like this:
    dbEnv->open(dbEnv, ENV_HOME, DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN | DB_INIT_LOG | DB_RECOVER | DB_THREAD, 0);
    (where ENV_HOME is the filesystem directory where the BDB environment will be created)
    Question 2. Considering the sample code below which writes to the DB using 5 threads - is there a possibility of data loss?
    Answer 2.
    Definitely yes, You can see data loss and/or data corruption.
    You can check the behavior of your testcase in the following way
    1. Run your testcase
    2.After the program exits
    run db_verify to verify the database (db_verify -o test.db).
    You will likely see db_verify complaining, unless the thread scheduler on Windows weirdly starts each thread one after the other,
    IOW no two or ore threads write to the database at the same time -- kind of serializing the writes
    Question 3. If the code will cause data loss, will adding DB_INIT_LOCK and/or DB_INIT_TXN in DBENV->open make any difference?
    Answer 3.
    In Your case the TDS should be used, and the environment should be opened like this:
    dbEnv->open(dbEnv, ENV_HOME, DB_CREATE | DB_INIT_MPOOL | DB_INIT_LOCK | DB_INIT_TXN | DB_INIT_LOG | DB_RECOVER | DB_THREAD, 0);
    (where ENV_HOME is the filesystem directory where the BDB environment will be created)
    doing this You have proper deadlock handling in place and proper transaction usage
    so
    You are protected against potential data corruption/data loss.
    see http://docs.oracle.com/cd/E17076_02/html/gsg_txn/C/BerkeleyDB-Core-C-Txn.pdf
    Multi-threaded and Multi-process Applications
    DB is designed to support multi-threaded and multi-process applications, but their usage
    means you must pay careful attention to issues of concurrency. Transactions help your
    application's concurrency by providing various levels of isolation for your threads of control. In
    addition, DB provides mechanisms that allow you to detect and respond to deadlocks.
    Isolation means that database modifications made by one transaction will not normally be
    seen by readers from another transaction until the first commits its changes. Different threads
    use different transaction handles, so this mechanism is normally used to provide isolation
    between database operations performed by different threads.
    Note that DB supports different isolation levels. For example, you can configure your
    application to see uncommitted reads, which means that one transaction can see data that
    has been modified but not yet committed by another transaction. Doing this might mean
    your transaction reads data "dirtied" by another transaction, but which subsequently might
    change before that other transaction commits its changes. On the other hand, lowering your
    isolation requirements means that your application can experience improved throughput due
    to reduced lock contention.
    For more information on concurrency, on managing isolation levels, and on deadlock
    detection, see Concurrency (page 32).

  • Using threads in a process of two or more tasks concurrently?

    Dear,
    I need to develop through a Java application in a process that allows the same process using Threads on two or more tasks can be executed concurrently. The goal is to optimize the runtime of a program.
    Then, through a program, display the behavior of a producer and two consumers at runtime!
    Below is the code and problem description.
    Could anyone help me on this issue?
    Sincerely,
    Sérgio Pitta
    The producer-consumer problem
    Known as the problem of limited buffer. The two processes share a common buffer of fixed size. One, the producer puts information into the buffer and the other the consumer to pull off.
    The problem arises when the producer wants to put a new item in the buffer, but it is already full. The solution is to put the producer to sleep and wake it up only when the consumer to remove one or more items. Likewise, if the consumer wants to remove an item from the buffer and realize that it is empty, he will sleep until the producer put something in the buffer and awake.
    To keep track of the number of items in the buffer, we need a variable, "count". If the maximum number of items that may contain the buffer is N, the producer code first checks whether the value of the variable "count" is N. If the producer sleep, otherwise, the producer adds an item and increment the variable "count".
    The consumer code is similar: first checks if the value of the variable "count" is 0. If so, go to sleep if not zero, removes an item and decreases the counter by one. Each case also tests whether the other should be agreed and, if so, awakens. The code for both producer and consumer, is shown in the code below:
    #define N 100                     / * number of posts in the buffer * /
    int count = 0,                     / * number of items in buffer * /
    void producer(void)
    int item;
    while (TRUE) {                    / * number of items in buffer * /
    produce_item item = ()           / * generates the next item * /
    if (count == N) sleep ()           / * if the buffer is full, go to sleep * /
    insert_item (item)                / * put an item in the buffer * /
    count = count + 1                / * increment the count of items in buffer * /
    if (count == 1) wakeup (consumer);      / * buffer empty? * /
    void consumer(void)
    int item;
    while (TRUE) {                    / * repeat forever * /
    if (count == 0) sleep ()           / * if the buffer is full, go to sleep * /
    remove_item item = ()           / * generates the next item * /
    count = count - 1                / * decrement a counter of items in buffer * /
    if (count == N - 1) wakeup (producer)      / * buffer empty? * /
    consume_item (item)      / * print the item * /
    To express system calls such as sleep and wakeup in C, they are shown how to call library routines. They are not part of standard C library, but presumably would be available on any system that actually have those system calls. Procedures "insert_item and remove_item" which are not shown, they register themselves on the insertion and removal of the item buffer.
    Now back to the race condition. It can occur because the variable "count" unfettered access. Could the following scenario occurs: the buffer is empty and the consumer just read the variable "count" to check if its value is 0. In that instant, the scheduler decides to stop running temporarily and the consumer starting to run the producer. The producer inserts an item in the buffer, increment the variable "count" and realizes that its value is now 1. Inferring the value of "count" was 0 and that the consumer should go to bed, the producer calls "wakeup" to wake up the consumer.
    Unfortunately, the consumer is not logically asleep, so the signal is lost to agree. The next time the consumer to run, test the value of "count" previously read by him, shall verify that the value is 0, and sleep. Sooner or later the producer fills the whole buffer and also sleep. Both sleep forever.
    The essence of the problem is that you lose sending a signal to wake up a process that (still) not sleeping. If he were not lost, everything would work. A quick solution is to modify the rules, adding context to a "bit of waiting for the signal to wake up (wakeup waiting bit)." When a signal is sent to wake up a process that is still awake, this bit is turned on. Then, when the process trying to sleep, if the bit waiting for the signal to wake up is on, it will shut down, but the process will remain awake. The bit waiting for the signal to wake up is actually a piggy bank that holds signs of waking.
    Even the bit waiting for the signal to wake the nation have saved in this simple example, it is easy to think of cases with three or more cases in which a bit of waiting for the signal to wake up is insufficient. We could do another improvisation and add a second bit of waiting for the signal to wake up or maybe eight or 32 of them, but in principle, the problem still exists.

    user12284350 wrote:
    Hi!
    Thanks for the feedback!
    I need a program to provide through an interface with the user behavior of a producer and two consumers at runtime, using Threads!So hire somebody to write one.
    Or, if what you really mean is that you need to write such a program, as part of your course work, then write one.
    You can't just dump your requirements here and expect someone to do your work for you though. If this is your assignment, then you need to do it. If you get stuck, ask a specific question about the part that's giving you trouble. "How do I write a producer/consumer program?" is not a valid question.

  • How can i change the class in the Class Library project to be static or public so i can use it from the windows application project ?

    First i know that when i make any changes to the class library project i need to rebuild the project then to remove the Capture.dll from the TestScreenshot project and then to add again the updated Capture.dll
    The problem for example in this case i'm trying to use a public static variable i add in the DXHookD3D9.
    In the DXHookD3D9 i added this public static variable:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    //using SlimDX.Direct3D9;
    using EasyHook;
    using System.Runtime.InteropServices;
    using System.IO;
    using System.Threading;
    using System.Drawing;
    using Capture.Interface;
    using SharpDX.Direct3D9;
    namespace Capture.Hook
    internal class DXHookD3D9: BaseDXHook
    public DXHookD3D9(CaptureInterface ssInterface)
    : base(ssInterface)
    LocalHook Direct3DDevice_EndSceneHook = null;
    LocalHook Direct3DDevice_ResetHook = null;
    LocalHook Direct3DDevice_PresentHook = null;
    LocalHook Direct3DDeviceEx_PresentExHook = null;
    object _lockRenderTarget = new object();
    Surface _renderTarget;
    public static decimal framesperhourtodisplay = 0;
    protected override string HookName
    get
    return "DXHookD3D9";
    List<IntPtr> id3dDeviceFunctionAddresses = new List<IntPtr>(
    framesperhourtodisplay
    The problem is i can't even get to the Capture.Hook namespace and not to the DXHookD3D9 from the TestScreenshot application window project.
    This is a screenshot:
    For example fro the FramesPerSecond class i can use it get to it from the windows forms application.
    namespace Capture.Hook
    /// <summary>
    /// Used to determine the FPS
    /// </summary>
    public class FramesPerSecond
    int _frames = 0;
    int _lastTickCount = 0;
    float _lastFrameRate = 0;
    Since it's public i guess.
    But if i will change the DXHookD3D9 class from internal to public:
    public class DXHookD3D9: BaseDXHook
    I will get error on the DXHookD3D9: 
    Error 1
    Inconsistent accessibility: base class 'Capture.Hook.BaseDXHook' is less accessible than class 'Capture.Hook.DXHookD3D9'
    And the BaseDXHook class:
    namespace Capture.Hook
    internal abstract class BaseDXHook: IDXHook
    protected readonly ClientCaptureInterfaceEventProxy InterfaceEventProxy = new ClientCaptureInterfaceEventProxy();
    public BaseDXHook(CaptureInterface ssInterface)
    this.Interface = ssInterface;
    this.Timer = new Stopwatch();
    this.Timer.Start();
    this.FPS = new FramesPerSecond();
    Interface.ScreenshotRequested += InterfaceEventProxy.ScreenshotRequestedProxyHandler;
    Interface.DisplayText += InterfaceEventProxy.DisplayTextProxyHandler;
    InterfaceEventProxy.ScreenshotRequested += new ScreenshotRequestedEvent(InterfaceEventProxy_ScreenshotRequested);
    InterfaceEventProxy.DisplayText += new DisplayTextEvent(InterfaceEventProxy_DisplayText);
    ~BaseDXHook()
    Dispose(false);
    How can i solve it so i can use the variable framesperhourtodisplay in the DXHookD3D9 class with the TestScreenshot windows forms application ?

    Hi,
    I dont know if it will work here, since I dont know the complete structure, but the base call must be public, if the derived class is public, so the base class is at least as accessible as the derived class.
    Try make the base class public. (And maybe the base-class IDXHook of the base also...)
    Or use a different approach and make only the properties public that are needed to be public by adding an extra class...
    A structure could look like:(you need to create a class thats public in your dll and expose a property, and set this property in the internal class...)
    In the Accessing class (here Form1)
    public partial class Form1 : Form
    public Form1()
    InitializeComponent();
    private void Form1_Load(object sender, EventArgs e)
    C c = new C();
    MessageBox.Show(B.F.ToString());
    and in the class Lib:
    internal class A
    public A()
    B.F = DateTime.Now.Millisecond;
    public class B
    public static int F { get; set; }
    public class C
    public C()
    A a = new A();
    (add a referenc to the class lib from the accessing project)
    Regards,
      Thorsten

  • We bought an iphone 4s for our daughter. We transfered it to straight talk. She can make calls and text no problem. She can use the WiFi but is unable to use the internet or mms. How do we update the APN?

    We bought an iphone 4s for our daughter. We transfered it to straight talk. She can make calls and text no problem. She can use the WiFi but is unable to use the internet or mms. How do we update the APN?

    To clarify for anyone who is still having any problems doing this.
    1. Unlock your phone with the carrier ( I know the process will work if it is jail broken but I am assuming you dont want to void the warranty on your phone) NOTE: even if you purchased the phone outright at Wal-Mart it is still locked to ATT so you will have to unlock the phone.  If it's already unlocked skip to step 2.  This works and will work even if you update the phone. 
    1a Here is the link to unlock a ATT iphone. Simply follow the instructions https://www.att.com/deviceunlock/client/en_US/
    2. Get a T- mobile SIM. Even if you don't want the service, if you feign interest, they will send you one for free or 99cents. If you need it now you can get one at a T-mobile store too.
    3. Once you have both your Straight talk SIM and your T-mobile SIM follow these instructions:http://www.youtube.com/watch?v=mFFf5uqk18M
    4. If you have any remaining questions look at all the responses posted previously on this thread or check out the Howard Forums Wiki: http://wiki.howardforums.com/index.php/Straight_Talk_iPhone
    Everything should work flawlessly at this point.  If not let me know and I'm happy to help when I can.  I hope this makes doing this very easy for everyone in the future. God Bless -J

  • I instAlled link gopher 1.3.2 in firefox and it wont show up on my firefox browser so i can use it

    i instAlled link gopher 1.3.2 in firefox and it wont show up on my firefox browser so i can use it. also i can not get any addons to show up. i had downthem all and i got that to to show by clicking view/toolbars/customize and dragging it to my toolbar but even that does not show up and gopher 1.3.2 does not show up in view/toolbars/cuntomize. how can i get these addons to show up?

    This is probably some corruption in the settings file that stores the on-screen position of the Firefox window. Could you try the steps in this thread: [https://support.mozilla.org/en-US/questions/980358 opens off monitor screen]. Any luck?

  • I need a timer function to ping the server every 5 secs??using threads.

    I need a timer function to ping the server every 5 secs??
    using threads...i have to use a thread coz i cant use Timer and Timer Task coz clients r on the JDK1.2 version.I have created a thread which keeps checking th ping msg & any server msg is pings 4 the1st time properly but then it just waits to read the response from server but it doesnt but the server shows that it has send the msgs to client???PLEASE HELP URGENT

    Few things are not clear from your post, like, are you using sockets and if you are, how are u reading writing to them (ur sample code would help)...
    Anyways if you are, are you doing accept on your socket in a while(true) loop or just once... If you do it only once you will get the first ping message but none afterwards if the other side closes and opens new sockets for every send... What I am suggesting is something like the following:
    ss = new ServerSocket(port);
    while(true)
         s = ss.accept();
         is = s.getInputStream();
         os = s.getOutputStream();
         reader = new BufferedReader(new InputStreamReader(is));
         writer = new BufferedWriter(new OutputStreamWriter(os));
         String in = reader.readLine();
            // do something with this string
            s.close();
            // put some check here to break out of this infinite loop
    }// end of While

  • My Old macbook pro that i bought in 2009. I have broke my screen and havent used it for a while, and now i have found out that i can use a monitor , but i have forgot my password is there any way i can make a new password? Thank you for reading this.

    My Old macbook pro that i bought in 2009. I have broke my screen and havent used it for a while, and now i have found out that i can use a monitor , but i have forgot my password is there any way i can make a new password? Thank you for reading this.

    Have you read for possible solutions over in the "More Like This" thread over here?-----------------------> 
     

  • My iPhone 5s was bought with full price in the USA from Sprint, and I was told that it is a global phone. And I can use it in china. But I can not use it in the USA, so could you mind help me to solve that problem.  I think someone of you must help me to

    My iPhone 5s was bought with full price in the USA from Sprint, and I was told that it is a global phone. And I can use it in china.
    But I can not use it in the USA, so could you mind help me to solve that problem.
    I think someone of you must help me to solve this problem !
    Details:
    SN:F2*****FDR
    <Edited by Host>

    See the response in your other thread:
    https://discussions.apple.com/message/24641427#24641427

  • Is there any possible way I can use the keyboard controls/shortcuts of Microsoft on the Mac version or PhotoShop?

    I am very used to using a PC for Photoshop and just recently changed to Mac. I tried plugging in a different but the keyboard shortcuts arent like Windows version

    shldr2thewheel wrote:
    Since you have a mac, learn how to use Photoshop for Mac and stop thinking about Windows.  Time to let go and learn how to use programs for Mac.
    This is pretty horrible advice. 95% of Photoshop works the same on Mac and PC. Almost all of the keyboard shortcuts are identical except that Ctrl becomes Command and Alt becomes Option (same key anyway). The menus are all the same.
    shldr2thewheel wrote:
    Also, when using PS on a Mac, their is no option to enable "windows keyboard mode" in OS X. I know, I have used PS on a PC and currently use it on a Mac.  You have no option but to learn how to use it on a Mac.  If you are comfortable with Windows, purchase a copy of Windows and run it in Boot Camp or a virtual machine and purchase a copy of PS for windows. Then when in Windows, I believe you can use MS shortcuts.
    This is also (mostly) incorrect advice.
    If you look in the Keyboard system preference, and you click Keyboard Shortcuts, you will find a shortcut called "Move focus to the menu bar." Once this happens, you can type ahead to menus and commands, much like the alt menu shortcuts in Windows. If you wanted to open the Duplicate command, it would be Ctrl-F2 to activate the menu bar (edit that shortcut if you don't like it), then type I and Enter to drop the Image menu, then type D and Enter to open Duplicate. If there were two D commands, you would type ahead until the letters are different. You can use the spacebar instead of Enter, and Esc does the same as Windows. I just tried all this in CS5 and it works fine. The advantage over Windows is that you do not need to memorize the alt shortcuts, because it's based on the command name you want instead of an arbitrary letter in the middle of the name.
    As jasdril said, you can simply edit the direct shortcuts too. But in most cases there should be no need to because as I said, most are the same anyway.
    In short, there is plenty of keyboard-driven flexibility there for anyone willing to adapt just a little tiny bit.
    The second advice that is not so good is recommending a Windows virtual machine. That'll slow down Photoshop, in addition to using up a lot of RAM and CPU that Photoshop really needs. The Mac version of Photoshop being native, would run at a proper speed.
    The last possibly bad decision in this thread is TTro787 deciding to take the Mac back to the store, ignoring a quarter century of history of the Mac as a well-established graphic design and photo workstation. If you don't think the Mac is going to work well for Photoshop, it isn't going to be because of the Mac... the Mac is not just for Starbucks posers. Too many smart scientists (who want to use the Unix-based OS) and competent designers use Macs.
    In short there is a whole lot of intolerance and assumed differences in this thread by both Mac and Windows zealots, which is too bad. Photoshop is mostly the same on Mac and Windows unless you're trying really hard to make it not work.

Maybe you are looking for