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
answer300
viewsHandling components of a container
I added a frame with several components to one container. In another class I add to jPanel the data from container. In this class, is there any way I can get access to the components of this…
-
0
votes0
answers77
viewsJava function equivalent to pack("v",int) in Perl/PHP
I wonder if there is any function in Java equivalent to function pack("v",numero) of Perl and PHP. In perl/php: pack("v",numero) = unsigned short (always 16 bit, little endian byte order) In Java: ?…
-
0
votes0
answers60
viewsNo suitable driver found (Mas o driver esta la !)
Guys, I made a first application through the Caelum site in Java EE, a calendar, and all right, all right, fine, I added contacts to MYSQL quietly in the Java part of the workbook, the JDBC driver…
-
0
votes1
answer68
viewsHow can I tunnel tcp with java?
The idea is this: Create a classe that keeps an eye on us eventos of socket client and when he receives data to classe redirects to the client that is connected to app. how to do this in java?…
-
0
votes1
answer381
viewsHow to use jboss in eclipse
I installed the jbossTolls in the eclipse After I downloaded the jboss 7.1, set it up right in Servers, started it and had the jsf page rotated on it, but the 404, someone knows what it can be?…
-
0
votes1
answer581
viewsAndroid app initializing with Side Drawer Menu always open
It’s a very simple question, but how can I solve this problem? Every time I start the application it is with that side menu suspended always open. public class NavigationDrawerFragment extends…
-
0
votes0
answers68
viewsAccess to the checkbox of each Ode from a Jtree
How can I access the checkbox of each Ode of a JTree? TreePath[] checkedPaths = checkTreeManager.getSelectionModel().getSelectionPaths(); The previous code returns me all the selected paths. When I…
-
0
votes0
answers399
viewsHow to save the selected line of a Jtable in the BD?
I have a JTable which fills the database, where I can select several lines at the same time with the Boolean field that has been added. I need that when you click the "record" button on mine form…
-
0
votes0
answers52
viewsHow to use "setViewBinder" in my Adapter for Listview
How do I use setViewBinder in my Adapter? In Simplecursoradapter I can: SimpleCursorAdapter adapter = new SimpleCursorAdapter(getActivity().getBaseContext(), R.layout.lista_chamados, cursor, from,…
-
0
votes1
answer358
views -
0
votes1
answer114
viewsError reopening Map in Fragment inside Drawerlist
I’m developing an Android app and I’m having a navigation problem between Fragments. I created a drawerList and in it I have some Ragments, in one of these Ragments I have a map, when I initially…
-
0
votes1
answer610
viewsAllow the user to run the program step by step
Hello, I am in the development part of my TCC that consists of a tool to support the teaching of graphs (more precisely of some algorithms, as Traveler Clerk, Minimum Generator Tree, etc...) and…
-
0
votes1
answer815
viewsReturning null when trying to display an image in p:graphicImage of Primefaces
I have an error trying to show a photo in the component graphicImage of the Primefaces. The photo can be in Base64 or Bytes. I’m using Primefaces 5.0 and JSF 2.2. .xhtml <p:dataTable…
-
0
votes1
answer140
viewsCustomer Rest/Erro no doInBackground()
Apparently there are no errors in the codes, but I don’t know why you’re pointing out an error in the method //if (log.loginstatus(user,pass)=="1"); Unless mistaken there is no method in the…
-
0
votes1
answer189
viewsHow to ensure that all threads have run?
How can I guarantee that the get method of a Futuretask will only be called when all threads have already run? I have this method : for (int j = 0; j < threadNum; j++) { FutureTask<Integer>…
-
0
votes0
answers98
viewsIs it possible to select graphics card?
I am wanting to create a small web program where I need to select a video card. It is a software for displaying music on projector. As the PC will have two boards one will only show on projector.…
-
0
votes1
answer458
viewsHow to browse Hashmap with subkeys?
How to walk a HashMap who owns another HashMap? for (Map.Entry<Date,HashMap<String, Integer>> entrada : m.entrySet()) { // .... }…
-
0
votes0
answers88
viewsInserting records into the database only after the insertion into a List
I do not know if I was very specific in the title, but I will try to be more in the description. I have in my database a table of Disciplines that contains: id name workload I would like these…
-
0
votes2
answers142
viewsCalling the same condition in the code
//Função para verificar existência de conexão com a internet public boolean verificaConexao() { boolean conectado; ConnectivityManager conectivtyManager = (ConnectivityManager)…
-
0
votes1
answer113
viewsSimplejaxwsserviceexporter - Baseddress
I created a web service with JAX-WS and used Spring to put it online and also to decrease the use of XML. Problem is that when I declare the Simplejaxwsserviceexporter in the Spring configuration…
-
0
votes2
answers5728
views -
0
votes1
answer1201
viewsDynamic notifications, through parameters, on Android
I want to create a dynamic notification on Android, where I can change the title and the text that is displayed, through parameters. I’m actually doing it this way: Home class. @Override protected…
-
0
votes1
answer99
viewsChange of entity reflect on related entities
I have two entities, for example: Note: Fictional code to facilitate understanding of the problem. @Entity public class Celular{ @Id @GeneratedValue(strategy= GenerationType.IDENTITY) private int…
-
0
votes1
answer1738
viewsFill Progressbar in Javafx
I’m seeing Javafx, I’m having doubts about using Progressbar. How do I Fill Progressbar while another parallel operation occurs.?
-
0
votes0
answers142
viewsLocking system after image upload
People in my system, I upload a certain image, the image is saved in a directory and then saved the product in the bank, until then certain td, the problem is that after saving the product the…
-
0
votes1
answer147
viewsPost Too large - Glassfish
I’m performing a routine search on all occurrences that have already been concluded, but when I enter one and select the attachment mine glassfish returns the following message…
-
0
votes3
answers3183
viewsHow to return the instance of a class in Java
Can anyone tell me how to return an instance of a class in Java? I have a Server class, I urge the class so turning into an object. And u want to return an instance to another method main, without…
javaasked 9 years, 8 months ago Leonardo ferreira villela mart 17 -
0
votes2
answers5266
viewsI can’t remove the title bar from the android app
I’ve tried using android:theme="@android:style/Theme.NoTitleBar", but when I run my app it gives error.
-
0
votes0
answers77
viewsAndroid - Windowmanager
See the layout above with a default home screen of a mobile phone. See that I highlighted the default screen of the phone with a text (Shadow Effect) and two notifications android (view1 and view2).…
-
0
votes0
answers47
viewsaction menu with radio button
I’m having problems with this code, I want the radio Buttons to appear for choice in a popup after pressing in parameters, only that’s not happening this, @Override public void…
-
0
votes1
answer1256
viewsError trying to connect to a local Mysql database
I am having problems trying to access a local Mysql database, I am following this tutorial. My file MysqlConnect.java: package br.com.alerts; import java.sql.Connection; import…
-
0
votes1
answer285
viewsIntersection and Subtraction Groupings
I have a question regarding regular expressions. I do not understand how intersection and subtraction work in regular expressions. Could someone enlighten me? [a-z&&[aeiou]] Interseção…
-
0
votes1
answer94
viewsHow to make three buttons work as radio button?
I wonder how to make three buttons work as "radio button". By clicking the button it changes color and executes command, by clicking another button changes color and another normal turn.…
-
0
votes1
answer569
viewsAndroid: Error Running Application
I noticed that using the shortcut Alt+Insert and selecting for him to give me the constructors, he tries to create a constructor with each property private (cManager and mTextView). I remember that…
-
0
votes0
answers36
viewsStandard for Boleani methods
Dear, which pattern should I use to name methods that return a bolean (true or false) ? For example, I have a method that checks if the invoice is overdue. Possible names I thought: Billed Invoice…
-
0
votes1
answer364
viewsProblem with android/java camera
When opening the Camera or trying to get photo from the album the Internet that calls these functions ends, I call with: Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE); File f = new…
-
0
votes1
answer68
viewsProblems with Asynctask in second Activity
I have a app which must carry out the following procedure: Main_Activity has a button, that when clicking, directs to a second Activity (Checkdata). This, in turn, has a textbox which obtains data…
-
0
votes0
answers267
viewsImageview Android Responsive for all devices
I have an Imageview and the problem is this: On smaller screens the image gets too big; on larger screens, it gets too small. I’ve made the folders hdpi, xhdpi and similar, but no good, I wanted to…
-
0
votes4
answers784
viewsBreak an integer into small parts in Java
I need to place each digit of an integer in a vector position. int a = 123; List<Integer> numerosGerados = new ArrayList<>(); And now I need to put the number 1 at the 0 position of the…
javaasked 9 years, 7 months ago Dan Lucio Prada 772 -
0
votes2
answers424
viewsHow do I display a jPanel when I place my mouse over a certain region?
Hello, I would like to know how to create an algorithm in Java to display a certain Panel within my Form Jframe, as soon as the user positions the mouse cursor on a certain pre-programmed region,…
-
0
votes1
answer81
viewsWhen deleting a character, how do I execute something?
I am using this method to delete the last character typed in a TextView: texto = txtTexto.getText().toString(); int length = texto.length(); txtTexto.setText(texto.substring(0, length - 1)); But…
-
0
votes1
answer366
viewsFile . class is not generated
I have already tested, through the command prompt, and java and javac are installed. The problem is that the file .class is not created. By typing the directory I can find the folder, but not the…
-
0
votes1
answer342
viewsFetch data from a particular column and display them in a Spinner
I’m searching for the Sqlite database records and displaying on a Spinner, but Spinner is displaying all the table records, and I need to display only the records of a particular column . I tried to…
-
0
votes4
answers1762
viewsAdd element in List (Arraylist)
I’m having trouble adding values that are in a list called Processes to the Aptos list. Always shows only the last process, and in duplicate form. Still removes all previous processes. Code below:…
-
0
votes3
answers7458
viewsFrameworks for Java reporting
Good morning. I wonder if besides Jasperreports with iReports there is another reporting framework that you would recommend to me. What would it be? I need at least 2 frameworks, one of them I…
java framework report ireport jasper-reportsasked 9 years, 7 months ago Giancarlo Abel Giulian 3,999 -
0
votes1
answer56
viewsArgument when initializing Weka
In the Download page of Weka there is a recommendation to initialize the. weka jar file with the following argument -Xmx1000M. But I don’t understand what the argument will change the moment Weka is…
-
0
votes2
answers2691
viewsDisplay an image that is outside the JSF project
Hello I have a screen that uploads a file and saves in a folder in a directory of the computer until and saved in the database the complete path of the image, now I want to display this image in a…
-
0
votes1
answer86
viewsArray Out of Bounds reading File
I’m having a problem with my code, in my text file I should read the last line is blank, and then it should not be read, however I’m getting out of Bounds. Line for example file:…
-
0
votes1
answer82
viewsDemoiselle-Nimble: Error generating CRUD Vaadin
I’m using the class below, Banco.java, below: @Entity public class Banco implements Serializable { private static final long serialVersionUID = 1L; @Id…
-
0
votes2
answers131
viewsHow to load multiple records into a Combo?
I need to create a functionality for a system that one can select multiple records in a Combo, but the problem is that I am loading over 5000 records and the browser is crashing. Is there any way to…