Чашечка Java
前往频道在 Telegram
Лучшие материалы по Java на русском и английском Разместить рекламу: @tproger_sales_bot Правила общения: https://tprg.ru/rules Другие каналы: @tproger_channels
显示更多8 549
订阅者
-324 小时
-47 天
-2530 天
帖子存档
8 549
Top 50 Garbage Collection and Java Performance Interview Questions and Answers
Hello Java Developers, If you have gone through any Java Developer interview, particularly for a senior developer role then you know that a good knowledge of JVM internals and Garbage collection is...
Read: http://www.java67.com/2020/02/50-garbage-collection-interview-questions-answers-java.html
8 549
Top 5 courses for Google Cloud Professional Network Engineer Certification in 2022
Networking is an essential aspect of any cloud platform. The individual responsible for handling the networks should have a proper understanding of networking fundamentals as well as enough...
Read: http://www.java67.com/2022/05/top-5-courses-for-google-cloud-network.html
8 549
Why Apache Kafka is dropping ZooKeeper for KRaft
Read: https://www.infoworld.com/article/3660073/why-apache-kafka-is-dropping-zookeeper-for-kraft.html#tk.rss_java
8 549
Java News Roundup: JEPs for Projects Loom and Panama, JobRunr 5.1.0, Kotlin 1.7.0 Preview
This week's Java roundup for May 2nd, 2022 features news from OpenJDK, JEPs targeted for JDK 19, JobRunr 5.1.0, Quarkus 2.8.3.Final, Hibernate ORM 6.0.1.Final, Kotlin 1.7.0 preview, Apache Camel versions 3.14.3 and 3.11.7, Apache Tika version 2.4.0 and 1.28.2, a Micronaut survey on a minimal JDK version and the 2022 JFokus Conference.
By Michael Redlich
Read: https://www.infoq.com/news/2022/05/java-news-roundup-may02-2022/
8 549
Spring HelloWorld Example in Java using Annotation and Autowiring
Spring framework has gone a couple of releases since I last share the Spring hello world example with XML configuration. In this article, I am going to explain to you how to create a Spring hello...
Read: http://www.java67.com/2019/10/spring-helloworld-example-in-Java-eclipse.html
8 549
What is ContextLoaderListener in Spring MVC? Example
The ContextLoaderListner is one of the essential components of the Spring MVC framework, probably the most important after the DispatcherServlet itself. It is used to create the root context and...
Read: http://www.java67.com/2019/05/contextloaderlistener-in-spring-mvc-10.html
8 549
How to fix org.springframework.beans.factory.BeanCreationException: Error creating bean with name X [Java Spring]
If you are using the Spring framework in your Java application and getting this error during startup it means Spring is not able to initialize the bean X and add it into its application context, Why?...
Read: http://www.java67.com/2017/07/solving-orgspringframeworkbeansfactoryb-beancreation-exception-java-spring.html
8 549
[Solved] How to reverse a String in place in Java? Example
One of the common Java coding interview questions is to write a program to reverse a String in place in Java, without using additional memory. You cannot use any library classes or methods...
Read: http://www.java67.com/2016/06/how-to-reverse-string-in-place-in-java.html
8 549
How to check if Array contains given Number or String in Java [ Linear Search vs Binary Search]
Hello guys, one of the common coding questions from Java interviews is how to test if an Array contains a certain value or not? This is a simple question, but sometimes interview pressure makes...
Read: http://www.java67.com/2014/11/how-to-test-if-array-contains-certain-value-in-java.html
8 549
How to send HTTP Request from a Java Program - Example Tutorial
If you are thinking is it possible to send an HTTP request from a Java program and if yes, how to send a simple HTTP GET request in Java, then you have come to the right place. In this article,...
Read: http://www.java67.com/2018/02/a-simple-example-to-send-http-request-from-Java-program.html
8 549
How to Reverse words in String Java? [Solution]
Hello guys, if you are wondering how to reverse words in a given String in Java then you have come to the right place. Earlier, I have shared 75 Programming interview questions and In this Java...
Read: http://www.java67.com/2015/06/how-to-reverse-words-in-string-java.html
8 549
What is temporary table in Database and SQL? Example Tutorial
Hello folks, if you have heard the term temporary table online or by your colleague in a call and wondering what is temporary table, what is the difference between a normal table and a temporary...
Read: http://www.java67.com/2022/05/what-is-temporary-table-in-database-and.html
8 549
When to throw and catch Exception in Java? [Best Practice]
Exceptions are one of the confusing and misunderstood topics in Java, but at the same time, too big to ignore. In fact, good knowledge of Errors and Exception handling practices is one criterion,...
Read: http://www.java67.com/2021/06/when-to-throw-and-catch-exception-in.html
8 549
Difference between static initializer block vs instance initializers in Java? Example
In Java, you can initialize member variables or fields in the same line you declare, in the constructor, or inside an initializer block. There are two types of initializer blocks in Java, static...
Read: http://www.java67.com/2021/08/difference-between-static-initializer.html
8 549
How to validate phone numbers in Java? Google libphonenumber library Example Tutorial
Hello guys, if you are wondering how to validate if a given number or string is a valid phone number in a Java application then you are not alone. It's a common requirement to validate phone...
Read: http://www.java67.com/2020/04/how-to-validate-phone-number-in-java.html
8 549
How to convert String to int or Integer data type in Java? Example Tutorial
Hello guys, if you are wondering how to convert a String variable to int or Integer variable in Java then you have come to the right place. Earlier, I have showed how to convert Integer to String in...
Read: http://www.java67.com/2013/03/how-to-convert-string-to-int-in-java.html
8 549
Top Java Blogs Weekly: Best of 20/2022
Best of Top Java Blogs, year 2022, week 20
Read: https://www.topjavablogs.com/news/best-of-20-2022
8 549
3 ways to Convert Integer to String in Java [Example]
Hello guys, this is the second part of the String to Integer data type conversion tutorial in Java, in the first part you have learned how to convert String to Integer, and in this article, you will...
Read: http://www.java67.com/2015/10/java-how-to-convert-from-integer-to-String-in-Java.html
8 549
Знакомимся с Javassist
Всем большой привет! Перед началом стоит сказать, что библиотека Javassist довольно мощный инструмент, так как стирает почти все границы у того безграничного языка JAVA, позволяя разработчику осуществлять манипуляции связанные с байткодом.
Конечно, получив доступ к байткоду, а ровно и к возможности воздействовать на этот самый байткод вам совсем не обязательно вклиниваться в него. Javassist можно использовать и в “мирных” целях!
При многообразии возможностей не стоит забывать о том, что использовать библиотеку нужно только тогда, когда это действительно необходимо. Использование данного инструмента делает основной код менее понятным, так как после применения Javassist у вас появится второе полноценное приложение, в котором будет жить Java со своей логикой.
Итак, если после всех предостережений вы все же решили использовать эту библиотеку, то давайте начинать!
В этой статье мы рассмотрим Javassist, как инструмент, с помощью которого мы будем вклиниваться в существующий байткод и трансформировать его.
Потребоваться это может в разных случаях. Например, у вас под рукой есть некая библиотека, в которой все классы уже скомпилированы и все зависимости вместе с запускающим методом упакованы в JAR архив. И вот, случилось так, что по какой-то причине вам нужно изменить реализацию того или иного метода. Предположим, вы нашли баг в библиотеке, или возможно требуется, чтобы были выполнены какие-нибудь дополнительные действия, в виде подсчета чего-нибудь, отправки оповещения о том или ином событии при старте вашего приложения и при определенных условиях.
Как и говорилось выше, после использования Javassist у вас появится второе полноценное приложение, в котором будет жить Java со своей логикой. Почему это происходит? Почему нельзя запаковать все в одно приложение?
Ответ очевиден – приложение не может само себя изменять. Т.е. приложение не может само изменять свой же байткод. Это должен делать кто-то другой. Этот кто-то другой – такое же Java приложение, но заточенное на работу с байткодом.
Читать: https://habr.com/ru/post/664818/?utm_campaign=664818
8 549
ИТ-компания NAUMEN проводит бесплатный митап для java-разработчиков — JUG.EKB
В программе два доклада. Спикеры расскажут, какие боли сможет вылечить ниспадающее программирование и проведут экскурсию по интернету вещей.
Офлайн встреча 12 мая в 19:30 Екб | 17:30 Мск в Атриум Палас Отеле (г. Екатеринбург, ул. Куйбышева 44). Если вы из другого города или хотите смотреть трансляцию из дома — подключайтесь онлайн. Ссылку отправят в день встречи.
Зарегистрироваться: https://tprg.ru/jvWe
Это #партнёрский пост
现已上线!2025 年 Telegram 研究 — 年度关键洞察 
