Certain application's JVM instance

Hello,
I didn't really know in what section to post this thread, so I figured this was the best one. If it is in the wrong section, notify me, and I will post it in the correct section.
I am making an application in C which requires getting the process ID of a specific JVM instance. The problem isn't getting the process ID, but it's differentiating a VM instance from another. How would I go upon doing this?
Thanks

Wow! Can't get much easier than that :)
Thanks alot!
EDIT: The application I am trying to get runs as an applet. So unfortunately, every applet prints: sun.plugin2.main.client.PluginMain
Any ideas?

Similar Messages

  • How to Shutdown JVM Instance

    I have a java program which I start(run) from console, the program acts as a listener so it never exits, however I want to be able to it shutdown by running a batch file or running a script which is basically in another console window, any ideas how can I shutdown a JVM instance from another console window.
    *Note: Pressing <Ctrl+C> in the application console is not an option.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Maybe have a socket listener on a certain tcpip port.
    Then send a message to that tcpip port... one which your original app will interpret as a "shutdown" signal.....
    regards,
    Owen

  • Multiple JVM instances

    Dear all,
    I am trying to create multiple JVM instances using createJavaVM(...) but I can't do it. When I try to create the second instance, the function returns an error.
    Does anybody know about getting multiple JVM instances running??
    Thanks in advance,

    Hallo,
    createJavaVM(...) trys to create a JVM in your current
    process, so I am not surprised that you get an error
    the second time round, because there is already a JVM
    in the process. If you want multiple JVMs, each needs
    to be in its own process.
    Why do you want to create more than one JVM in your
    process? The JVM is multithreadable, and you can start
    more than one thread in the JVM. Would that do what
    you want?I need multiple instances because my application needs nearly 2Gb of memory and the maximum heap I get is 1700 Mb. I think with multiple instances, I'll get it.
    Do you know about getting a bigger heap??
    >
    David Singleton
    [email protected]

  • Deploy one Application per OC4J instance or multiple

    Hello,
    I have the following questions on deploying applications on OC4J:
    1. What is the best practice for deploying applications on OC4J?
    2. Should I deploy only One application per OC4J Instance or multiple applications per OC4J Instance.
    3. If I decide to deploy more then one application on one OC4J Instance, for this OC4J Instance, should I increase default_island property to add the number of processes within an OC4J Instance
    Thanks,
    Manish

    You really should read the 9iAS Performance and Tuning Guide. There is no specific recommendation. It is
    highly dependent on your specific applications.
    You can deploy more than one application per OC4J instance and if you have a high performance machine you will probably want to run more than one JVM per OC4J
    instance. If you are running applications which create sessions and replicate state across JVM's then
    you may want to create multiple islands to limit the scope of replication.

  • Single JVM instance

    Is there any way to control number of JVM instances running on system. I would like some of my applikations to run in single JVM, or to have only one JVM on system which would run all of java applications?
    Milan

    I am currently trying out running programs within a single JVMs... There are many things you have to take care of�especially when using swing applications...
    Example: If you use static objects in some classes (or you use classes with static variables from the JDK) you have to use different classloaders for each program run within your JVM. This is nessessary as each program needs to have it's very own static object, but this makes the memory reduction worthless as the loaded classes are the main reason for memory consumption. (Some kind of Shareable interface, implemented by all classes not using static members would help in my opinion. But it is Sun's turn to introduce that in the JDK.)
    2nd Example: You have to be very careful to really stop a program within the JVM when it is shut down. This means to interrupt all threads (which are not part of one threadgroup, as f.e. swing and rmi use their own threadgroups), remove all Timer-Events from existing SwingTimers (or java.util.Timers), disposing all windows, and so on...
    So it is very hard to really produce a stable application when using only one JVM...

  • Strange Display Errors with certain Applications (ATI X1600) [SOLVED]

    Hi everyone!
    I have been using Arch now for a year or so and am very happy with it, but now there is a problem I unfortunately can't solve by my own.
    Since a month or so certain applications (like emacs, feh or gimp, if i try to manipulate the drawing surface) cause very strange display errors. When I try to take a screenshot, they can't be seen, so i made to photographs
    Image 1 (one instance of emacs under awesome-wm): http://img850.imageshack.us/img850/5186 … 112158.jpg
    Image 2 (two instances of emacs under awesome-wm): http://img24.imageshack.us/img24/822/im … 112158.jpg
    I already tried another display manager (musca) but there the same applications cause the same type of error.
    Maybe the version 6.14.0-1 of xf86-video-ati broke my system, but I don't know.
    Has anyone had similar problems or probably a solution?
    Thanks in advance
    Maak
    P.S.: I hope this is the right forum for this topic.
    Files:
    /var/log/Xorg.0.log          https://pastee.org/q3nn2
    Output of lspci                 https://pastee.org/db7n8
    UPDATE:
    Hi everyone, again!
    I just successfully downgraded the driver and the errors are gone
    If someone has the same errors, here is the PKGBUILD (taken from SVN; only the version numbers and sha1sums are modified)
    pkgname=xf86-video-ati
    pkgver=6.13.2
    pkgrel=1
    pkgdesc="X.org ati video driver"
    arch=(i686 x86_64)
    url="http://xorg.freedesktop.org/"
    license=('custom')
    depends=(libpciaccess libdrm udev pixman ati-dri)
    makedepends=('xorg-server-devel' 'libdrm' 'xf86driproto' 'mesa')
    conflicts=('xorg-server<1.9.0')
    groups=('xorg-drivers' 'xorg')
    options=('!libtool')
    source=(${url}/releases/individual/driver/${pkgname}-${pkgver}.tar.bz2)
    sha1sums=('f9d379a884a833829ab1942de4ad4f4766cdcd46')
    build() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    ./configure --prefix=/usr --enable-dri
    make
    package() {
    cd "${srcdir}/${pkgname}-${pkgver}"
    make "DESTDIR=${pkgdir}" install
    install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
    install -m644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/"
    Last edited by Maak (2011-03-11 23:32:46)

    http://bbs.archlinux.org/viewtopic.php?id=89926

  • Create new JVM instances

    My question is about JVM instances. How do you create additional instances and how do you make sure that you are using the same instance? For example, if I execute an app like so
    java StartDeamonhow can I make sure that when I execute a second app that it is running in the same JVM so that it interacts with the first app?
    java StopDeamonAnd vice versa, how could I make sure that an app such as this one runs in a separate JVM so that it doesn't affect the processes in the previous JVM?
    java KillAllDaemonsInThisJVMInstanceDoes that make sense?

    would you mind elaborating on that? what options are
    there for a custom solution? How do others do it if
    not in Java? If I execute a second program, does it
    automatically get put in the same JVM instance of the
    first program? I'm assuming it does.No. In windows, for example, when you run a Java program you are really starting a new instance of java.exe. There is nothing built in for it to know to use an existing instance.
    Do additional
    JVM instances get created automatically? If so, what
    is the criteria?Always using a new instance is the MO. If you want some other behavior you need to implement it yourself.
    It's not easy. Even if you find an existing instance of the JVM, you need someway of sending it a message telling it to run your main method. Also, how will you be sure that the JVM is one created by your application and not some other application that won't appreciate your application crashing it's private party?
    Do a search on these forums and you will find a bunch of solutions (many of which are probably unusable.)
    Off the top of my head, you could use memory mapped files to mark whether your application is running. If a second instance is started, send a message to a port that will tell the first instance to create a second instance of your app (assuming there is only one application.)
    Is the application a GUI or non-visual?

  • Multiple JVM instances and host computer performance

    Hi,
    I was wondering if anyone has any facts or sources about how running multiple JVM instances impacts the performance of the hosting computer ?
    For example, say you have a long running server process that creates a JVM, how is the performance of the computer impacted if there are five of those processes running, versus ten versus ...
    This is a very "it depends" question, but I would like to get an idea of the baseline performance impact that comes with running a JVM, and if there is anyone here that has experience running multiple JVMs I'd appreciate any feedback, whether it's "don't do it, ever" or "no problem!"
    Thanks

    My only experience with multiple VMs is when I have several Java GUI apps (eclipse, jedit, dbvisualizer) plus tomcat and maybe an ant running on XP.
    I don't think that the existence of multiple VMs is in and of itself a problems, but JVMs do tend to be fairly memory hungry, so if you don't have a lot of RAM, you may find yourself crawling along as swapping heats up.
    I think that later versions of the Windows VM have started to take advantage of sharing certain core libraries, or pieces of them, so that you don't have as big an incremental memory footprint for additional VMs. I don't know which versions or how much this actually reduces the foot print of second and subsequent VMs though.

  • Detecting another JVM instance

    I have developed a Java desktop application that works fine if there is only one instance of it running. When a second instance of it is opened, problems occur. Is there any way to detect that another instance of an application (or JVM) is currently running? If I could detect this, I could display a message informing the use that they already have an instance running and to close one of them...
    Any guidance here would be greatly appreciated.

    Traditionally done
    -with a ServerSocket bound to a specific port
    -with a lock file (on *nix often with the pid).                                                                                                                                                                                                                                                           

  • How come I can't use the back gesture in certain apps with my magic mouse on certain applications in Lion OS?

    How come I can't use the back gesture with my magic mouse on certain applications in Lion? I figured out that in Safari i have to use a 1 finger swipe to go back a page instead of 2 fingers like i used to do in Snow Leopard. But apps like iTunes and iPhoto and i can't do that. Any ideas? is there a setting im missing to make this work? It works in Safari but not any other applications, so im assuming theres no setting for this. Just want to know if this is just a bug that will be fixed in the next update or if its something I can fix now. Any help would be appreciated because its kind of annoying. Other than this minor issue I love Lion. Full screen apps are unbelievable.

    Hi.
    I managed to compile open-vm-tools and the kernel module against 3.14.5 kernel.  Here is the tarball with the all the files.
    I still have an issue : With vmware-player 6.0.2, I can't acces my shared folder :
    root@P146S011b ~ # lsmod | grep hgfs
    vmhgfs 41622 0
    vmw_vmci 47960 2 vmw_vsock_vmci_transport,vmhgfs
    root@P146S011b ~ # vmware-hgfsclient
    R
    D
    C
    root@P146S011b ~ # mount -t vmhgfs .host:/R /mnt
    Could not add entry to mtab, continuing
    root@P146S011b ~ # tail -1 /etc/mtab
    .host:/R /mnt vmhgfs rw,relatime 0 0
    root@P146S011b ~ # cd /mnt
    cd:cd:6: not a directory: /mnt
    1 root@P146S011b ~ #
    Forgot to add an install file with a depmod -a inside. You will have to run it by yourself

  • Why doesn't my macbook pro let me update certain applications? It says "You have updates available for other accountsTo update this application, sign in to the account you used to purchase it.

    Why doesn't my macbook pro let me update certain applications? It says "You have updates available for other accountsTo update this application, sign in to the account you used to purchase it.

    it's also likely that you used two different apple IDs to purchase apps. if that's the case then you simply have to log out of your app store, and log into the other account to update the apps.
    from experience it's not possible to syncronise purchased content from two different accounts. but you can always give Apple a call.

  • HT201250 Assume I back-up my computer using Time Machine and then decide to uninstall a certain application.  If I later decide that I'd prefer to have that uninstalled application, can I simply restore it from back-up, or must I go through install proces

    Assume I back-up my computer using Time Machine and then decide to uninstall a certain application.  If I later decide that I'd prefer to have that uninstalled application on my computer, can I simply restore it from my back-up, or must I go through the entire install process again?

    Nobody can help? :(

  • Creative Cloud Desktop fails to download certain applications.

    So basically what happens is I am able to click the button, and the progress bar appears, but it doesn't progress past 0%, and no 'X' button appears next to it. If I quit during this period, Creative Cloud Desktop doesn't load up again, and I'm forced to restart.
    So far this has happened only with certain applications. Premiere Pro (which I managed to install after a lot of tries) and just now SpeedGrade. Please help!

    Nevermind. I set the program rules on my firewall from Auto to Allow and that worked.

  • Certain applications overwork my macbook and the fan goes crazy. Is there a fix or solution for this?

    I purchased a 13.3" MacBook Pro in February of 2010. About a month later, I began to notice that certain applications that don't require much, Safari, MSWord, iTunes, were causing the fans to kick in at crazy speeds and the base of the computer was too hot to touch. Is there a patch or fiz for this, or should I return my macbook for a new?

    try an SMC reset: http://support.apple.com/kb/ht3964

  • Keep getting error code 10657 when I try to open certain applications?

    Hi! I keep getting an error code when I try to open certain applications, such as iTunes or Adobe PhotoShop... it reads error 10657?

    See this archived discussion: https://discussions.apple.com/message/7005768?messageID=7005768
    Bob

Maybe you are looking for

  • Network Preferences pane gone mad

    Hi All, After I ran an ISP supplied software CD my Network Preferences pane just went mad. Every time I open the pane immediately a window drops down carrying the message "Your Network Settings has been changed by another application" I click "OK' bu

  • Need help with DECODE function

    Hello, I am trying to use default within the decode function and every time I get a missing expression. I have searched everywhere and cant figure out what I'm doing wrong. Thanks select decode (request_id,0,'No files found', DEFAULT)

  • Modify Sort Parameters Programmatically

    Hello     I have a Crystal Report 2008 created with the Group Sort in the report saved to "No Sort". I have a VB.Net windows form application that reads an input file that contains several report parameters including sort options for this report. I n

  • Passing parameter spage id and portal language to a report portlet

    Hi, how can I pass the page id and portal language to a report portlet so I can filter my query according to that page id and language. See the report query below: select <information required> from ana_statistics where portal_page = :page_parameter

  • Mail is not recognizing password

    I have more than one email account. Periodically one or the other will for no apparent reason refuse to recognize the password or a message will pop up that says the sever can't be found. Does anyone have the same experience or know where to find a f