tags:

views:

232

answers:

3

in one of my questions ,somebody said that I have to make sure that I'm not using compiler 1.6 and 1.5 runtime when i want to execute or debug my program,but I don't know how can i check compiler and runtime in NetBeans ,I am beginner with NetBeans.

my question was: **I debug my project and the result was :

debug: Have no FileObject for C:\Program Files\Java\jdk1.6.0_02\jre\lib\sunrsasign.jar

Have no FileObject for C:\Program Files\Java\jdk1.6.0_02\jre\classes**

what should i do?

and he answers : you have to make sure that you are not using compiler 1.6 and 1.5 runtime when you want to execute or debug your program

+1  A: 

You can set the Java version to be used in the project properties (right click on the project).

Edit: after seeing your specific error message: this seems to be a deeper problem. For some reason Netbeans is looking for a file sunrsasign.jar, which is not normally part of the JDK. Looking for the filename on Google indicates that it's part of a cryptography extension, but that seems to have been integrated into the JDK by now. So the JAR is not needed anymore.

I don't know whether it's Netbeans (are you using the most recent version?) or your application that is mistakenly looking for a JAR that has been integrated into the JDK library itselt.

Michael Borgwardt
I just know that my JDK is 1.6 and I don't know any thing also I am beginner can you explain more? for solving this matter.
Johanna
+1  A: 

Here's what I use to find out everything about my building environment (never felt too warm with Eclipse):

import static java.lang.System.out;

public class Zeug {
    static String[] opts = new String[] { "java.version", "java.vendor",
      "java.vendor.url", "java.home", "java.vm.specification.version",
      "java.vm.specification.vendor", "java.vm.specification.name",
      "java.vm.version", "java.vm.vendor", "java.vm.name",
      "java.specification.version", "java.specification.vendor",
      "java.specification.name", "java.class.version", "java.class.path",
      "java.library.path", "java.io.tmpdir", "java.compiler",
      "java.ext.dirs", "os.name", "os.arch", "os.version",
      "file.separator", "path.separator", "line.separator", "user.name",
      "user.home", "user.dir" };

    public static void main(String[] args) {
     for(String o : opts) {
      out.println(o + ": " + System.getProperty(o));
     }
    }
}
nes1983
Thanks ,a lot[:-)]
Johanna
A: 

Go to Tools-->Java Platform and you should see the JDK you are using listed. I am using java-6-sun-1.6.0.16 which does indeed have the jar file you need.

Download the latest JDK from Sun. Go to Tools-->Java Platform and click Add Platform. Navigate to where you installed the latest JDK, name it something meaningful like JDK 1.6.0.16 or whatever and click Finish. Right click on the top level of your project and click Properties. At the top of the popup window change the Java Platform to the one you just added and click ok. At that point, you should not experience your current problem when you compile.

JDK Download Link

Ichorus