No Main class found in NetBeans

Right click on your Project in the project explorer Click on properties Click on Run Make sure your Main Class is the one you want to be the entry point. (Make sure to use the fully qualified name i.e. mypackage.MyClass) Click OK. Run Project 🙂 If you just want to run the file, right click …

Read more

Spring Boot – Cannot determine embedded database driver class for database type NONE

You haven’t provided Spring Boot with enough information to auto-configure a DataSource. To do so, you’ll need to add some properties to with the spring.datasource prefix. Take a look at DataSourceProperties to see all of the properties that you can set. You’ll need to provide the appropriate url and driver class name:

Simple timeout in java

Can anyone guide me on how I can use a simple timeout in java? Basically in my project I’m executing a statement br.readLine(), which is reading a response from a modem. But sometimes the modem isn’t responding. For that purpose I want to add a timeout. I’m looking for a code like: