Author Topic: java.lang.String missing  (Read 2365 times)

mike1

  • New Community Member
  • Posts: 2
  • Hero Points: 0
java.lang.String missing
« on: November 28, 2018, 08:10:36 PM »
Running SlickEdit Pro 2018 (v23.0.0.11 64-bit) on Windows 10.

When editing a Java file and I type String I get an import for class org.apache.xpath.operations.String.

I tried the steps in https://community.slickedit.com/index.php?topic=15825.0 but I don't have java.lang.String in the Symbols tool window under "Java compiler tag file".

How can I get the missing java.lang.String defined?

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: java.lang.String missing
« Reply #1 on: November 28, 2018, 09:21:11 PM »
What version of Java do you have tagged (which one shows in Symbols)?
What version of Java do you wish to have tagged?
Which Java compiler configuration is active in your project (Project > Project Properties > Compiler/Link)?

mike1

  • New Community Member
  • Posts: 2
  • Hero Points: 0
Re: java.lang.String missing
« Reply #2 on: November 28, 2018, 10:10:52 PM »
I tagged IBM Java 7 (JDK 1.7.0) and I'm using that version of Java.  I don't have a project defined.  I'm just editing a java file.

Dennis

  • Senior Community Member
  • Posts: 3961
  • Hero Points: 517
Re: java.lang.String missing
« Reply #3 on: December 10, 2018, 11:53:33 PM »
Since you are using the IBM JDK, you may need to do some extra work to get tagging working.  IBM does not make their JDK simple to install stand-alone like Oracle does.  We do try to recognize the IBM JDK, and it sounds like that did work for you, otherwise I don't know why it is in our list, but let's try starting from scratch just to make sure.  It is possible that the Java installation that you had configured is an old version that is no longer installed in the same location.

1) Go to Tools > Tag Files...
2) Click on "Autotag..."
3) Click on "Java compiler libraries"
4a) If you already have an entry named "JDK 1.7.0", select it.
      i) Click on "Configure..."
      ii) Look over the list of Jar files, and verify that they are in the correct location and include "rt.jar"
      iii) If not, Click on "Delete" then "OK", and proceed to step 4b to add it back again.
4b) If not, Click on Add Compiler...
      i) When it prompts to "Select Compiler type", select "Java compiler libraries"
      ii)) Navigate to the directory containing your IBM Java 7.0 installation
             C:\Program Files\IBM\JAVA7.0\
             C:\Program Files\IBM\WebSphere\Liberty\java_1.7_64\
      iii) After you locate the Java installation, a dialog will come up with the list of jar files, verify that "rt.jar" is in the list
5) You will be asked if you want to make this your default Java configuration.  That's up to your, but if you do not make it your default, you will need to make it the Java compiler configuration in your project properties to make it active.