java

java

  • All Sites

0 answers

Java URLConnection timeout under VPN(Junos Pluse) enviroment

I use Pulse to connect a https website. I can use browser to open the website, if I config the browse with "Use system proxy settings". The problem is when I use java code, neither URLConnection nor ...

0 answers

Custom bidirectional bindings in JavaFX

I'm trying to implements a GUI involving a computation of 2 fields. My model has 2 properties and one binding. ObjectProperty<BigDecimal> price = new SimpleObjectProperty<>(); ...

1 answer

Main Class Not Found when Compiling Hadoop Sample Program

Hi i'm new to Hadoop and just started learning a couple days ago. I just followed the instructions from Digital Ocean to setup a Hadoop cluster. Afterwards I just tried a simple example program called ...

0 answers

I need help on how to minus out the value in an object with a random number that is given

I need help on how to minus out the value in my object which is (25) when a random number (num) has been generated. I have written my code below but there seem to be a problem in my last line. ...

5 answers

String to Object typecasting - Difference

What is the difference between. public class Test { public static void main(String args[]) { String toBeCast = "cast this string"; A a = toBeCast; // error - Type mismatch: ...

2 answers

Cannot communicate with Fragment correctly after orientation change

I am having some trouble figuring out the proper way to communicate between fragments when using a FragmentPagerAdapter. For some context I have an Activity that uses the FragmentPagerAdapter to host ...

1 answer

How do I multiply columns of a 2D array? Java

Previous methods construct and fill a 2D double array with a size defined by user input. computeCategoryAverages takes the middle indexes, averages them, then puts them in the final index ...

0 answers

Cannot authenticate against a dayabase

am using eclipse IDE, oracle 10g DB and oracle webLogic server i am trying to create a servlet to authenticate a user against Database records (log in page) the table creation code is CREATE ...

1 answer

FileEntry.getContentType() needs to be closed?

Lets assume I have an com.liferay.portal.kernel.repository.model.FileEntry instance fileEntry that I'd like to copy. I can achieve this using ...

1 answer

Google App Engine DataNucleus 3.1.1 Unexpected Exception Error

Trying to find a way to get rid of this error on eclipse. DataNucleus Enhancer (version 3.1.1) : Enhancement of classes Encountered a problem: Unexpected exception Here is the log ...

0 answers

Registering a custom Jackson Serializer for JDK classes globally?

I have been using Jackson for a long time now with RestEasy and registering custom serializers with no problem. What I am having a hard time finding is how to globally register a custom serializer ...

0 answers

Java Swing: How to keep parent window open after closing JFileChooser

After opening a JFileChooser from a button in a window, the File Chooser opens, then the original window closes. I would like to keep that original window open throughout when the user is using the ...

1 answer

Pre-populating Entities into database for testing purposes

I'm developing a Java EE 7 application. For testing purposes, it'd be very beneficial to populate the database with some content. This tutorial explains how you can create the database content at or ...

1 answer

Selenium/Java:Where does the “helper” method get placed within a test script?

I'm new to automation, and programming, for the most part. I have a test script where I have to verify the presence of certain elements within a page I am testing. At the moment, I have multiple ...

1 answers | 8 mins ago by kevin on Stack Overflow stackoverflow.com
2 answers

Unable to start mule-standalone-3.5.0 server in my local system

I am unable to start mule standalone server 3.5.0. in my Windows7 PC. My java version installed is "1.6.0_45" and it is 64 bit. I have set the Path, JAVA_HOME, MULE_HOME environment variables in ...

2 answers | 9 mins ago by Jitendra on Stack Overflow stackoverflow.com
0 answers

Convert WebSphere to Liferay project

Currently, I'm migrating my WebSphere project to a Liferay project in Eclipse. I have IBM portlets and JSR 168 portlets. I'm using Eclipse Kepler with Liferay IDE 2.2, but there is no option to ...

2 answers

Clarification on generic class declaration

Please explain what's the difference between these 2 definitions: public class Box<T implements Comparable<T>> and public class Box<T> implements Comparable<T>

1 answer

Exception in thread “main” java.lang.StackOverflowError issue

i need your help. i dont know why my code fails when the dimention is 10 and the dirty slots is 11 please help. package Strategies; import java.util.LinkedList; import java.util.Queue; import ...

2 answers

Drop into Java program window

I have a problem, and don't know where start. I want to drop files (only .zip) from any place in windows into a Swing application (into a JList). How can I do this? In the list I will display only ...

2 answers | 15 mins ago by Gwalk on Stack Overflow stackoverflow.com
0 answers

VSS shadow copy error

Been searching hi and low but not able to get any solution. We are runnin vss shadow backup on Windows Server 2012 Datacenter R2 and found the below error. Appreciate any suggestions/help. ERROR: ...

1 answer

list of any collection type, also with a generic data type

I'm trying to modify the class below so its functions accept any from of collection the data type of those collection is also generic, allowing for maximally flexible: public class Container<E> ...

1 answers | 16 mins ago by Noor Thabit on Stack Overflow stackoverflow.com
1 answer

Netty java getting data from ByteBuf

How to get a byte array from ByteBuf efficiently in the code below? I need to get the array and then serialize it. package testingNetty; import io.netty.buffer.ByteBuf; import ...

1 answers | 16 mins ago by NiceTheo on Stack Overflow stackoverflow.com
0 answers

Java Signature.verify results in SignatureException: Signature encoding error Caused by IOException: Sequence tag error

first of all this is not a duplicate question as most people report this exception when creating a Public Key from a Certificate which is missing "---BEGIN RSA CERTIFICATE---" line. gist of what I ...

0 answers

Play Framework, OneToOne relationship not working

I am using Play Framework(Java flavor) for a project. In this project I have two models which I would like to create a OneToOne relationship between. I have a User model and a UserLegalName model. ...

0 answers

Cannot retrieve the latest update value from database after running the ORM Lite UpdateBuilder.update() in android

I have trouble when updating the data in android by using ORM Lite because my updated data is not affected in database immediately. After the update process, I query the data from the database but I ...

0 answers

How to use java libraries in python processing

Im using processing in python mode but I want to use the processing library sound. But I dont know how to import this into my program in python syntax. In java its like this: Import ...

1 answer

Efficient way to find how many neighbouring elements with a specific value there are around a particular element in an array

If I have a 2D int array called myArray that is for example 3x3 size and its elements can only have either 1 or 0 for values, what would be an efficient way to calculate how many 1s there are around a ...

1 answers | 27 mins ago by echoeida on Stack Overflow stackoverflow.com
1 answer

Taking user input and assigning it to object

I'm using the scanner to take user input and assign it to an object. I know string is an extension of object class so it should be a simple assignment. Here is what I've tried. string name = ...

1 answers | 28 mins ago by Will on Stack Overflow stackoverflow.com
0 answers

Spark UnsupportedOperationException: empty collection

Does anyone knows possible causes of this error while trying to execute spark mllib ALS using hands on lab provided by Databricks? 14/11/20 23:33:38 WARN Utils: Set SPARK_LOCAL_IP if you need to bind ...

0 answers

How to integrate molpay with java

how to integrate payment gateway(molpay) with java Spring .i don't know about payment gateway(molpay)..i want to know from basic steps on-words payment gateway(molpay) integration examples..how ...

15 30 50 per page
1 2 3