java

java

  • All Sites

2 answers

equals() method and == are equal or not equal?

I know that Object.equals() compares the value of object in heap memory. and == compares the references. But when I am running my code I am getting both as equal. public class test3 { public …

2 answers | 1 min ago by user2363747 on Stack Overflow stackoverflow.com
3 answers

Is it possible to have an immutable list as the value field inside an Immutable map in java?

I have a method that returns an immutable list, and I want to create an immutable map that has string as the key and the list returned above as value. Is this possible ? Is there a working example of …

3 answers | 2 mins ago by Shan on Stack Overflow stackoverflow.com
0 answers

I cant view data in JTable From a custom table model

Here is my code. Object[][] refreshCartonCodesToTable = dbutils.checker.CartonCodesToTable(); String[] colnames = new String[6]; colnames[0] = ...

0 answers

NullPointerException while listview fills

I have MainActivity class where I parse an HTML page with JSOUP and I also have custom adapter which store data for each row in my ListView. So I get data with JSOUP and it's ok as my LogCat tell me. …

1 answer

Android basic TTS engine from audio file

I have an mp3 file hello.mp3. I am wrapping the mp3 into FileInputStream and converting the input stream to bytes, then pushing the bytes to SynthesisCallback.audioAvailable(bytes,offset,length) but …

0 answers

ConcurrentModificationException when I iterate on ArrayList

I want to iterate on an ArrayList called localWifiList that contains the wifi networks detected by a wifi scan. For every element of the ArrayList I want to run a query to get all tuples in the ...

0 answers

URLEncoder limits the response of the server

I have the following problem.. when I hardcoded a url query which is like example : ...

1 answer

compile java variable error

i am trying to build android, with a small addition, but i gave me the following errors: packages/apps/Settings/src/com/android/settings/cyanogenmod/ProgressBar.java:144: cannot find symbol ...

1 answers | 4 mins ago by OwnDroid on Stack Overflow stackoverflow.com
1 answer

Why is android converting my base class to it's parent class when i put it as an extra?

I have a class which just helps me to save time so i don't always have to write the long class name: public class ImageBucket extends ArrayList<LoadableGeoLocationImage> implements ...

1 answers | 5 mins ago by Laubi on Stack Overflow stackoverflow.com
0 answers

what is use of hibernate.reveng.xml and i dont knows how to setup hibernate in my swing project?

anyone give me solution that is details of my hibernate configuration error is: Exception in thread "main" java.lang.NoClassDefFoundError: org/dom4j/DocumentException at ...

1 answer

Editing existing pdf in Java

I'm testing Java lib to edit existing pdf but the issue is that a can't load my existing pdf. I have the same result with iText and pdfbox, I can load the file the data seems here(pdf weigh ko) but …

0 answers

how to config hadoop and Spring

I Create a spring program for integrate hadoop and spring. But i Could not able to access the hadoop machine. I followed ...

0 answers

Remove column mapping extending MappedSuperclass

I need to extend a @MappedSuperclass entity in my JPA application, and I need to override some column mappings. I found that I can change column name mappings by @AttributeOverride annotation, but I …

1 answer

Merge sorting for solving a task

I have an ArrayList with size of order 10^5. I want to count the pairs of numbers in the line, Pi and Pj, where that Pi is ahead of Pj in the line and Pi has a larger value than Pj. CODE public void …

1 answers | 7 mins ago by Singapore on Stack Overflow stackoverflow.com
0 answers

Can I use different Jasper Report libraries/versions in a single J2EE project?

I am currently working on a J2EE project (JDK 1.5, GlassFish 2.1 for Java EE 5) which currently uses jasperreports-1.2.6.jar. I am tasked to upgrade it to a later version (jasperreports-5.6.0.jar). …

0 answers

Debugger does not attach itself to remote target if shell script is run before in IntelliJ

I need to start a Java application with a shell script in order to attach the remove debugger to it later (No generally, but this particular application). The arguments when running the .jar in the …

0 answers

Swipe between content in tabs

I want Android application programming like this https://play.google.com/store/apps/details?id=com.cvte.brochures Problems I used sherlockactionbar and I want to swipe between pages within tabs Like …

1 answer

SSLException: Received fatal alert: illegal_parameter after Java 1.7 upgrade

Tomcat 7 upgrade from tomcat 5 while connecting to LDAP gives error : main, READ: TLSv1 Alert, length = 2 main, RECV TLSv1 ALERT: fatal, illegal_parameter main, called closeSocket() main, handling …

1 answers | 11 mins ago by user2193288 on Stack Overflow stackoverflow.com
0 answers

Portecle software converting from pem to bks - install error NoClassFoundException

I want to use .pem format certificate and .pkey key in order to create a socket SSL in android. Unfortunately, I found at this post that android prefers a different format, the BKS format. As ...

2 answers

How can I read file from classes directory in my WAR?

I need to read text file from the classpath in Java WAR application. How can I read it as InputStream. File is located in /WEB-INF/classes/ folder, but when I use following code, it just returns null. …

2 answers | 12 mins ago by newbie on Stack Overflow stackoverflow.com
0 answers

Datanode deamon not running on Hadoop 2.5.0

I'm setting Hadoop 2.5.0 on a single machine, I'm having problem with the datanode that is not running as shown by the jps command's output: $ jps 3404 Jps 2661 NodeManager 2606 ResourceManager 2484 …

0 answers

javax.persistence.query.timeout for extended periods

For JPA connections, I can set a timeout so that between queries the connection will stay open? <properties> <property name="javax.persistence.query.timeout" value="3000"/> ...

0 answers

Format number with javax.script

I've just upgraded to java 8. Previously I was using the nashorn script engine and the following would work: engine.eval("format('%04d-%02d-%02d', 1966, 07, 18);"); Now I get: <eval>:1 ...

0 answers

How to write a output file in java using GDAL library?

public class Learn { public static String getFilename(){ String strFilename = ""; Scanner scnr = new Scanner(System.in); System.out.print("Enter the file path: "); …

0 answers

Sending a value (id for example) from one servlet to another (jsp+servlet+mysql)

I have two tables an AFFILIATE (idaff(AutoIncrement),name,address,..) and his COTISATION(id,value,..) I made two separate jsp forms and two separate Servlets, each one collects info from a jsp …

3 answers

Java Eclipse random number

Hello I have created this program and it works fine its just that its too wonky and huge so I was wondering if anyone knew how I could shorten the program so I didn't have to put all of these into ...

3 answers

Reading a text file in war archive

I am trying to read a text file from my war archive and display the contents in a facelets page at runtime. My folder structure is as follows +war archive > +resources > +email > +file.txt I try to …

3 answers | 16 mins ago by Peter Edike on Stack Overflow stackoverflow.com
2 answers

Shuffling a deck of cards until getting a specific number

I'm still new at this and I am having a hard time in this project. I need to shuffle the cards and get the first four cards and computing the sum of the four cards. I've done this task so far. Now my …

2 answers | 17 mins ago by BeEasyImNoob on Stack Overflow stackoverflow.com
0 answers

JAVA heap size monitoring on Linux

I am looking for a way to pull heap sizes (min, max, used) from a Java process on Linux. I need a lightwaight tool/command to use to do the job. Big monitoring packages are not an option. I done ...

0 answers

Should I embed 32 and 64 bits of lib for architecture i386 and x86_64

I have a xcode project I compile under architectures 32 and 64 bits (my ARCHS variable has the value i386 x86_64). I need to use a library to launch a Java 7 VM with JNI (say libinstrument.dylib). …

15 30 50 per page
1 2 3