java-7

How to use keytool in Oracle JDK 7 in ubuntu?

那年仲夏 提交于 2019-12-05 07:28:29
问题 I need a MD5 certificate to use in MapView in android. I have JDK 7 from Oracle installed. But running keytool -v -list -alias alias_name -keystore my-release-key.keystore is not giving me the result, instead it says to install openjdk. How to use the keytool in oracle jdk 7. And i am on ubuntu 12.04 64 bit. 回答1: You can use keytool by doing this: cd /usr/lib/jvm/jdk1.7.0/bin ./keytool -v -list -alias alias_name -keystore my-release-key.keystore Keytool is not in your path by default, but it

How to work with SVN 1.7 repositories using Netbeans 7.1?

浪尽此生 提交于 2019-12-05 06:47:09
When trying to update a subversion working copy from Netbeans, I get the following error svn: E175002: Unable to connect to a repository at URL 'https://svn.XXX.de/svn/[RepositoryName]' svn: E175002: OPTIONS of 'https://svn.XXX.de/svn/[RepositoryName]': Server certificate verification failed: issuer is not trusted (https://svn.XXX.de) Additionally I get a popup window saying SVN command returned with the following error: javax.net.ssl.SSLProtocolException: handshake alert: unrecognized_name I know about this issue and I successfully made a svn checkout using TortoiseSVN. I permanently accepted

Java: Thread producer consumer what is the most efficient way to wait for data to be produced

陌路散爱 提交于 2019-12-05 06:37:45
When using BlockingQueue to consume data that is produced what is the most efficient method for waiting for the data to appear? Scenario: Step 1) The data list will be a data store where timestamps are added to. These timestamps are required to be ordered by closest to current time priority. This list may be empty. A thread will be inserting the timestamps into it. Produce Step 2) I want to consume the data in here in another thread that will take the timestamps from data and check if they are after the current time. Consumer then Produce Step 3) If they are after the current time then send

Eclipse 3.5 and Java 7

久未见 提交于 2019-12-05 06:01:42
Is there any way where I can increase the Java Compiler Compliance level of Eclipse 3.5 to 1.7. (i.e.) By adding a plugin/add-on. Since by default this will not support the JDK 1.7 compliance. We have a constraint in Eclipse upgrade, since it's an RCP application. Any thoughts on this will be greatly appreciated. Thank You. Old eclipse version doesn't support java 7. You will have to download at least eclipse-3.8M1 version. To conclude, there is no way to enable Java 7 Compliance in Eclipse 3.5. Have to migrate to 3.7 at least. Thanks a lot for your responses. Windows --> Preferences --> Java

How to copy a directory with its attributes/permissions from one location to another?

北城以北 提交于 2019-12-05 05:38:38
问题 I see a lot of examples that use Files.walkFileTree() to copy a directory and its contents from one location to another, but they fail to take the directory's file attributes and permissions into consideration. Meaning, they just invoke Files.createDirectories() without any attributes or permissions. How does one copy a directory (and its contents) from one location to another without losing file attributes or permissions, using the Java7 core classes? 回答1: Answering my own question: /** *

Unsupported Class Version Error

梦想的初衷 提交于 2019-12-05 05:25:37
While trying to call an EJB made using NETbeans (using jdk1.7) from a client made using Eclipse IDE (using jdk1.6), I am getting following error- Exception in thread "main" java.lang.UnsupportedClassVersionError: stateless/TestEjbRemote : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java

Is MiGLayout going to be included in Java 7?

徘徊边缘 提交于 2019-12-05 02:22:45
All I could find so far is this (open) Sun bug/RFE entry with 426 506 votes: http://bugs.sun.com/view_bug.do?bug_id=6530906 It's in third place in the list of RFEs . Tons of people have stated that it will be included in Java 7...but does anyone have any clear information on whether MiGLayout will be included? Answered Well, it seems Chad has a point - it's not on any official list anywhere, and time is sure ticking away, so unless something big happens, it's safe to say MiGLayout apparently will not be included in Java 7 , literally in spite of 426 votes from the community. Too bad. Chad

Java 1.7 + JSCH: java.security.InvalidKeyException: Key is too long for this algorithm

雨燕双飞 提交于 2019-12-05 02:03:25
I'm trying to use JSCH to upload a file to a remote SFTP share. Every time I attempt to connect to the share from within my code, I get an exception that looks something like this: com.jcraft.jsch.JSchException: Session.connect: java.security.InvalidKeyException: Key is too long for this algorithm at com.jcraft.jsch.Session.connect(Session.java:558) ~[jsch-0.1.51.jar:na] at com.jcraft.jsch.Session.connect(Session.java:183) ~[jsch-0.1.51.jar:na] I've seen posts that describe this error when upgrading to Java 8, but we're still on Java 7, and I don't know enough about Java's cryptography support

Eclipse CVS extssh broken under Windows 7 + Java 7

邮差的信 提交于 2019-12-05 02:02:38
问题 I'm running Windows 7 64-bit. After installing Java 7 (part of PS3 media server) when I was previously using Java 6, my Eclipse (Indigo Service Release 2, Build id: 20120216-1857) CVS stopped working to the server that's on a VPN. I connect using Cisco AnyConnect VPN Client Version 2.5.2019. The error I get whenever I try to connect to a repository is the following: Could not connect to :extssh:username@example.com:/cvsroot/username/project: CVS communication error: org.eclipse.team.internal

Dependency Injection in a Java 7 standalone application

假如想象 提交于 2019-12-05 01:40:58
I would like to use dependency injection in a large Java 7 standalone application, but I am not really sure where to start. I have written a small test application: public class Main { @Inject MyInterface myInterface; public static void main( String[] args ) { Main m = new Main(); System.out.println(m.myInterface.getMessage()); } } with an interface: public interface MyInterface { String getMessage(); } and an interface implementation: @Singleton public class MyInterfaceImpl implements MyInterface { public String getMessage() { return "Hello World!"; } } The pom.xml contains one dependency: