Running java program on 1.4.2 but has a 1.5 command

Hi,
I am programming using Java 1.5 so I used java.lang.String.contains but all my lab computers only have 1.4.2. That is the only function I am using from 1.5, is there any way to extract the code and maybe just add it as a procedure to my Java file instead? or maybe extra Java.lang.String to a jar file and include it in my project?
Thanks,
RishiD

Also, String calls native code, which you will not be able to patch. In addition, String has dependencies to other classes that may also be different in 1.5.
This is a bad idea.
sjasja is right. You need to use the 1.4.2 command until you are certain that all of your target machines are running 1.5. You can specify source and target if you have a 1.5 compiler in the lab (-source 1.4 -target 1.4) and it will compile that command, and run on 1.4.2 boxes, but you cannot compile it with a 1.4.2 compiler.
� {�                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • Running java program at windows startup

    I need to run java program at startup and then it will continue to run in its own thread.
    Any body having idea how to do that programmatically?
    Zeeshan

    This is one option but this is not feasible in my scenario as this application will be running over a network which involves hundreds of computer so is there any way to do it programatically?
    I mean if I can load java class file through an exe file then I can load my class file in the startup using C++.
    Any Suggestions.
    thanks for the help
    regards,
    Zeeshan

  • Run java program in background

    I want to run a java program in background in windowsXP...can anyone help please......can anyone suggest an easy software for running java program as windows service...i tried one but without any success

    How many of the links here have you tried while you were waiting for an answer?
    http://www.google.com/search?q=running+java+program+as+windows+service
    (Note that the query is a direct copy/paste from your post.)

  • Run java programs on computers without a SDK

    Alright. So I wrote a java program on my computer. It has the SDK with JCreator and everything. However, I want to be able to run the program on my Laptop which doesnt have the SDK. It has Java installed yes, but no SDK. How would I run the program? I got the source code but its no use. I have the compilied .class files from my main computer but I have no clue how to run them on the laptop. Do I have ot install the SDK and compile the source code or is there a way to just run the program directly?
    Thanks!

    Basically you just make certain that the manifest file has a "Main-Class" attribute, which is the name of a class that has the main() method that you want to invoke when the use double-clicks the jar. It's remarkably simple.
    I've never used JCreator, but if it's an IDE for Java it probably has a way to create these automatically. In Eclipse, you use the "Export" menu item on the "File" menu; it may be something similar in JCreator.
    Otherwise, you can use the "jar" utility that's part of the SDK. Read the docs on that. The docs also have links to the jar format and manifest files.

  • How to run java program from website?

    Hello
    I'd like to know how to run java program from my web page.
    I'd like to push some button in this web page so java program that would be on my server
    would pop-up. Can it be done automaticaly upon running this web site? (without any buttons - I just enter website and program pops up).
    Cheers

    I rather thought about RMI. But I could try servlets. So how it would look like?.
    I would make http request in browser (enter address) and program would show up in its window?. And I would not have to change anything in my program?. This program would run then on both boxes?. One remotely and one not?.
    But I would have to learn some basics, I've never worked with servlets. Could you suggest some good sites about it?. With ready examples so I could tweak them to my purpose.
    Message was edited by:
    macmacmac

  • Compile and run java programs in different directroy

    Hi,
    I often encounter many problems when I run java programs in the different directories. Like
    javac -d dir_name a.java
    java -cp dir_name a
    Something wired often happens, such as, there is not a.java file in some directory, but javac -d dir_name a.java can still work or "java -cp dir_name a" often doesn't work. Moreover, file_name.jar is also a tough problem and solving compiling problems is often time-consuming.
    So I hope to read something about how to compile and run java programs in different directory properly.
    Could you pleae give me a detailed description for that or recommend a book or website?
    Thanks a lot.

    Can you post a small amount of code that does not work, including the directory structure, and the error messages? Some one here can likely explain the problem.

  • I want to run java program on windows environment as background process

    Hi all
    I want to run java program on windows environment as background processSo command prompt return after executing java command and program on background In Linux we can do this easily �but I do not how to do this in windows
    for example look this programe
    import java.io.*;
    import java.util.*;
    public class TestClass {
         class ravi extends Thread{
              public void run(){
                   try {    
                        String target_file = "ravind.txt";
                        File targetfile = new File(target_file);
                        PrintWriter writer = new PrintWriter(new FileWriter(targetfile)) ;
                   for (int i =0 ; i < 100 ;i++ ){
                        Thread.sleep(10000);
                        writer.println(" ravindra shukla ");
              } catch (Exception e) {               
                             e.printStackTrace();
         public static void main(String[] args) {
              TestClass test1 = new TestClass();
              TestClass.ravi r1 = test1.new ravi();
              r1.start();          
    System.out.println(" return from main ");
    first i compile this
    javac TestClass.java
    then i run this by using this command
    java TestClass
    but becouse i put sleep on threads run function so it takes to much time to get return on command promt .... i want to run this programe as background process so command promt return as soon as i execute java command

    Thanks dude
    This solution �start java TestClass� works fine �. But it does not solve my problem
    It opens another black window and that black window persist till the life time of my program
    Is it possible application run on complete background without opening another black window �as in Linux

  • Can't Run Java Programs -- java.lang.NoClassDefFoundError Error

    I am running 10.4.11. For some reason I can no longer run Java programs. (I could in the past)
    For example. I create a simple Hello World program as follows and save it as Hello.java:
    class HelloWorld
    public static void main (String args[])
    System.out.println("Hello, world!");
    Then I compile it:
    Javac Hello.java
    Then I try to run it:
    java Hello
    But I get this error:
    Exception in thread "main" java.lang.NoClassDefFoundError: Hello
    I think it must be a CLASSPATH problem but normally you do not need to worry about ClassPATH. Apple sets it up for you out of the box.
    What is wrong?

    I totally forgot that the class name should be the same as the filename.
    After I renamed the file to HelloWorld.java and recompiled, I could run "java HelloWorld"
    Rob

  • Reg:Unix shellscripts running java programs

    hi,
    We are using unix shell scripts , by running that script it will execute some java programs.
    when we running shell scripts, which executes the programs it is generating some log files ie some error is occuring.
    i want to why these files are generating
    Thanks and Regards,
    Meer S.

    HI ,
    we are running the shell script which runs java programs,
    we are getting the result no problem ,
    but it is generating the unwanted ORBTRC files
    we are using websphere application server.
    we donot want these orbtrc files.
    HOW CAN WE DISABLE THE FILES
    pls guide this.
    Thanks and regards,

  • Run java program overnight

    Hey,
    I left my office yesterday evening leaving my macbook on
    while it was running a java program that it's supposed to requires between 2 and 3 hrs.
    This morning not only the program was still running (hard to believe it takes more than 12 hrs!)
    but when I typed in the shell the 'ps -all' command
    it says the program has been running for around 30 mins, and now it's still running!
    Is it possible that with certain settings the mac stops its processes after a while?
    What should I check?
    Thanks for helping, I'm actually a newbie in the mac world:)
    g

    How many of the links here have you tried while you were waiting for an answer?
    http://www.google.com/search?q=running+java+program+as+windows+service
    (Note that the query is a direct copy/paste from your post.)

  • Vim and Eclim (Java): Run Java program in embedded terminal window

    Hello all,
    I'm trying to create a decent Vim setup for Java programming. I've installed Eclim, and it works alright. However, one annoyance I have is the way that Eclim runs Java programs. When run (via the :Java command in Vim), a Java program runs in a new shell instance pretty independent from Vim, and then when the program terminates (and Enter is pressed), the output is put into a new buffer at the bottom of the Vim window with the output.
    The problem with this is that I must press Enter to go back to Vim after the program terminates, and then the output buffer is automatically selected even though I most likely do not care to copy any of the output.
    So, this is what I would like to happen:
    - I run my Java program somehow (doesn't have to be with :Java)
    - A buffer containing the running program in a shell is put on the screen (if not already there)
    - The program terminates, and the focus did not change to the output buffer
    At the very least, I want the focus to not change to the output buffer after the program is done running.
    Any ways to at least somewhat accomplish what I'm trying to  get at?

    Trent wrote:
    Yeah? I had AP CS when they first introduced the GridWorld case study. I hope you get more out of the class than I did.
    I have never used Java except for that and my first CS class at university. I eventually realized that software (as a job) wasn't for me and took a route closer to EE. I still fight to avoid being called a programmer though
    I like the idea of programming for a job, not necessarily "software development", something computer science-y sound good to me.
    But anyway, to end on an on-topic note, I embedded gvim inside Eclipse as described here.

  • Can't run java program with GUI

    My computer can run java program properly.
    However, for those program with GUI (using swing),
    my computer is unable to display the GUI.
    What's wrong with it? Is there any PATH I need to set before running GUI program?
    Thanks
    icedgold

    Cut, copy, paste then compile and run this;-import java.awt.*;
    import javax.swing.*;
    public class MyJFrame extends JFrame {
      public MyJFrame() {
          super("My first JFrame");
          Container c  = getContentPane();
          JPanel panel = new JPanel();
          panel.setBackground(Color.white);//  (new Color(255, 255, 255));
          JLabel jl = new JLabel("Yes it works");
          panel.add(jl);     
          c.add(panel);
      public static void main(String[] args) {
        MyJFrame frame = new MyJFrame();
        frame.setSize(180,120);
        frame.setLocation(200, 300);
        frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
        frame.setVisible(true);
    }

  • How to Set up the  variables and others to compile and Run Java Programs

    Hello,
    I have just downloaded the jdk1.6.0_07 and jre1.6.0_07 and installed it in C:\Program files\Java in my Windows XP ,So please tell me how to sett up the enviroment variables etc to compile and run Java Programs from Command Prompt.
    thanks

    To set the PATH permanently, add the full path of the jdk1.6.0_<version>\bin directory to the PATH variable. Typically this full path looks something like C:\Program Files\Java\jdk1.6.0_<version>\bin. Set the PATH as follows on Microsoft Windows:
    1. Click Start > Control Panel > System on Windows XP or Start > Settings > Control Panel > System on Windows 2000.
    2. Click Advanced > Environment Variables.
    3. Add the location of bin folder of JDK installation for PATH in User Variables and System Variables. A typical value for PATH is:
    C:\Program Files\Java\jdk1.6.0_<version>\bin

  • Hw do  u run java programs in xcode 4?

    hw do  u run java programs in xcode 4?
    pls tell the detailed steps fr running a java program

    Here is a document dated 2009: Introduction to Jar Bundler User Guide - Apple Developer
    ...I don't think JB is included now.

  • How to run java program on clients system when system strats

    hi
    I want to run java program on clients computer automatically when system boots up. plzzzzz help me .......

    You can add the call to the java program to the auto start group (under windows).
    You can't start a client program when the server starts, if that is what you mean.
    Timo

Maybe you are looking for

  • Change font in iMovie 10.0.7??

    I'm pretty new to iMovie and I am trying to change the font/font color in iMovie 10.0.7. I am using the Epic Drama trailer and cannot figure out how to do it! Help!

  • Configure BPEL 10.1.2.0.2 with JDeveloper 10.1.2.1

    I use JDeveloper version 10.1.2.1. Is there a way to configure BPEL 10.1.2.0.2 with it, as a plug-in? Because otherwise, I must use an JDeveloper version that comes with BPEL and another one for my other applications (configure CVS, take care about p

  • Streaming audio cutoff

    When using a new 8Gb ipod touch running the latest version of the operating system [3.1.2(7D11)] , the following problem arises: When the ipod touch is receiving streaming audio via WiFi, the reception stops after approximately 30 minutes. That probl

  • XFi Fatality - possible fault. Screeches and p

    Hi, I have a Fatality Pro which most of the time works well, but at random times (can be during games or just whilst using windows) starts to screech and whistle. It sounds like a radio being tuned in. This is under Vista Ultimate with all updates ap

  • Pl/sql questions

    can anyone provide me exact answers for the questions below.....I urgently require them 4 my exams.....my email is [email protected] ques1 what is Index organized tables ? ques2 what are enforced & deferred Constraints? ques3 what are SQL*plus develo