I tried to build a project on netbeans when this error came up:
javac: invalid target release: 1.6
Usage: javac <options> <source files>
where possible options include:
-g Generate all debugging info
-g:none Generate no debugging info
-g:{lines,vars,source} Generate only some debugging info
-nowarn Generate no warnings
-verbose Output messages about what the compiler is doing
-deprecation Output source locations where deprecated APIs are
used
-classpath <path> Specify where to find user class files
-cp <path> Specify where to find user class files
-sourcepath <path> Specify where to find input source files
-bootclasspath <path> Override location of bootstrap class files
-extdirs <dirs> Override location of installed extensions
-endorseddirs <dirs> Override location of endorsed standards path
-d <directory> Specify where to place generated class files
-encoding <encoding> Specify character encoding used by source files
-source <release> Provide source compatibility with specified release
-target <release> Generate class files for specific VM version
-version Version information
-help Print a synopsis of standard options
-X Print a synopsis of nonstandard options
-J<flag> Pass <flag> directly to the runtime system
BUILD FAILED (total time: 0 seconds)
==============================a useful answer:
Do you have JDK 1.6 installed? It sounds like you are running under 1.5. IIRC, later versions of Netbeans default to use version 1.6. To specify 1.5, right click your project, go to properties, and under sources, near the bottom of the window, change "Source Level" to 1.5. Alternatively, install 1.6 and/or configure netbeans to use it rather than 1.5.
===============================================
set the JAVA_HOME same as the eclipse default jdk
javac: invalid target release: 1.6
原创mb649d3a75b51a2 ©著作权
文章标签 netbeans debugging deprecated standards class 文章分类 Python 后端开发
上一篇:Camel中的几个重要概念之Routes, RouteBuilders 和 Java DSL
下一篇:Unable to update index for central http://repo1.maven.org/maven2/

-
maven release plugin
maven release plugin
maven git apache -
Sermant重磅更新,1.3.0 release版本发布
Sermant新增服务治理插件:消息队列禁止消费插件。
消息队列 java 服务治理 开源 -
CDATA java 内容 javac -target
概述source 指定源代码使用的最高语言特性所属的Java SE版本(同JDK版本) target 指定Class字节码可以运行的最低虚拟机版本
CDATA java 内容 source target Java 语言特性