Can’t seem to disable Java Automatic Update

Actually this problem is due to the control panel requiring administrator privileges to allow the Java control panel to save your settings (it hasn’t been fixed for ages, thanks to Sun Microsystems). First, you need to find the Java Control Panel executable, in one of the following locations: C:\Program Files\Java\jre[version]\bin\javacpl.exe or C:\Program Files (x86)\Java\jre[version]\bin\javacpl.exe The … Read more

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: