Questions tagged as 'java'

1
answer

How to organize the CRUD methods for each table?

I would like to know how best to organize the CRUD (create, read, update, delete) methods of each class in Java. An example, to get better at understanding: Suppose we have the Funcionario , Cliente and Produto classes....
asked by 10.06.2015 / 19:33
1
answer

"java.lang.String can not be cast to ..." using access control in Servlet

I have a system made for my company and together I have the new website. I can log into the system normally with the accounts registered in the database, but when I insert a filter in the servlet, I get the message:    java.lang.ClassCastExce...
asked by 11.10.2015 / 00:32
1
answer

How to associate / open mp3 files in raw folder?

I am with probremas with songs, whenever I add some music and I will execute some code of the error, whenever I click on the music in the raw folder a text appears, in tutorials I saw the person clicks on the song and plays it I will show photos...
asked by 22.10.2017 / 23:27
1
answer

How to format a String with other elements using format ()

I would like to know how to format a String 08041995 on 04/08/1995 using the format () method in Java PrintStream ps = new PrintStream(arq); String valor = "250,35"; ps.format("R$ "+"%s", valor); ps.flush(); I was able to in...
asked by 30.10.2015 / 21:33
1
answer

Insert data into a table from a Java form (Netbeans + SQL Server)

I have a form created so that you can enter data on a client and from that form open a button with a button that has the data, so far I have been able to make the button connection. Now my question is how can I send the form data to the table .....
asked by 03.06.2015 / 16:29
2
answers

Programming for Android with multiple screens

When I program to Android , I think of portability with the most diverse devices on the market. Seeing the layout of my Activity principal , I noticed that on small-screen devices (I did the 2-inch screen test) the views are HUGE...
asked by 06.06.2015 / 01:49
1
answer

Does Xamarin generate Java source code?

I read that with Xamarin it is possible to program in C # for example, and generate a native application Android and IOS. After programming in C #, does it generate the fonts in Java? I can after making the first version of the App, abandon C...
asked by 20.11.2017 / 19:32
1
answer

Test hibernate factory

You are giving null exception on line HibernateUtil.getFactory().openSession(); in the main method. Here are the configuration and test files: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PU...
asked by 09.04.2017 / 03:29
1
answer

Accentuation problem when consuming WebService on Windows Server

   Correction I'm having an accent issue when consuming WebService on Windows Server. I have apache-tomcat-7.0.63 installed on windows server 2008, and as SGB, PostGres 9.4 and with Java 8. The error happens when I run out of NetBeans. That...
asked by 01.02.2016 / 13:01
1
answer

Fetch of children with JPA + Hibernate is not working

I have two classes, Terminal (which is the parent) and Portaria (child). I'm using JPA and it's working, but it has a bug that I can not resolve. I load a list of Terminal and when testing t.getPortarias() it...
asked by 12.01.2015 / 20:38