Most voted "java" questions
Use this tag when the question refers to some resource, information, or problem relating exclusively to the Java programming language. Java is a class-based, statically typed, reflective, and execution environment (JRE) language. Java programs are compiled to bytecode and run on a virtual machine (JVM), allowing a "write Once, run Anywhere" philosophy (WORA).
Learn more…14,468 questions
Sort by count of
-
0
votes1
answer70
views"nullpointerexception" error when switching from Activity
I have a problem and I wish someone could solve it for me. I am new in the field of java and android programming, I developed a project in which I tested and in debug mode ran everything right. But…
-
0
votes1
answer106
viewsJasperreports - Is it possible for a report to be automatically listed several times?
I have a report that is nothing more than a receipt, with its items and data of the note and the items. A feature was requested that when selecting more than one invoice, this report manages the…
-
0
votes0
answers159
viewserror when selecting android gallery image in my annotation app
Guys is the following, I have a very simple diary notes app in which has an option to select and attach a photo in the note, the photo can be taken at the same time with the camera or imported from…
-
0
votes1
answer121
viewsHow to change the size of a Jfilechooser?
Hello, I wonder if anyone knows any way to increase the size of a Jfilechooser like this : I would like it to fill up all the space left on the screen, to make it easier to locate the files. Thanks…
-
0
votes0
answers88
viewsURL Restful service working, but on ANDROID returns null
I’m trying to develop a service Rest for my father’s store, I’m able to bring the results in JSON through the URL, but when I try to execute the same method on android to try to fill the object, it…
-
0
votes1
answer215
viewsPreventing Jframe from being moved on screen
I have a frame in java , and it is in the middle of the screen. I don’t want it to be moved to other screen locations like I would to set it ?
javaasked 8 years, 10 months ago Yuri Ancelmo 353 -
0
votes1
answer985
viewsPage Numbering Problems with iText
Good afternoon, everyone. I need to create reports with iText. Everything was going great until I needed to number these reports. I found a reply in someone else’s post on GUJ, but it didn’t work…
-
0
votes0
answers257
viewsStella Boleto error loading jrxml
I’m trying to generate billet with Stella but I’m getting the following error Exception in thread "main" br.com.caelum.stella.boleto.exception.GeracaoBoletoException:…
-
0
votes1
answer967
viewsDoubt in web service development for APP(android) and WEB(php)
Hello, we are developing an APP for android and this will make a query in a webservice (that is not done yet) to validate data requested by the APP. The same project runs on the web and is developed…
-
0
votes0
answers149
viewsHow to disable component in Jframe
I have two Jframes the first has the name "System" and another "Access" when completing the authentication in "Access" wanted the component called "mnUsuario" which is described below was disabled…
-
0
votes1
answer163
viewsDivision into different methods
I’m learning in college to divide the system into different methods, each performing a function. However I had a problem with the following code: import java.util.Scanner; public class…
-
0
votes0
answers46
viewsHow to go to a second Activity if user is logged in facebook sdk
Next, an app with a login screen with the facebook login button is implemented right.. wanted to know how to do if the user is already logged in go straight to a second Activity, if not back to…
-
0
votes1
answer733
viewsCheck password fields with each other
How do I validate two password fields if both are equal? if(pfSenha.getPassword() == pfCSenha.getPassword()) { JOptionPane.showMessageDialog(null, "Senhas conferem!"); } else {…
javaasked 8 years, 10 months ago Júnior Nascimento 679 -
0
votes1
answer739
viewsUse of Resultset, converting String to Array
I’m trying to convert some data that comes from BD to an Array, using Resultset to select BD data. In the code below it does not give any error however If I try to use a: System.out.println(x[0]);…
-
0
votes1
answer95
viewsWeb Service Images Java ZIP Android
I need my Android app to download a large shipment of images and store on the Smartphone disk, but I need to decide what would be the best format to download these files, because the images should…
-
0
votes1
answer82
viewsHow to name a text file with Edittext information?
In my registration app I have the name and phone information. After entering the information and clicking register, a text file is created with the registered information. But I would like the…
-
0
votes0
answers524
viewsHow to recover the number of messages in a Rabbitmq queue?
Has anyone here ever worked with rabbitmq implementing java for messaging? I need your help. I need to recover the number of messages in a queue in Rabbitmq. This is my class, it is a task, in which…
-
0
votes1
answer756
viewsHow to check if a server’s response returns (200 OK) in java ?
I am developing an android app, and would like to check if a site or a URL is active
-
0
votes1
answer221
viewsJava - Main Class Execution Error
Good afternoon, After using Eclipse Luna and returning to Eclipse Mars simply business broke up until I deleted the Eclipse files to see if it solved and import again the java project but keeps…
-
0
votes1
answer56
viewsSQL Query according to the Make a New Column
I have a column that is numerical. In this column there are positive and negative values. I need to make an appointment that when I’m positive, I’ll consult Tabela A, when negative I refer to Tabela…
-
0
votes0
answers56
viewsJava - Edit Windows 7 Registry
I am having trouble changing this windows registry key with name "start" from "1" to "4". Using a Bible. // Leitura de Chave String opcao; String productName = Advapi32Util.registryGetStringValue(…
-
0
votes1
answer793
viewsCode structure problem within switch case
When choosing option 1 (easy) the program enters case 1 correctly, but when I choose the port (0, 1 or 2) it goes back to the menu, the goal is that if the port is the right one it passes to the…
-
0
votes1
answer44
viewsJava - Sliding Menu
Good morning, How do I make my menu manageable? I’ve been reigning a little bit more than I know how to do in jFrame. Could someone guide me? Thank you very much!…
-
0
votes0
answers99
viewsHow to export database?
I need to export my database to a text file. I’ve seen some questions like this around, but none with a cohesive or coherent answer. Follows excerpt from my code: //ACAO DO BOTAO CADASTRAR public…
-
0
votes0
answers560
viewsCombobox with null value
I have a window to insert a product in my database, I have 3 combobox, Two of them work normally. Only that one of them that is the suppliers, which is the same as the others, when I click on the…
-
0
votes1
answer300
viewsWhat is the endpoint interface in EJB?
I am studying EJB(Enterprise Java Beans) and would like to know, within the context of distributed applications, what is the role of the endpoint interface. What is the endpoint interface? Where and…
-
0
votes0
answers94
viewsAndroid app can’t pull Wordpress data
I developed an application in Java for Android, together I installed in my server in Hostinger Wordpress with the REST API. However, after running the application on my mobile, it can not download…
-
0
votes2
answers345
viewsHow to translate the Mysql query that has a sum to Hibernate?
I need to translate the following query from Mysql to Hibernate: select sum(TOTAL_MERCADORIA_BRL) from PROCESSO group by PERIODO like 'DEZ-15'; What would be the best way to do this query, but using…
-
0
votes1
answer295
viewsTrouble with Hibernate
I’m trying to learn about Hibernate together with a tutorial making an app for a petshop and I’m having the following problems: INFO: HHH000228: Running hbm2ddl schema update dez 16, 2015 8:34:52 PM…
-
0
votes1
answer348
viewsupload videos directly to Vimeo with URL return
Friends could help me on an issue where I’m developing an app where I upload videos to the server, but I’m having problems with video playback and storage, since these videos take up a lot of space…
-
0
votes0
answers216
viewsError 400 android for web service
I’m getting error 400 when sending parameters to the web service. @POST @Produces("application/json; charset=utf-8") @Consumes("application/json; charset=utf-8") @Path("realizarvenda") public String…
-
0
votes0
answers197
viewsCustomization of Textfield javafx
Hello, I would like to know how to customize my Textfield to leave with this same style ("http://codepen.io/Wakkos/pen/hCquc"), but without color change. I found this code, but I’m having trouble…
-
0
votes0
answers19
viewsHow to change the font only of the selected text in the text area in Swing (Java)
I’m making a mini editor, but when I click on the bold button, for example, all text changes and I want you to change only the selected text. And more, how do I so that when you click on the button…
-
0
votes1
answer63
viewsHow to make an image reference?
I want to make simple app where user select an image of SD card and then can save its reference in sqlite so it can be displayed in a listview, but still do not know how I can make this reference.…
-
0
votes1
answer278
viewsHow to view posts from a facebook page?
I want to view posts from a facebook fanpage in an app. I’ve been doing some research and some people helped me and told me to use the Facebook API. Pis well, I am using, but, as facebook does not…
-
0
votes1
answer2443
viewsBattleship Java
Good morning, you guys, I’m doing an exercise in java on the game Battleship, I have a good part of the code but I’m locked on the part of validating the position of the boats. The exercise asks…
-
0
votes2
answers91
viewsSecure authentication between different systems
My scenario is the following: A php system authenticates the user and should call my application (Java) stating which user this is. My application does not authenticate this user, it only receives…
-
0
votes0
answers972
viewsGetting HTTP Error 500 Internal Server Error Using Jersey
I’m studying REST. I’m using jersey to create a service RESTful. I came across a problem trying to create a service that would return an object json. I am using a client (java) to request the…
-
0
votes0
answers75
viewsStart reading the beginning of the string list
How do I after adding a string to a list (can be on list A or B), my code goes back and starts reading the beginning of the string list, or the first string? I have a list with 20 strings. But it’s…
-
0
votes1
answer382
viewsSomatório Multithead
I am trying to make a multithread sum but the value is very discrepant: the value that should be the sum of all numbers 499500 what is being the result: 1561250 Main Class: import…
-
0
votes0
answers72
viewsHow to pass variables from JSON to Fragment in android application using TABS?
I have the following code: public class ActivityCategorias extends AppCompatActivity implements MaterialTabListener{ private List<Category> categoriesList; MaterialTabHost tabHost; ViewPager…
-
0
votes1
answer1716
viewsExtract products from an Nfe XML
I am developing a Java application that I will need to extract XML data from Nfe, Extract some data I can map the Tags as issuer recipient among others. But when I need to extract products from Nfe…
-
0
votes1
answer40
viewsHow do I adjust the views to make them small independent of the device?
I made an application where I create part of the interface in xml and part via java code, the xml part works in any application adapting the screen size. The part via code in a 7.8 inch device is…
-
0
votes1
answer482
viewsJUNIT Eclipse - java.lang.Classnotfoundexception
All my tests using JUNIT no longer work. I tried unfortunately to remove all the /bin and some other configuration files. project .classpath. OK so far was already a lot of nonsense, then I tried to…
-
0
votes1
answer65
viewsabout crud with attachment I’m not managing to make the save action
You’re using it to run a Grail action. It is the following that the action needs to save an attachment and a title to the attachment. Someone gives me links of Ruds with attachments?
-
0
votes1
answer57
viewsProblem running manually compressed jar
I was studying how to compile java straight through javac and everything else. Then I joined all the files into a zip and renamed it . jar . It didn’t work at first due to lack of Manifest - didn’t…
javaasked 8 years, 9 months ago Rodrigo Santiago 1,822 -
0
votes0
answers47
viewsWhat does the code line "var ? int : int"
Guys, I’m new in Android development and I came across a line of code like this: int animar = visivel ? android.R.anim.fade_out : android.R.anim.fade_in; Animation a =…
-
0
votes1
answer232
viewsReturn null JSP
Guys, I’m having a little bit of a problem, but it’s really pissing me off in a simple college exercise. The intention is only to make a program that receives a quantity x and a value y, and…
-
0
votes1
answer1400
views -
0
votes1
answer673
views