Skip to content
Advertisement

Tag: java

JAVA command shows nothing in a command prompt

My question is very simple but I still cannot find out what’s the problem. When I input java, java -version or javac -version in a command prompt nothing is shown at all: neither an “unknown file” error nor the result. That’s how it looks like: I used standard Java installer, PATH and JAVA_HOME variables were renewed. I’ve set JDKs several

Filtering out formatting tags from JSoup selectors

JSoup here. I have the following HTML I’m trying to parse: Unfortunately its actually slightly malformed (missing some closing tags, opening and closing tags on <b> and <u> are out of order, etc.) but I’m hoping JSoup can handle that. I don’t have control over the HTML. I have the following Java model/POJO: I am trying to get JSoup to

How to make a custom-shaped Recycler View?

I need to make a recycler view whose elements will wrap around the ImageView (like this: https://imgur.com/a/7NpCHri). Is there a way to implement this? Answer You can create adapter with GridLayoutManager and for items with indexes 6, 7, 10, 11 make empty transparent views. But as it were said in comment it is not appropriate use of RV. Maybe it

Current time API / Exact time detection via API

Today, for the first time, I am trying to get the right time through the API. I don’t understand‚ please help. I am using the http://worldtimeapi.org/api/timezone/ site to determine the exact time. But I didn’t understand how to use it in JAVA and what codes to write. Please send me a snippet of code or codes. I don’t know what

Is it possible to return the Class of a generic type without any warning?

The question is pretty simple, take a look at the following code: In eclipse and maybe other ide, a warning is generated: So i did change the return type of the getApplicableClass function to: But the question now is, how can i return a Class<ChoiceBox<?>> without warning Answer This case is explicitly treated in the book Effective Java by Joshua

cannot resolve ‘@GET’ [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 1 year ago. Improve this question

Advertisement