0

I'm attempting to change the file path of eclipse java neon to access a database I need for my programming class and I cant figure out how to do it for windows 10 (the book only instructs us on on how to do it in window 8 and 7).

I'll give you the short version and just say that the book tells me to either edit the current classpath to look something like .;C:\Program Files\Java\jdk1.7.0_51\db\lib\derby.jar or to make a new one that looks like that.

The problem is when I changed it to look like that it kept giving me a path error and I just need to fixed that error. My version of Java is jre1.8.0_111 and the database I am supposed to be making is called CoffeeDB (though I don't think you need that info).

The end game of this is to be able to connect to databases so I can do my homework of creating and changing them.

If you need more information to help I am more than willing to give it, I'm just not sure as to what more you would need.

H. Brown
  • 3
  • 3
  • I don't use Eclipse but can't you just copy derby.jar into your particular project folder (directory) and then add the library to your project through the project property settings? – DevilsHnd - 退職した Dec 13 '16 at 03:05
  • What is the error? Are you getting `ClassNotFoundException` ? Also, list how exactly do you run the program? Windows Command line, Eclipse, Unix shell ? – Pat Dec 13 '16 at 03:09
  • A Java runtime environment (jre) or java development kit (jdk) must be available in order to run eclipse. No java virtual machine was found after searching the following locations: C:\Users\Frank\eclipse\java-neon\eclipse\jre\bin\javaw.exe javaw.exe in your current PATH that is the error that I am getting. – H. Brown Dec 13 '16 at 03:20
  • I can also link the program that we are supposed to run once we have it connected. Its a bit long but it gives a few error messages in the program that may be of use to people trying to help, should I link it? – H. Brown Dec 13 '16 at 03:34

1 Answers1

0

Specifying the classpath for your pc

See these IBM article and Oracle tutorial about classpath management.

Specifying the classpath for eclipse

Eclipse usually sync the class path with the system. But just to be sure -

Step 1: Right click on your current project -> Build Path -> configure built path

Step 2: On left side tab; select Java Built Path

Step 3: On right side tab; select Add Library

Step 4: Select JRE System Library. Select Environment, Installed JRE(jdk 1.8) -> Finish -> Apply -> OK.

Related Question (problem related to installation of JDK, JRE)

Maybe you find something beneficial here

Eclipse - no Java (JRE) / (JDK) ... no virtual machine

Anatoly Shamov
  • 2,608
  • 1
  • 17
  • 27
saify
  • 70
  • 1
  • 1
  • 9