简体   繁体   English

找不到Java数据库路径

[英]Java database path not found

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). 我正在尝试更改Eclipse Java Neon的文件路径以访问我的编程课程所需的数据库,但我无法弄清楚如何在Windows 10上进行操作(这本书仅指导我们如何在Windows 8中进行操作和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 .; 我会给你一个简短的版本,只是说这本书告诉我要么编辑当前的classpath以使其看起来像。 C:\\Program Files\\Java\\jdk1.7.0_51\\db\\lib\\derby.jar or to make a new one that looks like that. C:\\Program Files\\Java\\jdk1.7.0_51\\db\\lib\\derby.jar或制作一个看起来像这样的新文件。

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). 我的Java版本是jre1.8.0_111 ,应该建立的database称为CoffeeDB (尽管我认为您不需要该信息)。

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. 如果您需要更多信息来帮助我,而我不愿意提供这些信息,我不确定您还需要什么。

Specifying the classpath for your pc 为您的电脑指定类路径

See these IBM article and Oracle tutorial about classpath management. 请参阅这些IBM 文章和有关类路径管理的Oracle 教程

Specifying the classpath for eclipse 指定Eclipse的类路径

Eclipse usually sync the class path with the system. Eclipse通常将类路径与系统同步。 But just to be sure - 但是请确保-

Step 1: Right click on your current project -> Build Path -> configure built path 第1步:右键单击当前项目->构建路径->配置构建路径

Step 2: On left side tab; 第2步:在左侧标签上; select Java Built Path 选择Java Built Path

Step 3: On right side tab; 步骤3:在右侧标签上; select Add Library 选择添加库

Step 4: Select JRE System Library. 步骤4:选择JRE系统库。 Select Environment, Installed JRE(jdk 1.8) -> Finish -> Apply -> OK. 选择环境,已安装的JRE(jdk 1.8)->完成->应用->确定。

Related Question (problem related to installation of JDK, JRE) 相关问题(与安装JDK,JRE有关的问题)

Maybe you find something beneficial here 也许您在这里找到了有益的东西

Eclipse - no Java (JRE) / (JDK) ... no virtual machine Eclipse-没有Java(JRE)/(JDK)...没有虚拟机

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM