Questions tagged as 'java'

3
answers

I can not run a Java class from the Windows 10 cmd

I have created a classe that I need to execute from the Windows cmd, but there is no way to execute it. I have updated java, I have tried a thousand different commands, but whatever happens, the error is always the same:    Error: the main cl...
asked by 17.09.2017 / 19:42
2
answers

Close JFrame when I open another

I have a JFrame "1" with a button that opens another, when I press the button and the JFrame "2" opens, I want the JFrame "1" to close. I have tried to do it in the following ways: But they have not worked for me.     
asked by 21.09.2017 / 19:43
1
answer

How can I invest a Layout? [closed]

What I want is to invest a Layout (that looks around) , so they have an idea is something like this:     
asked by 21.09.2017 / 20:52
1
answer

Create a txt file on Android in a public way? [closed]

How to correctly use getExternalStorageDirectory () to create text files that can be viewed by the user. Regardless of whether I have an external memory or not.     
asked by 22.08.2017 / 23:58
2
answers

Error java.lang.ClassCastException: java.lang.String; can not be cast

I do not understand why the error, please help. public ArrayList EvaluarPatronFiguras(Image Imagen) { ArrayList ListaResultadoRegiones = new ArrayList(); aImagen=Imagen; //convirtiendo imagen a matriz CmatrizTransformacion oTra...
asked by 24.08.2017 / 00:05
2
answers

Differences between java.util.Date and java.sql.Date

I would like to know what is the difference between the objects java.util.Date and java.sql.Date , also if I am creating an application using Hibernate JPA which of these objects should I use to save my dates. I must say that m...
asked by 28.08.2017 / 20:43
1
answer

Postgresql database backup from java

In the view I have a text field in which I indicate the address where I will save the file next to the name that I want to place it. String direccion = vista.txtFileRespaldar.getText(); This is converted to type file in the following...
asked by 26.08.2017 / 22:27
1
answer

Problem with arrayList data in Java

I have discovered a problem in the execution of my code and I have no idea why ... It turns out that I have a for to enter data of 2 students, all perfect entering the data but when viewing it with the method toString (), I visualized all the da...
asked by 26.08.2017 / 16:59
3
answers

User Permissions - Jsf - PrimeFaces

Hi. I have the following case, I need to enable or disable components of PrimeFaces taking into account the permissions assigned in the Database, most examples are by pages in this case I need to control the components for example: I have a...
asked by 08.08.2017 / 15:23
1
answer

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3

As much as I tried to identify the error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3 and I could not find it. My code is: import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public c...
asked by 07.08.2017 / 20:05