问题
I have checked the services tab to the left and there isn't a javaDB in the database option, there's nothing in there? i'm using jsp's and beans, is there something i'm doing wrong?.
i'm getting the message
The Java DB location is not set correctly
when i run my jsp for the first time.
回答1:
You have to make sure that the paths to the Java DB are actually available!
To do this please do the following:
- Click on "Windows" - "Services"
- Expand "Databases"
- Select "Java DB"
- Do a right-click and select "Properties..."
- Make sure that the locations are valid!
Sample paths
Java DB Installation: C:\glassfish\glassfish-3.1.2.2\javadb
Database Location: C:\Users\YourUsername.netbeans-derby
Screenshot:
回答2:
Detailed instructions on how to install(probably unecessary javaDB is part of JDK6), configure and register JavaDB for Netbeans can be found @ Netbeans KB. The steps are basically:
- Find where javaDB is installed (search for folder "javadb" ?) or download and install it.
- Make/choose a directory to keep the databases in. (So now you have/know two directories)
- Register this info with Netbeans by specifying theese two directories.
- Test that it works.
回答3:
just re-installed netbeans, now it works fine, must of just bugged out...
回答4:
I downloaded the netbeans with only JavaSE. When I downloaded the full version, uninstalled the JavaSE only version and then installed the full version, I could then find glassfish under ProgramFiles and navigate to the JavaDB directory.
来源:https://stackoverflow.com/questions/10371325/the-java-db-location-is-not-set-correctly-netbeans