Running multiple java apps simultaneously, using different versions of jre.

I have a situation where I have 3 or 4 applications (and one applet) that were built over time, each with a different version of the jdk (ranging from 1.2.2.005 to 1.3.2). I need to know of a way (and it must exist) to run each of these applications on the same machine, and at runtime, have each application (or applet) run with its respective version of the jre. Certainly, one could change some source code and make all programs compatible with a particular jre, but that doesn't solve my problem if a new app is built with a new version of the jdk down the road. Currently, each runs fine by themselves, but if I try to run them together as different processes, some won't do anything because the default jre may not be what it needs. Would the Java Plug-in software have a role to play in this? Is there a way to specify (link) which application should use which jre?
P.S. These applications (right now) don't have to interact or interface in any way. I just need to have them all running as separate processes on the same machine and be able to jump from one to the other.

Write a batch file that sets the environment properly and restores it afterwards, here is a sample batch file we use which switches to IBM's JRE to run an app:
OLDPATH=$PATH
PATH=$PATH:"/usr/local/java/IBMJava2-13/jre/bin"
OLDCP=$CLASSPATH
CLASSPATH="/usr/local/java/IBMJava2-13/jre/lib/rt.jar:."
OLDHOME=$JAVA_HOME
JAVA_HOME="/usr/local/java/IBMJava2-13/jre"
# put the command to execute your program here
java -jar app.jar
PATH=$OLDPATH
CLASSPATH=$CLASSPATH
JAVA_HOME=$JAVA_HOME
This is for Linux, but it should be possible to write one for Windows too.

Similar Messages

  • Running multiple java apps simultaneously, each using a different jre.

    I have a situation where I have 3 or 4 applications (and one applet) that were built over time, each with a different version of the jdk (ranging from 1.2.2.005 to 1.3.2). I need to know of a way (and it must exist) to run each of these applications on the same machine, and at runtime, have each application (or applet) run with its respective version of the jre. Certainly, one could change some source code and make all programs compatible with a particular jre, but that doesn't solve my problem if a new app is built with a new version of the jdk down the road. Currently, each runs fine by themselves, but if I try to run them together as different processes, some won't do anything because the default jre may not be what it needs. Would the Java Plug-in software have a role to play in this? Is there a way to specify (link) which application should use which jre?
    P.S. These applications (right now) don't have to interact or interface in any way. I just need to have them all running as separate processes on the same machine and be able to jump from one to the other.

    However ... if you have the programs running in Java1.x, I
    wouldn't recommend to let it run under Java 1.y; atleast
    not without thorough testing.I do it all the time and have not had a problem. I'm
    currently using JDK 1.4 beta 3 and I regularly run a
    Java application written with JDK 1.1.
    It sounds like the programs you are running are
    relying on behavior that is not guaranteed. If that
    behavior changes in a later version, it can break your
    program. Program to the contracts provided by other
    classes and packages, and you should have few or no
    problems.I guess you are right. Maybe you can help me with the following problem (this is off this topic, I know): I have Swing JDK 1.2 and Swing from JDK 1.3. I have to register keys on components.
    In JDK 1.2 I can use registerKeyBoardAction, in JDK 1.3 I have to use input maps and action maps. Both solutions only work with certain JDK. What I did was writing code which detects the java version and takes the appropriate action to register the keys. To make the thing compile in 1.2, I have to use reflection for the input/action map methods, because they are only available in 1.3.
    Any idea how to solve this more elegantly ?

  • Running multiple IE sessions each using different version of RE

    I understand that it is being said that multiple versions of the JRE can be run in different browser sessions. However, multiple versions cannot be run in the same browser session. I have 2 web applications one uses 1.3.1_04 and the other 1.4.2_10. How can I get two sessions for both appl running simultaniously without having IE problems? Right now the only way I am able to manage from one appl to the other is as follow: I can login to the one appl successfully, then have to logoff and shut down all IE windows, restart a new IE session and login to the other appl. Right now it appears that once I login to one appl, the JRE is loaded to IE, and then shared in all windows and subsequent sessions untill I shut all exisiting IE windows down. The problem is encountered irrespect of how I start a new session: I usually go from one appl to the other through clicking on my favorites, but I have also tried holding shift down when clicking on other favorite, clicked on IE shortcut while other IE window is open to open a new session..but it seems only way IE clears itself is to completely start IE fresh over again so then IE will know which required JRE to load.
    Unchecking Reuse Windows for Launching Shortcuts partly resolved the issue.
    Message was edited by:
    hfm2chase

    I hope this helps.
    http://forum.java.sun.com/thread.jspa?threadID=722556&messageID=4261109

  • How do I run multiple java apps in one JVM to reduce memory use?

    Hi all,
    I saw an article either on the web or in a magazine not too long ago about how to "detect" if the app is already running, and if so, it hands off the new instance to the already running JVM, which then creates a thread to run the Java app in. As it turns out, my app will be used in an ASP environment, through Citrix. We may have as many as 50 to 100 users running the same app, each with their own unique user ID, but all using the same one server to run it on. Each instance eats up 25MB of memory right now. So the question is if anybody knows of a URL or an app like this that can handle the process of running the same (or even different Java) apps in one JVM as separate threads, instead of requring several instances of the JVM to run? I know this article presented a fully working example, and I believe I know enough to do it but I wanted ot use the article as a reference to make sure it is done right. I know that each app basically would use the same one "launcher" program that would on first launch "listen" to a port, as well as send a message through the port to see if an existing launcher was running. If it does, it hands off the Java app to be run to the existing luancher application and shuts down the 2nd launching app. By using this method, the JVM eats up its normal memory, but each Java app only consumes its necessary memory as well and doesn't use up more JVM instance memory.
    Thanks.

    <pre>
    import java.util.Properties;
    import java.io.FileInputStream;
    import java.io.IOException;
    import java.lang.reflect.Method;
    import java.lang.reflect.InvocationTargetException;
    import java.util.Enumeration;
    import java.util.NoSuchElementException;
    public class RunProg implements Runnable, Cloneable
    private String iProg;
    private String iArgs[];
    public static void main(String args[])
    new RunProg().main();
    // first step is to start main program itself
    private void main()
    Properties properties = System.getProperties();
    try
    properties.load(new FileInputStream("RunProg.properties"));
    catch(IOException e)
    System.setProperties(properties);
    int i = 0;
    System.out.println("enter main, activeCount=" + Thread.activeCount());
    while(true)
    String program = properties.getProperty("Prog" + i);
    if(program == null)
    break;
    StringTokenizer st = new StringTokenizer(program);
    String[] args = new String[st.countTokens() - 1];
    try
    RunProg rp = (RunProg)this.clone();
    rp.iProg = st.nextToken();
    for(int j = 0; st.hasMoreTokens(); j++)
         args[j] = st.nextToken();
    rp.iArgs = args;
    Thread th = new Thread(rp);
    th.setName("prog" + i + "=" + program);
    th.start();
    System.out.println("prog" + i + "=" + program + ", started");
    catch(CloneNotSupportedException e)
    System.out.println("prog" + i + "=" + program + ", can't start");
    i++;
         System.out.println("end of main, activeCount=" + Thread.activeCount());
    // next step is to start all others one by one
    public void run()
    try
    Class c = Class.forName(iProg);
    Class p[] = new Class[1];
    p[0] = String[].class;
    Method m = c.getMethod("main", p);
    Object o[] = new Object[1];
    o[0] = iArgs;
    m.invoke(null, o);
    catch(ClassNotFoundException e)
    System.out.println(iProg + "ClassNotFoundException");
    catch(NoSuchMethodException e)
    System.out.println(iProg + "NoSuchMethodException");
    catch(InvocationTargetException e)
    System.out.println(iProg + "NoSuchMethodException");
    catch(IllegalAccessException e)
    System.out.println(iProg + "NoSuchMethodException");
    System.out.println(Thread.currentThread().getName() + ", ended");
    System.out.println("exit run, activeCount=" + Thread.activeCount());
    // setup SecurityManager to disable method System.exit()
    public RunProg()
         SecurityManager sm = new mySecurityManager();
         System.setSecurityManager(sm);
    // inner-class to disable method System.exit()
    protected class mySecurityManager extends SecurityManager
         public void checkExit(int status)
              super.checkExit(status);
              Thread.currentThread().stop();
              throw new SecurityException();
    * inner-class to analyze StringTokenizer. This class is enhanced to check double Quotation marks
    protected class StringTokenizer implements Enumeration
    private int currentPosition;
    private int maxPosition;
    private String str;
    private String delimiters;
    private boolean retTokens;
    * Constructs a string tokenizer for the specified string. All
    * characters in the <code>delim</code> argument are the delimiters
    * for separating tokens.
    * <p>
    * If the <code>returnTokens</code> flag is <code>true</code>, then
    * the delimiter characters are also returned as tokens. Each
    * delimiter is returned as a string of length one. If the flag is
    * <code>false</code>, the delimiter characters are skipped and only
    * serve as separators between tokens.
    * @param str a string to be parsed.
    * @param delim the delimiters.
    * @param returnTokens flag indicating whether to return the delimiters
    * as tokens.
    public StringTokenizer(String str, String delim, boolean returnTokens)
    currentPosition = 0;
    this.str = str;
    maxPosition = str.length();
    delimiters = delim;
    retTokens = returnTokens;
    * Constructs a string tokenizer for the specified string. The
    * characters in the <code>delim</code> argument are the delimiters
    * for separating tokens. Delimiter characters themselves will not
    * be treated as tokens.
    * @param str a string to be parsed.
    * @param delim the delimiters.
    public StringTokenizer(String str, String delim)
    this(str, delim, false);
    * Constructs a string tokenizer for the specified string. The
    * tokenizer uses the default delimiter set, which is
    * <code>"&#92;t&#92;n&#92;r&#92;f"</code>: the space character, the tab
    * character, the newline character, the carriage-return character,
    * and the form-feed character. Delimiter characters themselves will
    * not be treated as tokens.
    * @param str a string to be parsed.
    public StringTokenizer(String str)
    this(str, " \t\n\r\f", false);
    * Skips delimiters.
    protected void skipDelimiters()
    while(!retTokens &&
    (currentPosition < maxPosition) &&
    (delimiters.indexOf(str.charAt(currentPosition)) >= 0))
    currentPosition++;
    * Tests if there are more tokens available from this tokenizer's string.
    * If this method returns <tt>true</tt>, then a subsequent call to
    * <tt>nextToken</tt> with no argument will successfully return a token.
    * @return <code>true</code> if and only if there is at least one token
    * in the string after the current position; <code>false</code>
    * otherwise.
    public boolean hasMoreTokens()
    skipDelimiters();
    return(currentPosition < maxPosition);
    * Returns the next token from this string tokenizer.
    * @return the next token from this string tokenizer.
    * @exception NoSuchElementException if there are no more tokens in this
    * tokenizer's string.
    public String nextToken()
    skipDelimiters();
    if(currentPosition >= maxPosition)
    throw new NoSuchElementException();
    int start = currentPosition;
    boolean inQuotation = false;
    while((currentPosition < maxPosition) &&
    (delimiters.indexOf(str.charAt(currentPosition)) < 0 || inQuotation))
    if(str.charAt(currentPosition) == '"')
    inQuotation = !inQuotation;
    currentPosition++;
    if(retTokens && (start == currentPosition) &&
    (delimiters.indexOf(str.charAt(currentPosition)) >= 0))
    currentPosition++;
    String s = str.substring(start, currentPosition);
    if(s.charAt(0) == '"')
    s = s.substring(1);
    if(s.charAt(s.length() - 1) == '"')
    s = s.substring(0, s.length() - 1);
    return s;
    * Returns the next token in this string tokenizer's string. First,
    * the set of characters considered to be delimiters by this
    * <tt>StringTokenizer</tt> object is changed to be the characters in
    * the string <tt>delim</tt>. Then the next token in the string
    * after the current position is returned. The current position is
    * advanced beyond the recognized token. The new delimiter set
    * remains the default after this call.
    * @param delim the new delimiters.
    * @return the next token, after switching to the new delimiter set.
    * @exception NoSuchElementException if there are no more tokens in this
    * tokenizer's string.
    public String nextToken(String delim)
    delimiters = delim;
    return nextToken();
    * Returns the same value as the <code>hasMoreTokens</code>
    * method. It exists so that this class can implement the
    * <code>Enumeration</code> interface.
    * @return <code>true</code> if there are more tokens;
    * <code>false</code> otherwise.
    * @see java.util.Enumeration
    * @see java.util.StringTokenizer#hasMoreTokens()
    public boolean hasMoreElements()
    return hasMoreTokens();
    * Returns the same value as the <code>nextToken</code> method,
    * except that its declared return value is <code>Object</code> rather than
    * <code>String</code>. It exists so that this class can implement the
    * <code>Enumeration</code> interface.
    * @return the next token in the string.
    * @exception NoSuchElementException if there are no more tokens in this
    * tokenizer's string.
    * @see java.util.Enumeration
    * @see java.util.StringTokenizer#nextToken()
    public Object nextElement()
    return nextToken();
    * Calculates the number of times that this tokenizer's
    * <code>nextToken</code> method can be called before it generates an
    * exception. The current position is not advanced.
    * @return the number of tokens remaining in the string using the current
    * delimiter set.
    * @see java.util.StringTokenizer#nextToken()
    public int countTokens()
    int count = 0;
    int currpos = currentPosition;
    while(currpos < maxPosition)
    * This is just skipDelimiters(); but it does not affect
    * currentPosition.
    while(!retTokens &&
    (currpos < maxPosition) &&
    (delimiters.indexOf(str.charAt(currpos)) >= 0))
    currpos++;
    if(currpos >= maxPosition)
    break;
    int start = currpos;
    boolean inQuotation = false;
    while((currpos < maxPosition) &&
    (delimiters.indexOf(str.charAt(currpos)) < 0 || inQuotation))
    if(str.charAt(currpos) == '"')
    inQuotation = !inQuotation;
    currpos++;
    if(retTokens && (start == currpos) &&
    (delimiters.indexOf(str.charAt(currpos)) >= 0))
    currpos++;
    count++;
    return count;
    </pre>
    RunProg.properties like this:
    Prog1=GetEnv 47838 837489 892374 839274
    Prog0=GetEnv "djkfds dfkljsd" dsklfj

  • How to run multiple java files concurrently using command line?

    Hi,
    I have to write a script to run multiple java files and c files concurrently. Say, A and C are java files and B is another binary executable file, I have to make sure they are run in the order A-B-C, then I was trying to run by using
    java A & ./B & java C
    But it turned out that B could run before A started... Is there any way that I can ensure that A runs before B, and B runs before C by using the command line?
    Thanks a lot.

    GKY wrote:
    Sorry, I didn't make my question clear enough...
    A has to give some output files that B needs to get started,Then B can start at any time--even before A--and just wait for those files to be written. For instance, A could write to a temp file, then rename it to the real name. However, if there are multiple files, and they all have to exist, even this won't necessarily work. There are other approaches that will though.
    although writing the output takes very short time,Depends on when the OS decides to give A CPU time, what else is going on on that disk controller and/or network, etc.
    B could still run before A finishes the writing, As it can if you sleep for 1, or 10, or 1,000,000 seconds before starting B.
    if B can't find the info it wants, it fails to move on. That's why I need to make sure A starts before B.No, you need to make sure A's data is there before B tries to use that data.
    Edited by: jverd on Jul 29, 2008 1:06 PM

  • Running multiple java-apps in single JVM?

    We have about 125 Citrix clients running on 5 Citrix Servers. We are investigating a new very big development project which will cover about 10 main projects with 15 Applications each. The complete project will be written in Java.
    Basically, each module will have it's own JVM. BUt, when each client runs a couple of modules, the servers will surely run out of memory...
    I searched for way's to run different modules within 1 single JVM but it seems to be 'not done', because of 'System.exit()', 'Static Variable' probs to name only 2.
    Any idea's on how to implement this?
    thanks.

    thanks for the reply.
    Yes, I assume the server will run out of memory.
    1) Our citrix servers are consuming about 3/4th of their 4Gb memory capacity without any java_application running.
    2) Each of our 5 Citrix servers has 25 users active
    3) Each JVM takes about 20mb memory
    4) Each user will run at least 3 app's simultaneously
    Abouve results in 3*20=60Mb / user * 25= 1,5Gb memory extra needed.
    Can you give me an example of a Thread.sleep(60000) test_pgm?
    and/or an example for a "classloader" program to launch each app in its ow sandbox (in same JVM)?
    (eventually a link to get more info on this)
    thanks

  • Running a Java App on 2 different machines

    Hello all
    I have a very interesting java application that gathers information and saves it to a database.
    To scale the application, I would like to run it on 2 different computers. I have a 400MHz W2K desktop and a 800Mhz W2k laptop.
    They will have to share the 2 static vectors. -- to ensure they are not doing/repeating the same work
    how would you guys approach this
    how would you approach this
    stephen

    Thanks 3 questions.
    1. RMI seems to be a quick way to go -- could someone give me an example of how that would work -- if i know just the 2 ip address of the box ? I'm also under the impression i would have to set permission for that kind of access to the computers.
    2. What does JSD stand for and how would it work ?
    3. How would the JMS solution work ?
    4. What is the maximum information I can store in javanamespaces -- i might have to loop through 1 million objects in a vector and make decisions based on that.
    stev

  • Is it possible to run two different version of jre simultanously ?

    My client is using two diffrent application those supports two different versions of jre(1.2 & 1.4). If he uses jre1.2 only one application works ,and if he uses jre1.4 then the other works but the 1st shows error messege And vice versa.
    Is there any solution to shortout this issue?

    Is it possible to run two different version of jre simultanously ?Yes. In different processes, of course.

  • 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 to make a shortcut to run my Java app in Windows?

    Hiya, Coders :-)
    I am an absolute beginner.
    I have copied a little window program from "Java 2 in easy steps".
    I run it from the command line and a little window pops up.
    I cannot find a way to start the app without the command prompt.
    How can I make a shortcut to start it?
    Julian (-_-)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    Hiya, Coders ;-)
    As it happens, I have a game from UJ Software: "Shisen for Java".
    It has a shortcut, of course.
    Here are all its details just in case it helps ...
    The game folder is here:
    C:\Program Files\UJ Software\Shisen for Java\jShisen.jar
    Contents of the installed shortcut ...
    General:
    Type of file: Shortcut
    Opens with: Java(TM) Platform SE binary
    Location: C:\Documents and Settings\Julian Bury\Start Menu\Games
    Shortcut:
    Target Type: Executable Jar File
    Target location: Shisen for Java
    Target: "C:\Program Files\UJ Software\Shisen for Java\jShisen.jar"
    Start in: "C:\Program Files\UJ Software\Shisen for Java\"
    Run: Normal window
    I don't suppose this will help.
    It strikes me that nobody knows for certain how to run a java app!
    I have two beginner's books, neither of which mentions anything beyond the command prompt.
    Tricks to minimize the console window are just not professional!
    The solution must be written authoritatively somewhere ...
    has anyone seen it, please?
    Increasingly disturbed ...
    Julian *(-_-)*                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How can I handle deploying multiple test systems on the same PC that have been developed using different versions of LabVIEW, TestStand, and/or Switch Executive?

    The major issue here is that the test systems must be documented and validated before being released to the production floor. Given this if a test station has multiple test systems deployed on it that have been developed on various versions of LV, TS, and Switch exec how can I force the test system selected to use the correct versions of TS, LV, and Switch exec.? I understand that the solution would be to recomplie everything and bring them up to the latest version but that would then require re-validation according to the QA department. Any advice would be greatly appreciated.
    It would be nice if theTS deployment was more like an LV executable... meaning when a LV executable is launched it always knows what LV runtime engine to use when there are multiple engines installed on a PC.

    Hi,
    Multiply versions of teststand can reside on the same system, but only one version can run at a time. They is a utility that has to be run to set the active version.
    The SequenceFiles have a version number, and you will find an error will be generate if you try to Load the sequencefile in the wrong version of TestStand.
    The labview VIs will only work providing the correct version of the RTE is also installed on your system, even a labview executabe requires the correct RTE to be installed, either as part of the executable installation or as a seperate installation, before the labview exe will work correctly.
    I'm not fimilar with the Switch exec but I would expect that it will also require the correct lower level device drivers to be available for the version you are using.
    Therefore, as you are indicating that some of your system are at  a older version, its difficult to image how you could achive this, considering if you say you have different versions of the software(s). For a start, you may have the problem that newer code/ sequencefiles using additional functionatily not available in the older versions.
    I would think your only solution would  be to have different deployments covering the different versions you have, or at least bring all your test systems up to the same version of teststand.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • Ok to use different versions of java?

    Hello,
    I installed jdk1.4.2_05 a while ago. I have since downloaded a jar file that requires java 5. Would it be ok to download and install this latest version and still have 1.4.02_05 running also?i,e, is it ok to have run different versions of java on the one machine. Would there be any conflicts etc?

    It's quite common to have multiple versions of Java on the same machine. Obviously you shouldn't install them in the same folder structure though.
    /j2sdk1.4.2_03 - contains version 1.4.2_03
    /j2sdkblah.blah - contains version blah.blah

  • Compiling multiple java files present in different packages simultaneously

    Hi,
    I have multiple java files which are present in different folders.
    In some cases, files are importing classes from other packages i.e. some kind of inter-dependency
    How do I compile these java files simultaneously?
    Any help would be highly appreciated.

    Pawan_Anand wrote:
    Hi,
    I have multiple java files which are present in different folders.
    In some cases, files are importing classes from other packages i.e. some kind of inter-dependency
    How do I compile these java files simultaneously?
    Is it circular?
    Thus the dependency is A => B => C => A?

  • Problem running my Java apps in my LG phone. Please help!

    Hi all!!
    I am quite new to the world of J2me, altough I've been coding Java for quite a few years now.
    Recently I bought a LG u 8120 phone with Java-support so I decided it was time to step into the mobile Java-world.
    Now I have written my first small app, a simple timer application which my phone (strangely enough) does not already have.
    So what happens is this : I create my app on my PC and package it with the WTK into a jar -file and a jad-file which i transfer to the phone.
    After this I can see the name of my app in the list of available programs in the phone. But when I try to run it: Nothing. The Java logo shows up for a few seconds and then I am tossed back to the menu.
    I have thought of the following as possible problems:
    1. the 8120 does not support MIDP2.0
    2. I am doing something wrong transfering the files
    3. I have missed out on one or several necessary steps in the process
    Anyone who have developed Java apps for LG phones who can give me some hints?
    I've used the Sun J2ME Wireless Toolkit 2.2 with MIDP2.0 and CLDC1.1 .
    The apps works fine in the emulator. The problem starts when I want to run it in the phone. The phone I've tried is an LG u8120. LG apparently does not want to make life easy for its customers, so there is no support for transfering Java apps in the vendor-supplied software. I suppose that's because they want you to only download stuff from their site. However, after surfing around on some discussion forums for a while I found a program called G-thing which can be used to upload Java apps to LG-phones via USB.
    Any help is very appreciated!
    Thanks,
    Sarah

    Thanks,
    I have tried this and ruled out some of the possible causes.
    When I added some more exception handling, I could see that a "java.lang.IllegalArguenException" is thrown.
    When I ran the AudioDemo package that came with WTK2.2 I noticed that the examples that uses WAV-files do not work while the rest works fine.
    My new theory is now that the u8120 does not support the WAV-format, so I will try with an mp3 instead and see what happens.
    Anyone who knows if LG-phones support WAV-format?
    /Sarah

  • Upgraded Java, CF still using older version - how?

    This server is Win2008 fully patched, IIS 7.0 in good shape - CF 9.0  no patches installed - which we obviously want to fix. When we tried to install patches, we got this:
    To try and resolve this, our first mistake was installing Java version 8 (1.8) - which we-now-know doesn't work with 9.0.  What I'm not following is why CF settings reports still using 1.6. From what I've read and can see in java.config, it's storing/accessing its own JRE in CF directories. 2 questions: 1) How can I access the security settings for this JRE so I can get patches installed 2) If not possible, am I right in thinking we have to uninstall 8, reinstall the server version of 6 (1.6), point CF at the server version of Java so we can change the security settings (with restarts at the proper places) so we can start getting security patches installed? Any alterations to those steps?
    Once I get to patch 4 we'll be upgrading to Java 7 - does CF 9.01 fully patched work with Java 1.8? I see Java 7 is due to expire April 2015.

    Coldfusion uses its own version of java by default. You can, however, change this to use the version installed on the server when you download it off of the internet. Here is a blog post about this process - How to change/upgrade JDK version of ColdFusion server — Adobe ColdFusion Blog.
    Note as well just because a new version of Java is installed doesnt mean that the old version is gone. Major java revisions dont upgrade, like .NET it just installs the different version. Sometimes when you install Java 7 or 8 it will leave the old legacy versions which the browser will still try and use. Usually, after the Java install is done, it asks if you want to remove the outdated versions. You can use the official Java uninstall tool to scan for old versions and remove them for you - Java Uninstall Tool
    Coldfusion 9 wont support anything higher then Java 7. Java 8 has only just been made available to the most recent version of Coldfusion in the last 6 months or so. Like Java 7 soon, Coldfusion 9 is end of life and support for it stopped last year.
    Finally, you don't need Java to update CF9. Java is used for the browse dialogues to find the files. If you have already downloaded the hotfix jars, just copy and paste the path & file name in to the Update File box and click Submit Changes. This will do the same thing and install the hotfix.

Maybe you are looking for

  • Creating XML files in a userfriendly program?

    Hello Forum I am creating a simple application that runs of data in an extenal XML file. The client has not enough money to create a database and the php middleware to facilitate the XML file creation so I am trying to look into a way for him to crea

  • Scrollable Result Set in Oracle 8.1.6 ?

    The Oracle8i Release 2 New Features Summary says:: JDBC 2.0 core support plus connection pooling and distributed transactions. My Question is : 8.1.6 provide full JDBC 2.0 Support or just some features not specified? Is there support for an scrollabl

  • Styling Rules, can anyone explain to me why this will not work?

    I am creating a Custom Theme, for some reason Mapviewer generates the first two rules of this and then ignore the last two rules. It does not matter if the 2nd rules is any of the last 3, it will generate the markers associates with the query, but af

  • File saving in DB. Please, help!!!!!!!!

    Hello, I need your help very very much. My data base is Oracle 9i. I'd like to save file as Blob in the table of the data base. What I have to do?

  • Rearranging Photos in a clump

    I'm making a stop motion film. I just recently imprted 200 photos. The photos were place on the end of the timeline. I'm trying to put them in a different place on the timeine. Can I highlight them all and do this. The only way I have been able to do