JGRASP issues when compiling Java programs

I installed both the JRE and the SDK newest versions and it still gives me issues.
----jGRASP exec: javac -g C:\UNCC\ITCS 2215\Program Assignment 2\WordFind.java
----jGRASP wedge2 error: command "javac" not found.
---- This command must be in the current working directory
---- or on the current PATH to use this function.
---- PATH is ";D:\WINDOWS\system32;D:\WINDOWS\system32;D:\WINDOWS;D:\WINDOWS\System32\Wbem;D:\Program Files\QuickTime\QTSystem\;d:\Program Files\Microsoft SQL Server\90\Tools\binn\;D:\Program Files\Common Files\Autodesk Shared\;D:\Program Files\backburner 2\;D:\Program Files\Common Files\Adobe\AGL".
---- Make sure you have the full JDK (J2SE SDK or other), not just the JRE, installed.
---- The J2SE SDK is available from java.sun.com.
----jGRASP: operation complete.
I have the full development kit installed. One side note. My computer reinstalled windows as my D drive instead of my as my C drive. ((all programs etc install to
D instead of C.
That was the old issue. I changed the paths for it to find the Java software but now I get issues recognizing the Scanner() class.
EX below:
----jGRASP exec: javac -g C:\UNCC\ITCS 2215\Program Assignment 2\WordFind.java
WordFind.java:13: cannot resolve symbol
symbol : class Scanner
location: package util
import java.util.Scanner; // Needed for Scanner class
^
WordFind.java:33: cannot resolve symbol
symbol : class Scanner
location: class WordFind
          Scanner keyboard = new Scanner(System.in);
^
WordFind.java:33: cannot resolve symbol
symbol : class Scanner
location: class WordFind
          Scanner keyboard = new Scanner(System.in);
^
3 errors
----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.
-KSW
I have the right software installed version 1.5.0_15 SDK AND JRE

i am having this identical problem on my computer
i am required to use this program for my school work yet i am unable to
you should try the jgrasp startup settings application
i installed both the j2SDK and the j2RE files and i am still unable to get it to work properly
help please anyone?

Similar Messages

  • Mass processing - Error when processing Java programs / VMC out of memory

    When running a mass update background process that updates the status of a service order in CRM the job fails due to error 'Error when processing Java programs'. I checked the VMC (SM52) and noticed that there is an error about the VMC running out of memory.
    The background program can either be a PPF Action or a Z-ABAP program that performs the update. Both programs are performing a CRM_ORDER_INITIALIZE but it seems that the VMC is not releasing the memory fast enough.
    Is there anyway we can force the VMC to release the memory after processing of each individual order?
    Thanks!

    I got  similar issue and it got resolved by useing CRM_ORDER_INITILAIZE. Initalization should happen after every Order processing and see that only one header guid is passed to the the FM. May not be good option ,but just try by putting wait for 5secs after CRM_ORDER_INITILAIZE.

  • HELP for Compile java programe !

    Hello All,
    i want to make java programe by which i can compile java programes
    and when i compile java programe from my programe then
    i shoul get compiled status means programe compile successfuly
    or not compile.
    if any example i m thanksfull.
    onlyforjava.

    how about if compile fail?
    the process obj seems return value 0 as it run successful.
    I haven't try this, but I have experienced the process obj returns 0 if the executed command has some routine to handle error cases, in which, error will not halt the system.
    So, I recommand the following scenario.
    1. let say, if your java is test.java. check the existence of file test.class.
    If, it exists, get its modified time.
    2. compile the java code with
    Procress p = Runtime.exec(new String[]{"javac", "test.java"});
    3. get the error string if any.
    InputStream in = new BufferedInputStream(p.getInputStream());int read;while ((read = in.read()) != -1){  System.out.println((char)read);}
    4. handle error with the exitValue
    if (p.exitValue() != 0){  System.out.println("warning.");}
    5. check again the file test.class if it is a newly created file.
    6. if it is newly created, compile success. Else, failed.

  • Error occurred when processing Java Programs in VM Container

    Hi Gurus,
    We are trying for an extraction from 0CRM_SALES_ORDER_I in CRM 5.0. This is frequently getting terminated and we are getting an error message saying that “Error occurred when processing Java Programs in VM Container”. We have checked in SM52 and the VM container is active.
    We have tried in two systems, CRQ and CRP. In CRQ, we are not facing any problem but with CRP we are facing the the above said error. The EXIT_SAPLRSAP_001 is the FM that is used to fetch Transactional Data. This FM is NOT called in CRP System for this extractor. Can anyone guide us in this issue?

    Savan - did you resolve your error? We are getting the same error, and would like to know how you solved it.
    Thanks,
    Erik

  • How to compile java programs in j2EE 1.4 SDK

    hi,
    i HAVE JUST INSTALLED NEW J2EE 1.4 SDK , IT HAS BEED INSTALLED SUCCESFULLY BUT I AM UNABLE TO COMPILE JAVA PROGRAMS WHICH I USED TO RUN IN SDK 1.4 ,OR EVEN NEW WRITTEN EXAMPLES. CAN ANYONE PLZ HELP ME.

    J2EE by itself is not capable of compiling Java. It requires that a J2SDK be installed first - this is what compiles and runs Java programs. Did you install the combination J2SDK and J2EE, or just the J2EE?
    If both are installed, then you should be able to compile and run as you used to..

  • Compiling Java Program thro EXEC

    hi..
    I want to compile java programs programatically. I am using exec for that. The problem is there is a error in the i am no getting any message from that Process .will u help me how to solve this
    URGENT
    pyari
    Code Snippet
              try
                                  String command = "cmd /c javac -classpath c:\\j2ee\\home\\ejb.jar -d "+
                                  "c:\\javapr~1\\WeblogicEJBComplier\\tempBuild "+
                                  "C:\\j2ee\\home\\demo\\ejb\\cart\\CartClient.java";
         System.out.println(command);
         Runtime rnt = Runtime.getRuntime();
                                  Process prs = rnt.exec(command);
                                  BufferedReader bfr = new BufferedReader(new InputStreamReader(prs.getInputStream()));
                                  String str = bfr.readLine();
                                  System.out.println(str);
                                  while(str!=null)
                                       System.out.println(str) ;
                                       str = bfr.readLine();
              }catch(Exception eo)
                   System.err.println(eo);

    javac writes the errors in stderr, not in stdout.
    So replace getInputStream() with getErrorStream()...

  • Exception when running a compiled java program in DOS

    I'm new to programming in general and java in specific. I am using the jGrasp programming software, and successfully compile my program, but when I try to run it out of DOS (which I undesrtand is the purpose of java to begin with, unless I'm mistaken), I get an exception that looks exactly like this.....
    Exception in thread "main" java.lang.NoClassDefFoundError: keyboard/java
    Caused by: java.lang.ClassNotFoundException: keyboard.java
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClassInternal(Unknown Source)
    I realize I may just be missing something simple, as I've not been in the class for very long, but the book doesn't seem to have the answer. It is "Starting out with Java: Early Objects, Third Edition, by Tony Gaddis. Any help will be apprecieated. The program is below, it's really short.
    The program is a simple one to teach myself scanner input and an 'if' statement:
    *     basic input program
    import java.util.Scanner;
    public class keyboard
         public static void main(String[] args)
              String Class;
              int age;
              String race;
              char sex;
              String gender;
              Scanner keyboard = new Scanner(System.in);
              System.out.print("What class do you wish to be? ");
              Class = keyboard.nextLine();
              System.out.print("How old is your character? ");
              age = keyboard.nextInt();
              keyboard.nextLine();
              System.out.print("What sex is your character? M/F? ");
              gender = keyboard.nextLine();
              sex = gender.charAt(0);
              System.out.print("What race is your character? ");
              race = keyboard.nextLine();
              if (sex == 'M')
                   System.out.println("Today you will be playing a " + race + " " + Class +
                                                           " who is " + age + " years old at the start " +
                                                           "of his adventuring career!");
              if (sex == 'F')
                   System.out.println("Today you will be playing a " + race + " " + Class +
                                                           " who is " + age + " years old at the start " +
                                                           "of her adventuring career!");                                   
    }

    Childofheinlein wrote:
    I'm new to programming in general and java in specific. I am using the jGrasp programming software, and successfully compile my program, but when I try to run it out of DOS (which I undesrtand is the purpose of java to begin with, unless I'm mistaken), I get an exception that looks exactly like this.....
    So summerizing some of what was said before and some of that wasn't.
    jGrasp is a simplistic IDE. When you pop a dos window from it it sets up the windows correctly to run your program. When you open a regular command window you must do the same yourself.
    >
    Exception in thread "main" java.lang.NoClassDefFoundError: keyboard/javaJava runs "classes". The command that you typed above meant that you were trying to run a "file". Specifically the file "keyboard.java". The two are not the same. There is however a relationship. When the source code, in this case inside of "keyboard.java" is compiled it produces a file called "keyboard.class". Insided of the file there is a "class" called "keyboard". Notice that the name of the class does not have either .java nor .class on the end of it.
    The VM (the 'java' command) finds a "class" using the class path to search files of various types for the class (again keep in mind that files contain classes but they are not themselves classes.)
    You can add to the classpath using the Sun VM using either command line options or environment variables. As noted in some of the previous messages those are "-cp" and "CLASSPATH". It is important to note that that does NOT fully specify the class path. But for your purposes it is sufficient to think of it as doing so.
    The 'default' setting for the part of the class path that you normally set (like via '-cp') is the current directory which is specified by the ".". So normally the following are equivalent.
    java -cp . keyboard
    java keyboard
    The reason the VM could not find your class when you opened the dos window yourself is because you were in the wrong directory. If you had been in the directory with the file "keyboard.class" then it would have worked (if you have not messed with the environment variable "CLASSPATH".)
    So if your class file has the following location: c:\myapps\java\keyboard.class then you can do the following.
    1. Open a console window
    2. Type "cd c:\myapps\java"
    3. Type "java keyboard"
    If the above does not work then you are in the wrong directory or the env variable CLASSPATH has been set to something.

  • Not able to compile java program

    Hi
       I a using Netweaver to deelope the java code.I have written a javaprogram .But when choose the option Run as
    a javaApplication it giving the following error
    Source locator  doesnot Exist:org.eclipse.jdt.debug.ui.javaSourceLocator

    Hi,
    I am able to compile and run perfectly Java programs. The steps goes as:
    1. File --> New --> Project --> Java --> Java Project --> give a <project name> --> Finish
    2. File --> New --> Class --> give a classname, and package name.
    3. Put main method and give a System.out.println("Hello");
    Source code:
    package com.i3l.trg;
    public class HelloWorld {
         public static void main(String[] args)      {
              System.out.println("Hello");          
    4.Goto Run --> Run As --> 2 Java Application.
    5. You will get a output as "Hello" in java console.
    Cheers!!!
    Sukanta Rudra
    PS: Liberally donate points.
    The full source code is

  • 32 bit compiled Java Program not connecting to 64 bit Oracle 11g

    Hi,
    I am using one java program to connect to Oracle 11g (64 bit version) using Oracle10g 32 bit client libraries using OCI calls. Below is the program. If I compile it using 64 bit Oracle 10g libraries ($ORACLE_HOME/lib and $ORACLE_HOME/rdbms/lib) , it perfectly connects to Oracle11g but when i compile it using $ORACLE_HOME/lib32 and $ORACLE_HOME/rdbms/lib32, it hangs and keeps trying and takes 100% cpu usage. it does nothing. Please suggest what is going wrong in the environment.
    ============================
    import java.sql.*;
    class dbAccess {
    public static void main (String args []) throws Exception
    Class.forName ("oracle.jdbc.OracleDriver");
    Connection conn = DriverManager.getConnection
    ("jdbc:oracle:oci8:@lvfd", "fde", "fde");
    // or oci7 @TNSNames_Entry, userid, password
    try {
    Statement stmt = conn.createStatement();
    try {
    ResultSet rset = stmt.executeQuery("select * from tab");
    try {
    while (rset.next())
    System.out.println (rset.getString(1)); // Print col 1
    } finally {
    try { rset.close(); } catch (Exception ignore) {}
    } finally {
    try { stmt.close(); } catch (Exception ignore) {}
    } finally {
    try { conn.close(); } catch (Exception ignore) {}
    ================================================

    >
    I am compiling like when LD_LIBRARY_PATH set to $ORACLE_HOME/lib32:$ORACLE_HOME/rdbms/lib32.
    javac -cp .:$ORACLE_HOME/jdbc/lib/ojdbc14.jar dbAccess.java
    as my program resides in current directory. I run it like :
    java -cp .:$ORACLE_HOME/jdbc/lib/ojdbc14.jar dbAccess
    Output: it hangs forever.
    I am compiling like when LD_LIBRARY_PATH set to $ORACLE_HOME/lib:$ORACLE_HOME/rdbms/lib
    javac -cp .:$ORACLE_HOME/jdbc/lib/ojdbc14.jar dbAccess.java
    as my program resides in current directory. I run it like :
    java -cp .:$ORACLE_HOME/jdbc/lib/ojdbc14.jar dbAccess
    Output: It gets connected and list all the tables as output.
    >
    The ojdbc14.jar file is for use with Java 1.4 VMs.
    Are you still using Java 1.4? If so, why?
    For Oracle 11g you should be using the latest JDBC jar file (ojdbc6.jar) and the latest version of Java 1.6.
    You are not only using an old JDBC driver and Java version but are also trying to mix 32 bit and 64 bit operations.
    I suggest you start using recommended practices and update your Java and JDBC versions and select EITHER 32 bit or 64 bit operations.
    See the Official JDBC FAQ for the details on the support available for various combinations of Oracle DB, Java and the JDBC drivers:
    http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html

  • Error compiling Java Program

    I am new to java programming.
    I recently took a java class. In the lab we created a simple program.
    The program was split up in two separate files.
    //Vehicle.java
    public class Vehicle {
         private double load;
         private double maxLoad;
              public Vehicle(double max_Load) {
                   load = 0.0;     
                   maxLoad = max_Load;
              public double getLoad(){
                   return load;
              public double getMaxLoad(){
                   return maxLoad;
              boolean addBox(double weight) {
                   if ((weight + load) > maxLoad)
                        return false;
                   else
                        load=weight+load;     
                        return true;
    }//end of class Vehicle
    on a complete separate file
    public class TestVehicle {
    public static void main(String[] args) {
    // Create a vehicle that can handle 10,000 kilograms weight
    System.out.println("Creating a vehicle with a 10,000kg maximum load.");
    Vehicle vehicle = new Vehicle(10000.0);
    // Add a few boxes
    System.out.println("Add box #1 (500kg) : " + vehicle.addBox(500.0));
    System.out.println("Add box #2 (250kg) : " + vehicle.addBox(250.0));
    System.out.println("Add box #3 (5000kg) : " + vehicle.addBox(5000.0));
    System.out.println("Add box #4 (4000kg) : " + vehicle.addBox(4000.0));
    System.out.println("Add box #5 (300kg) : " + vehicle.addBox(300.0));
    // Print out the final vehicle load
    System.out.println("Vehicle load is " + vehicle.getLoad() + " kg");
    when we complied the program we ONLY compiled TestVechile.java
    ( javac TestVechile.java) and BOTH the class compiled successfully. When I tried to compile the TestVehicle class at home I got an error at line 6 in TestVehicle.java.
    Please any help would be greatly appreciated.
    - Alex

    To compile TestVehicle.java, you need either Vehicle.java or Vehicle.class -- with neither of them, the compiler doesn't know whether "new Vehicle(10000.0)" is legal or not.

  • Compiling Java program from other java program

    Hi,
    How can I compile and capture the compilation result from another java program?
    Thanks

    As if I had seen somewhere a hint about being able to
    programatically compile with the help of the class
    sun/tools/javac/Main found in the tools.jar.I saw that article, too, but when I took a look at the JDK's source code, it became apparent that none of the classes in tools.jar are supported. Your program could break with any new version of the JDK.
    If you're still interested, here's the URL:
    http://java.sun.com/developer/JDCTechTips/2003/tt0722.html

  • Problem compiling java programs

    when i run javc in command prompt it runs fine but when i try to compile any program through command prompt it gives following error:
    javac: file not found
    usage: java <options> <source file>
    use -help for list of attributes
    what shouls i do plz help

    yogiis wrote:
    when i run javc in command prompt it runs fine but when i try to compile any program through command prompt it gives following error:
    javac: file not found
    usage: java <options> <source file>
    use -help for list of attributes
    what shouls i do plz helpuse set path="path of java/jdk/bin folder with double quotes" then press enter
    otherwise if you are ussing windows system goto to my computer properties and use advanced tab then use environment variables, there use user/system variables and check is there any exisiting path named variable is there or not if there click on edit and use ; and paste the complete path there. press ok, apply. Then use the command.

  • Error When Compiling MailTest  Program ?

    HI. Guys. I am getting this error when i try to compile a program which send an email.
    Compiling 1 source file to F:\Projects\JavaMail\war\WEB-INF\classes
    [javac] F:\Projects\POC\JavaMail\src\SendMailBean.java:3: package javax.mail does not exist
    [javac] import javax.mail.*; //JavaMail packages
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:4: package javax.mail.internet does not exist
    [javac] import javax.mail.internet.*; //JavaMail Internet packages
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:24: cannot find symbol
    [javac] symbol : class Session
    [javac] location: class SendMailBean
    [javac] Session l_session = Session.getDefaultInstance(l_props, null);
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:24: cannot find symbol
    [javac] symbol : variable Session
    [javac] location: class SendMailBean
    [javac] Session l_session = Session.getDefaultInstance(l_props, null);
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:29: cannot find symbol
    [javac] symbol : class MimeMessage
    [javac] location: class SendMailBean
    [javac] MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:29: cannot find symbol
    [javac] symbol : class MimeMessage
    [javac] location: class SendMailBean
    [javac] MimeMessage l_msg = new MimeMessage(l_session); // Create a New message
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:31: cannot find symbol
    [javac] symbol : class InternetAddress
    [javac] location: class SendMailBean
    [javac] l_msg.setFrom(new InternetAddress(p_from)); // Set the From address
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:34: package Message does not exist
    [javac] l_msg.setRecipients(Message.RecipientType.TO,
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:35: cannot find symbol
    [javac] symbol : variable InternetAddress
    [javac] location: class SendMailBean
    [javac] InternetAddress.parse(p_to, false));
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:38: package Message does not exist
    [javac] l_msg.setRecipients(Message.RecipientType.CC,
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:39: cannot find symbol
    [javac] symbol : variable InternetAddress
    [javac] location: class SendMailBean
    [javac] InternetAddress.parse(p_cc, false));
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:43: package Message does not exist
    [javac] l_msg.setRecipients(Message.RecipientType.BCC,
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:44: cannot find symbol
    [javac] symbol : variable InternetAddress
    [javac] location: class SendMailBean
    [javac] InternetAddress.parse(p_bcc, false));
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:49: cannot find symbol
    [javac] symbol : class MimeBodyPart
    [javac] location: class SendMailBean
    [javac] MimeBodyPart l_mbp = new MimeBodyPart();
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:49: cannot find symbol
    [javac] symbol : class MimeBodyPart
    [javac] location: class SendMailBean
    [javac] MimeBodyPart l_mbp = new MimeBodyPart();
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:53: cannot find symbol
    [javac] symbol : class Multipart
    [javac] location: class SendMailBean
    [javac] Multipart l_mp = new MimeMultipart();
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:53: cannot find symbol
    [javac] symbol : class MimeMultipart
    [javac] location: class SendMailBean
    [javac] Multipart l_mp = new MimeMultipart();
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:64: cannot find symbol
    [javac] symbol : variable Transport
    [javac] location: class SendMailBean
    [javac] Transport.send(l_msg);
    [javac] ^
    [javac] F:\Projects\JavaMail\src\SendMailBean.java:79: cannot find symbol
    [javac] symbol : class MessagingException
    [javac] location: class SendMailBean
    [javac] } catch (MessagingException mex) { // Trap the MessagingException Error
    [javac] ^
    [javac] 19 errors

    Looks like you're using ant. You need to configure your ant build.xml file
    so that mail.jar (and activation.jar unless you're using JDK 6) is in your
    classpath when you compile (and run, of course).

  • Cannot compile java Programs

    hi everyone,
    when i tried to compile a java Program i had created.I got the following Error.
    Error occoured during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object
    I reinstalled the entire thing from the system and when i tried to compile the java Program again it gives like a 1000 errors even on the programs i know that work fine and even the very basic 5 or 10 line Programs.Can someone tell me what is happening??

    Having Deleted a file in the folder that i was executing the javac seem to have fixed the problem.It was called String.java
    and the content of the file were as mentioned under:Any help on why it happened or what the file was doing would be really appreciated.
    The content of the file:-
    ""Java String Examples
    The String class implements immutable character strings, which are read-only once the string object has been created and initialized. All string literals in Java programs, are implemented as instances of String class.
    The easiest way to create a Java String object is using a string literal:
    1.
    String str1 = "I can't be changed once created!";
    A Java string literal is a reference to a String object. Since a String literal is a reference, it can be manipulated like any other String reference. i.e. it can be used to invoke methods of String class.
    For example,
    1.
    int myLenght = "Hello world".length();
    The Java language provides special support for the string concatenation operator (+), which has been overloaded for Java Strings objects. String concatenation is implemented through the StringBuffer class and its append method.
    For example,
    1.
    String finalString = "Hello" + "World";
    Would be executed as
    1.
    String finalString = new StringBuffer().append("Hello").append("World").toString();
    The Java compiler optimizes handling of string literals. Only one String object is shared by all strings having same character sequence. Such strings are said to be interned, meaning that they share a unique String object. The Java String class maintains a private pool where such strings are interned.
    For example,
    1.
    String str1="Hello";
    2.
    String str2="Hello";
    3.
    If(str1 == str2)
    4.
    System.out.println("Equal");
    Would print Equal when executed.
    Since the Java String objects are immutable, any operation performed on one String reference will never have any effect on other references denoting the same object.
    String Constructors
    String class provides various types of constructors to create String objects. Some of them are,
    String()
    Creates a new String object whose content is empty i.e. "".
    String(String s)
    Creates a new String object whose content is same as the String object passed as an argument.
    Note: Invoking String constructor creates a new string object, means it does not intern the String. Interned String object reference can be obtained by using intern() method of the String class.
    String also provides constructors that take byte and char array as an argument and returns String object.
    String equality - Compare Java String
    String class overrides the equals() method of the Object class. It compares the content of the two string object and returns the boolean value accordingly.
    For example,
    1.
    String str1="Hello";
    2.
    String str2="Hello";
    3.
    String str3=new String("Hello") //Using constructor.
    4.
    5.
    If(str1 == str2)
    6.
    System.out.println("Equal 1");
    7.
    Else
    8.
    System.out.println("Not Equal 1");
    9.
    10.
    If(str1 == str3)
    11.
    System.out.println("Equal 2");
    12.
    Else
    13.
    System.out.println("I am constructed using constructor, hence not interned");
    14.
    15.
    If( str1.equals(str3) )
    16.
    System.out.println("Equal 3");
    17.
    Else
    18.
    System.out.println("Not Equal 3");
    The output would be,
    Equal 1
    Not Equal 2
    Equal 3
    Note that == compares the references not the actual contents of the String object; Where as equals method compares actual contents of two String objects.
    String class also provides another method equalsIgnoreCase() which ignores the case of contents while comparing.
    Apart from these methods String class also provides compareTo methods.
    int compareTo(String str2)
    This method compares two Strings and returns an int value. It returns
    - value 0, if this string is equal to the string argument
    - a value less than 0, if this string is less than the string argument
    - a value greater than 0, if this string is greater than the string argument
    int compareTo(Object object)
    This method behaves exactly like the first method if the argument object is actually a String object; otherwise, it throws a ClassCastException."""
    Edited by: Gold_y on Oct 30, 2009 4:59 AM

  • Error occurred when processing Java programs (CRM ORDER READ is called)

    Hi,
      We are facing a problem while running a batch job.Its a batch job which reads order data from crm system by using crm order read and generates fur files on application server.
    But the problem is,  after executing or generating lets say 10000 records in file the batch job is automatically closed.
    When we tried to analyse it from SM37 we got the error message saying,
      " An error occurred while executing a Java program in the VM container"
    So what could be the reason of this problem.And what is the solution.
    Regards
    PG

    This is the error we get when we read Pricing condition or Variant Config from the ORDER.
    I think you are not  initalizing the order after you have the read the data.Pass the guid to ti_guis_to_init.
       call function 'CRM_ORDER_INITIALIZE'
          exporting
            it_guids_to_init = <>
          exceptions
            error_occurred   = 1
            others           = 2.
    This may solve the problem.
    Edited by: Chandra on Jan 30, 2009 1:30 PM

Maybe you are looking for

  • Can't customize track information on Itunes 11.01

    This might take awhile.  A month ago, I purchased a new MBP which is running Itunes 11.01.  So, I had to redo all of my playlists.  I have well over a million different audio files/music tracks.  I download A LOT of live music from different artists.

  • Error in JDeveloper 11.1.1.6

    I am getting the following error while opening a BPEL Component in JDeveloper 11.1.1.6. Error below: Uncaught exception java.lang.NoClassDefFoundError: oracle/tip/tools/ide/bpel/v1/plugins/plugins/monitor/xbean/model/Counter j.lang.Class.getDeclaredM

  • Non-compressed aggregates data lost after Delete Overlapping Requests?

    Hi, I am going to setup the following scenario: The cube is receiving the delta load from infosource 1and full load from infosource 2. Aggregates are created and initially filled for the cube. Now, the flow in the process chain should be: Delete inde

  • Storing degenerate dimension info in an OWB 10gR2 cube

    Hi, I'm looking to store "degenerate dimension" information in an OWB 10gR2 cube. Typically in a DW, I'd just add a column to the fact table to hold the information. However, in OWB 10gR2, I don't see any way to add a column to a "cube" object - ever

  • Discrepancies in total file size report between v$asm_file and dba_data_files

    Hi Friends, I have an issue, where there are differences of around (70 GB - 90 GB) between what v$asm_file is reporting and what dba_data_files reports. (I have taken TEMP files into account as dba_data_files does not report TEMP files), but still th