Will my java app run on winXP win 2000 ?

or do they need to first install the jvm ?

Java platform runs on any operating system. Install JVM and you are done
http://www.skillipedia.com

Similar Messages

  • What path to use to access network files from Java app running on Mac

    I have a Java app running on a Mac with OS X that I'm using to check for files that exists on Windows servers within our network.
    Using a path like /Volumes/<Share>/ works because I've already connected to the drive using Finder. If I try to use a fully qualify the path with "smb://<Server>/<Share>" then my app doesn't see anything. Is there any way that I can get Java to connect to a directory without first having mapped or made the connection via some external tool like Finder?
    Here's the code I'm testing with:
    package FileImports;
    import java.io.File;
    import java.util.Arrays;
    public class Dir {
    static int indentLevel = -1;
    static void listPath(File path) {
    File files[];
    indentLevel++;
    files = path.listFiles();
    if (!(files == null)){
    Arrays.sort(files);
    for (int i = 0, n = files.length; i < n; i++) {
    for (int indent = 0; indent < indentLevel; indent++) {
    System.out.print(" ");
    System.out.println(files.toString());
    if (files[i].isDirectory()) {
    listPath(files[i]);
    indentLevel--;
    } else System.out.println("Directory not accessible!");
    public static void main(String args[]) {
    // this path works where <share> = the directory where my files exist.
    listPath(new File("/Volumes/<share>"));
    // this path returns a null result in files
    // listPath(new File("smb://<Server>/<Share>/"));
    Thanks,
    Alex
    Edited by: agates on Sep 25, 2008 11:14 AM

    agates wrote:
    Thanks for the response. I'll have to dig a little deeper into JCIFS. It looks like it would work great windows to windows. I haven't been able to find in the documentation where it would work on OS X without having to mount the targeted file system first. Has anyone had success creating a connection to a windows file system from OS X with JCIFS?Since jCIFS is written in pure Java and implements the entire SMB/CIFS protocoll on it's own it doesn't require any support from the OS (apart from a normal JVM runnig). Thus it should work exactly the same in OS X and Windows (and Linux and Solaris and ...).

  • Multiple Java apps running in one VM

    I have one VM that runs one application with GUI, database. It also spawns another VM to run more apps through Sockets.
    Is there a way to run several Java apps within a single VM? If so, I can get rid of those interprocess communication stuff and make things easier.
    Thanks in advance.
    Lee

    Yes you can do what to want to do. It is actually very benificail. Take a look at this article:
    http://java.sun.com/docs/books/performance/1st_edition/html/JPClassLoading.fm.html#24732
    here is code to do it as well:
    package com.ist.system;
    import com.ist.util.LogMsg;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.lang.reflect.Method;
    import java.net.InetAddress;
    import java.net.Socket;
    * This class was pulled from:
    * http://java.sun.com/docs/books/performance/1st_edition/html/JPClassLoading.fm.html#24732
    * It was written to provide the ability to launch many applications in the
    * same JVM.  By doing this, it will save on system resources like RAM.  When
    * the <code>launch</code> method is called, it will check to see if there is a
    * VM already running.  If there is, it will launch the new application in the
    * currently running VM.  If there isn't, it will create a process that will
    * keep a VM alive until there are no more applications running.  Once there are
    * no more applications running, this service will System.exit. 
    public class Launcher {
        static final int socketPort = 9876;
         * This method will launch a new instance of the passed in className
         * in an already running JVM if one is already running.  If one is not
         * running, this application will create one.
         * @param className the class which you wish to launch
        public void launch(String className) {
            LogMsg.shortDebug("Trying to launch: " + className);
            Socket s = findService();
            if (s != null) {
                LogMsg.shortDebug("Launcher found service");
                try {
                    OutputStream oStream = s.getOutputStream();
                    byte[] bytes = className.getBytes();
                    oStream.write(bytes.length);
                    oStream.write(bytes);
                    oStream.close();
                    LogMsg.shortDebug(className);
                } catch (IOException e) {
                    LogMsg.warn("Launcher couldn't talk to service");
            } else {
                LogMsg.event("Starting new service");
                Launcher.go(className);
                Thread listener = new ListenerThread();
                listener.start();
                LogMsg.shortDebug("Started service listener");
        protected Socket findService() {
            try {
                Socket s = new Socket(InetAddress.getLocalHost(),
                socketPort);
                return s;
            } catch (IOException e) {
                // couldn't find a service provider
                return null;
        public static synchronized void go(final String className) {
            LogMsg.shortDebug("Launcher running a " + className);
            Thread thread = new Thread() {
                public void run() {
                    try {
                        Class clazz = Class.forName(className);
                        Class[] argsTypes = {String[].class};
                        Object[] args = {new String[0]};
                        Method method = clazz.getMethod("main", argsTypes);
                        method.invoke(clazz, args);
                    } catch (Exception e) {
                        LogMsg.shortDebug("Launcher coudn't run the " + className);
            }; // end thread sub-class
            thread.start();
            runningPrograms++;
        static int runningPrograms = 0;
         * All programs wishing to exit should call this method and NOT
         * use System.exit.  Calling System.exit will kill all the applications
         * running in this VM.
        public static synchronized void programQuit() {
            runningPrograms--;
            if (runningPrograms <= 0) {
                System.exit(0);
        public static void main(String[] args) {
            LogMsg.setupTraceLevel();
            Launcher l = new Launcher();
            l.launch(args[0]);
    }

  • How I can get current path during a java app running?

    I want to know the running path of the java app is running.
    do me a favor

    Syestm.getProperty(String Key)
    The requires key somethig like "path", or "user.path", not sure. See Javadoc to find the key you need.
    Abraham

  • Proper way to exit with a j2ee java app running in the NW70 j2ee engine

    Hello,
    I am working on migrating an app and it's ear from j2ee 6.20 to 7.0. It deploys okay, but when invoked, the j2ee server restarts. Looking at the part that fails, its trying to create a jco connection, which fails and then it catches the failure and does a stack dump and a System.exit(1). It shuts down and restarts at that point. Is System.exit(1) the proper way to exit a java app that is running within the j2ee engine? If it is, is it possible I am picking up the wrong System.exit and need to use an SAP specific one? I inherited the code, but not the IDE it was written with.
    Thanks,
    Paul D. Chamberlain

    Hi,
    Answered my own question. System.exit(1) should not be used. Return works.
    Paul D. Chamberlain

  • Java app running on Mac OS X

    Hi to all.
    I'm trying to change the name that the dock shows when my java app is running. I have read all this , but the problem that I have is that I want to do it into my code and not from the terminal line.
    I want to do this, from my code.
    -Xdock:name="JUnit on Mac OS X"Anyone knows how to do it?
    Thanks for read.

    Hi to all again.
    I have searched the solution of this problem into other forums and sites and I think that is a very difficult question. Perhaps this forum it's not the better forum to ask this, exists any forum specialized in Java for Mac OS users?
    Edited by: Daniel.GB on 15-ago-2008 15:01

  • Configuration for a java app running on Harpertown.

    HI,
    I have a multi-threaded java app with 5-8 user threads. I'm running my application on intel Harpertown m/c with 8 cores.
    Is there a way I could configure my JVM such that I can I can allocate each core to each thread or atleast maximize such a possibility?
    Thanks,

    Please let me know in case my query is misdirected. I'm new to the forums and thought this would be the right place to post this.
    Thanks,

  • Can't run projector on Win 2000

    Hi,
    Does anyone know why I get a message about my projector not
    being a valid
    Win32 application when I try to run in Windows 2000? I'm
    using Director MX
    2004.
    I think I heard about some fix, but can't remember it.
    Thanks,
    Brian

    Hi.
    Strange. The fact that you can't run as an Windows service tells me something may be
    wrong with your os. Is it possible to try a different windows machine? This is not a
    known issue - noone else is reporting this.
    Michael
    Aubrey wrote:
    When I attempt to open WebLogic Console for default server running on WIN 2000
    Prof i get the following Application Error dialog box and a "blank" command shell
    screen:
    beaexec2.exe - Application Error
    The instruction at "0x004001ec" referenced memory at "0x00000004". The memory
    could not be "written."
    I was able to run console in the past no problem. I am running WLS 6.1 (sp1)
    WIN 2000 Prof on a laptop with 512MB RAM. I am not sure where the memory conflict
    is occuring.
    Also, I am no longer able to have WLS start as an NT service. I can only start
    it from the command line (or WLS icon in program group).
    Anyone help me out? I've already uninstalled, re-installed several times to get
    past this, without any luck!
    Thanks!--
    Developer Relations Engineer
    BEA Support

  • Java3d speed collapse caused by other java apps running at the same time

    Hi
    I am programming a flightsimulator for some months.
    The current state is online available (all free, no copyrights)
    at http://www.snowraver.org/efcn/efcnsim/index.htm
    especially the sample (source) which shows the
    behaviour which is the reason for my post is here
    http://www.snowraver.org/efcn/efcnsim/page2.htm
    My Problem:
    When I start the sim while two other java programs
    ( one is a server running localhost, one is a client )
    are running, the speed of the flightsim is very slow,
    one frame update takes 3 to 5 seconds.
    ( 3 java.exe's in task list plus 1 which is the IDE )
    When I start the flightsim ALONE, I have 30 to 40 frames per second.
    ( 2 java.exe's in the task list = the flightsim and the IDE -> no prob here )
    That means, the flightsim is about 100 times slower, when
    started while the other two apps are running.
    BUT the other two applications do almost ***NOTHING***, the
    CPU load is 1 or 2 percent.
    Of course they have threads running, but all are waiting
    for a signal - no thread really consumes CPU power.
    Interestingly, when I FIRST start the flightsim and AFTER THIS
    start the two other applications, the flightsim
    holds 30 frames per seconds without problems, even
    though the other applications consume some CPU power
    until they have completely started up.
    Configurations:
    JSDK 1.4.2_1 , 0_2..
    Java3D 1.3.1 OPENGL (The DirectX version crashes with D3D device lost)
    Win2000,XP CPU 800MHz upto 3 GHz
    In my point of view, the java3d thread scheduler makes
    some funny decisions when it starts up, which lead
    to the order dependent behaviour described above.
    My question is, if anyone has some ideas, how I could
    get away from this speed collapse.
    The problem is caused in native code I guess.
    I also could imagine, that it has to do something with
    the order in which one creates, attaches and starts
    the Canvas3D. (? could produce race conditions)
    The flightsim runs in full retained mode. Of course
    the CPU work in the behaviours is rather big, because
    the ROAM triangulation update (..) is done there
    and the triangles are recalculated and passed
    ( all BY_REFERENCE ).
    Or could it have to do something with the memory
    consumption ( when all runs, almost all of
    the 512MB RAM is taken by the three java.exe's ) ?
    Any hints or ideas ?

    :) No, Sun does handle it [lol]
    I just have tested it on my computer at work
    ( 3GHz HP compaq, 1GB Ram and a Intel 82865G Graphics
    Card with 64MB memory, Windows XP )
    and it has worked without problems any way I tried.
    ( Except for xclusive fullscreen mode, but I guess, the administrators
    have deactivated it somehow, so we don't play games at work :)
    I couldn't test it under Linux so far, but I think, this will be less
    problematic than Windows [usually].
    However my current assumption is:
    I totally have forgot the [limited] videocard memory.
    I suppose, Java3D tries to put all triangle data and all
    textures to the videocards memory, so most data processing
    then can be passed to it's graphiccard CPU using
    OpenGL commands.
    Now the flightsim produces a varying amount of (by_reference) triangle data ( a few thousands )
    and has some texture maps for the terrain, the sea and other things,
    plus indexed triangle data for the planes and ships.
    The notebook system, which slows down has an ATI Mobile Radeon card
    with only 32MB RAM onboard, whereas the others have 64MB Ram.
    An additional pointer to that theory is that I can trigger the slowdown by resizing
    the flightsim window, while it is running.
    On the notebook, it holds 30fps, until the window exceeds a size of 962*862 pixels.
    At this size the speed collapses and goes down to 1 frame update every 4 seconds.
    If I make the window a few pixels smaller, the speed of 30fps immediately
    is there again.
    Therefore I guess, some data passed to the graphic cards memory depends
    linearly from the canvas3d's window dimension, and at some limit,
    the graphiccard's memory is too small and Java3D changes it's strategy
    and performs most calculations on the computer's mainmemory,
    which of course is a lot slower.
    I'm not very sure about that, I'm just speculating.
    Next thing I will try is to disable directdraw for the other two applications,
    possibly swing also uses graphicscard memory, when directdraw is enabled.
    The solution seems to be clear anyway: The flightsim must examine the system
    and set some parameters depending on the machine's capabilities.
    Onboard videagraphic ram is one of them. If it's too slow, I start to decrease
    the window size and expect to see a sudden increase of speed, as soon as
    the rendering can be done by the graphicscard CPU. If this never happens,
    I assume no OpenGL accelerator is present on that system. This can be seen as a method
    for finding out the amount of videocard memory on a system by trial and error ..?:)
    Thanks for your tips, Alain.
    I especially have to check out the data sharing class in 1.5.

  • Can a Java app run in the background?

    I want to put an app on a server that runs at a certain time of day (probably something like midnight, not sure yet) that just performs a task without any notifications. Is Java suitable for this task?

    You are looking more to run as a service in windows or a damon in Unix. Do a google on "java windows service" and see what comes up. Last I checked there was a JNI structure given to use and step by steps on how to get what you want to happen.

  • Will �cross platform app� run on one platform?

    Hi there,
    please forgive my stupidity but if I have a J2ME app which contains one function calling functions from Blackberry library. Can this app be installed and run ok on non Blackberry phones, such as Nokia (suppose that Blackberry related code will not be called under this non-Blackberry phone), within Nokia emulator environment, or real Nokia phones?
    It would be much appreciated if someone could shed some light here so that my time and effort to try it out could be saved.
    Many thanks in advance,
    qmei from London

    Here, let me actually be helpfull...
    It depends on the phone.
    To be able to use the exact same app in multiple devices, when some are calling device specific code is possible, but it really does depend on a few factors...
    1) You must not ever reference or instantiate any classes that import the device specific libraries. If any such classes are referenced directly in your application, the offending class will be loaded into memory, at which point the device's VM will notice that it's trying to reference a library that it doesn't recognize, and likely crash out.
    2) You must only load such offending classes by name, and even then, there must only reference offending classes through an interface. So if you have a canvas class that imports nokia libraries, as well as other canvas classes that import other manufacturer libraries, you must make them all implement the same interface, and do something like this...
    try{
    Class cls = Class.forName("com.nokia.mid.ui.FullCanvas");
    cls = Class.forName("NokiaGameScreen");
    Object o = (cls.newInstance());
    gameScreen = (GameScreen)o;
    gameScreen.init(this);
    }catch(Exception e){
    //cant' use nokia!
    //try another manufacturer...
    }... so I'll explain in greater detail...
    1) Class cls = Class.forName("com.nokia.mid.ui.FullCanvas");This line with throw an exception if no class matches the supplied argument. Generally you'd do something like this to check for the existance of one of the classes you intend to import. If this line does not throw an Exception, than instantiating the desired display should be fine. In this case, if we don't throws an Exception, we can be sure that we are running on a Nokia device.
    2) cls = Class.forName("NokiaGameScreen");This line actually grabbs the class you intend to instantiate, which contains the offending import. Only when we reach this point does the VM load the class into memory, and validate it's imports. We have already determined that we are running on a Nokia device from the previous line.
    3) Object o = (cls.newInstance()); Get an instance of the desired class.
    4) gameScreen = (GameScreen)o;gameScreen is of the type 'GameScreen', which is an interface I defined and is implemented by all of my different manufacturer/device specific Canvas's.
    5) gameScreen.init(this);I am simply calling the 'public void init(Midlet)' function I created that is exposed through my 'GameScreen' interface.
    As you can see in the above example, I never directly reference the 'NokiaGameScreen' class, and instead indirectly reference it through an interface it's implementing called 'GameScreen'.
    This type of 'cross platform' coding works well on many, but not all devices. It's a headache, but some devices go through the entire .jar file and validate each and every .class file during the installation process. These annoying phones will cancel the install if they find any imports that are not recognized. So even if the class is simply accidentally left in the .jar, with no possible way to ever load or instantiate it, the device may decide it won't let you run or install.
    Because of the problem devices, I always create a separate build for each manufacturer, and exclude the other manufacturer's classes from the build entirely.
    Message was edited by:
    hooble

  • Will Creative Cloud apps run on a laptop with an Intel Celeron N2820 processor?

    I need to know if my Creative Cloud apps, specifically Photoshop, Illustrator and Dreamweaver, will run on a laptop with these specs:
    Intel® Celeron® processor N2820
    Features a 1MB cache and up to 2.39GHz processor speed.
    4GB DDR3L memory
    For multitasking power, expandable to 8GB.
    Battery Type6-cell lithium-ion
    Display TypeHigh-definition widescreen LED-backlit TFT with TruBrite technology (1366 x 768)
    Screen Size (Measured Diagonally)15.6"
    Cache Memory1MB
    System Memory (RAM)4GB
    System Memory (RAM) Expandable To8GB
    Type of Memory (RAM)DDR3L
    Hard Drive TypeSATA (5400 rpm)
    Computer Hard Drive Size500GB
    Optical DriveDouble-layer DVD±RW/CD-RW
    Optical Drive SpeedsDrive speeds not specified
    Direct-Disc LabelingNo
    Digital Media Reader or SlotsYes, digital media card reader
    GraphicsIntel® HD

    Yes, it supports all the necessary features, it just won't be particularly speedy or smooth in resource-hungry programs like PS.
    Mylenium

  • Java App running as a service in background needs to display a GUI message

    Its a client server application. Where in the application runs as a service. When the database connections is lost, it logs the information in the log files that application will retry after sometime. What i need is instead of logging the information, i want to pop-up a message box stating the same log message.
    Now i have tried few things:
    1) while running it as a service, i go the service's properties -> logon tab-> select "allow service to interact desktop"
    This solves my problem and displays the message. But i don't want my user to see the ugly black console all the time.
    Let me know if anyone can give me a better solution to the same.

    Hi,
    Please provide more details....
    Now i have tried few things:
    1) while running it as a service, i go the service's properties -> logon tab-> >>select "allow service to interact desktop"Do you use any third party tools or what?
    This solves my problem and displays the message. But i don't want my user to see the ugly black console all the time. If you have developed it yourself then what is the problem?
    You can change it right??? And what is black console you are talking about?? Command line??
    Thank You.
    Regards,
    Jay

  • Shutting off java after faulty java code runs in WinXP

    I would like to know how to shut java off after a webpage with faulty java code is loaded. Ever since the version of Java that introduced "jsched" into the mix, I've had problems with Java on every computer and every install of windows I've had and worked with. If a webpage has faulty code in it, instead of crashing Firefox/Mozilla like the older versions did (in which I could simply reload the browser after it crashes), it makes Firefox inoperable (disabling most of the menu items and making the mouse scroller not work), and continues to run even after Firefox is no longer running. To make matters worse, Java was programmed in such a way that makes it a process that cannot be seen in the task manager. Java's ability to hide its running process quite frankly makes me nervous.
    I'm thankful that the latest version fixed a lot of bugs--the version before this would give me a blue screen of death every time I tried to access the control panel.
    I would like to know how to turn off java once it's running. The only documentation I have been able to find was in relation to a shell in Linux which uses commands that don't work in Windows.

    How do I shut off Java once it is loaded when I'm on a page that doens't have any errors? If I go to a page that requires java, and Java gets loaded, it doesn't automatically quit when I go to another page. Why does Java need to continue running when it's no longer being used? Why should I have to quit and reload Firefox in order to quit Java?
    It would be nice if there was something in Java to shut itself off when it encounters an error instead of requiring a windows restart in order to quit Java since it isn't a separate process, and also something that shuts off Java when there is no longer a webpage in memory that requires Java.

  • Will xfinity mobile app run on a tablet

    I just bought a Digiland Microsoft Tablet. I can't open my comcast e-mail. I can get onto the comcast mail but when I try to open the e-mail, it won't allow me. Would the xfinity mobile app work on my tablet?

    rpgirard wrote:
    I just bought a Digiland Microsoft Tablet. I can't open my comcast e-mail. I can get onto the comcast mail but when I try to open the e-mail, it won't allow me. Would the xfinity mobile app work on my tablet?   I think you'll need to use the browser to log into your Xfinity account and then you'll   be able to watch that way. Good luck!

Maybe you are looking for