java-7

Java/OS X Lion: Setting application name stopped working with JDK1.7

核能气质少年 提交于 2019-12-08 17:07:52
问题 I hitherto used the following code to set the Application Name (in the top "System" menu bar) on my Apple MacBook. (Actually, I think I copied this from stackoverflow.) Basically, have a seperate AppLauncher class that uses System.setProperty() to set the application name before creating a new Runnable for the app itself. Worked just fine. However, since I downloaded and started using JDK 1.7, the solution stopped working - I'm getting the Class Name instead of the App Name in the menu, just

Deploy Failed when Deploy on google App Engine (for upload on app engine)

放肆的年华 提交于 2019-12-08 12:08:52
问题 When I run project on local system, project deploy successfully and running properly but when i deploy it to Google App Engine (for upload on google app engine so every one can access site) it's failed. It's show me ------------ Deploying frontend ------------ Preparing to deploy: Created staging directory at: 'C:\DOCUME~1\MASTER~1\LOCALS~1\Temp\appcfg8421561925415091473.tmp' Scanning for jsp files. Compiling jsp files. java.lang.RuntimeException: Cannot get the System Java Compiler. Please

Java Eclipse Helios 2 Release Java SE 7 Support

随声附和 提交于 2019-12-08 11:37:00
问题 we finally have migrate into Java SE 7 in out project we been working with Eclipse Java EE IDE for Web Developers. Version: Helios Service Release 2 Build id: 20110218-0911 for some quite long. i am trying to set everything to get all the Java SE 7 new Stuff i was trying to set the Eclipse Compiler to 7 but surprise the Compiler for Java SE 6 is the last i was wondering if exists any fix or plugins to get eclipse approval my Java 7 sintax as well their support without install a new eclipse...

RxJava alternative of group by in sql

你说的曾经没有我的故事 提交于 2019-12-08 09:07:28
问题 I have a list of Student : Observable<Student> source = Observable.fromIterable(getStudentList()); I would like to group them by postal code, along with how many times they appear, but the problem is that I use java 7 how to do this? 回答1: Use groupBy , flatMap and count on the groups themselves: source.groupBy(s -> s.postalCode) .flatMapSingle(g -> g.count() .map(v -> g.getKey() + ": " + v)) ; Without lambdas it looks more ugly though: source.groupBy(new Function<Student, String>() {

Runnable JAR file error: Unsupported major.minor version 51.0

大憨熊 提交于 2019-12-08 06:52:59
问题 I made an application in Java (version 7) with Eclipse (Indigo) when I exported my application interface on a Runnable JAR file on my computer and tried it worked fine, then I tried on another computer and I get this problem Exception in thread "main" java.lang.UnsupportedClassVersionError: cliente/Princ ipal : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass

Getting some unexpected issues when analysis my GWT project with SonarQube

爱⌒轻易说出口 提交于 2019-12-08 06:44:40
问题 I have been developing an application using GWT and did a SonarQube implementation of it. But it did throw some unexpected results : bDateStart.addClickHandler(new ClickHandler(){ @Override public void onClick(ClickEvent event) { }}); Major Issue : "Rename this class" Can Someone help me with above mentioned one ? And is there a way to turn 'off' certain rules for my application ? Is this really a major issue as shown by SonarQube ? 来源: https://stackoverflow.com/questions/31228924/getting

How to get a specific number of files from a directory? [duplicate]

99封情书 提交于 2019-12-08 05:13:10
问题 This question already has answers here : How to list only N files in directory using java (2 answers) Closed last year . I want to retrieve files based on settings i have provided in a properties file. e.g. i just want to get 50 files in first iteration and stop getting all may be there are thousands of files in the folder. How can i just randomly get 50 files and do not get all list or iterate over files to get 50 ? filesList = folder.listFiles( new FileFilter() { @Override public boolean

Unsupported major.minor version 52.0 - grails

跟風遠走 提交于 2019-12-07 20:12:57
问题 I just downloaded a grails project from svn. I saw that the unsupported major.minor version is a well known problem on S.O. caused by a mismatch version of JDK used during runtime and compile time. But I am using the very same version as below: shell: JAVA Build Path: Installed JRE: Please what am I missing for still having the below error? Environment set to development [groovyc] Compiling 190 source files to C:\Users\xxx java.lang.UnsupportedClassVersionError: com/sun/tools/javac/Main :

Difference between installing an JDK and using the dump

落花浮王杯 提交于 2019-12-07 15:08:42
问题 All, I wanted to know what is the difference between installing an JDK using the installer provided by Oracle and using the JDK directory that is created after installation. Say I installed JDK7u1 using the installer from oracle on a machine M1, at the location: C:\Program Files\Java\JDK7u1 I can copy the JDK7u1 directory (including all it's sub-directories) to another machine M2 into the folder "D:\JVMs" so the directory looks like : "D:\JVMs\JDK7u1". If I set my JAVA_HOME to "D:\JVMs\JDK7u1

Downgrade open jdk 8 to 7 in ubuntu 14.04

假装没事ソ 提交于 2019-12-07 14:04:59
问题 I accidentally upgraded the whole system in ubuntu 14.04. I am trying to deploy a war file which requires JDK7. I tried to install JDK7 and use it as default root:floyd~# update-alternatives --config java There is only one alternative in link group java (providing /usr/bin/java): /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java Nothing to configure. but it is not installing as well. It gives following error while trying to install JDK 7. root@floyd:~# apt-get install openjdk-7-jdk Reading