首页 > 编程语言 >javac: invalid target release: 1.6

javac: invalid target release: 1.6

时间:2023-07-02 14:33:25浏览次数:51  
标签:files 1.6 invalid class source release where Generate Specify

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

标签:files,1.6,invalid,class,source,release,where,Generate,Specify
From: https://blog.51cto.com/u_16174476/6605238

相关文章

  • 11.6 throw 关键词
    demopublicclassJavaDemo{ publicstaticvoidmain(Stringargs[]){ try{ thrownewException("自己抛着玩的"); }catch(Exceptione){ e.printStackTrace(); } }}面试题:请解释throw,throws的区别?1.throw是在代码块中使用的,主要是进行手工异常对象......
  • Media Player Classic - BE MPC-BE 1.6.8 2023.7.1
    MediaPlayerClassic-BEMediaPlayerClassic-BE是一个免费的多媒体播放器,是MediaPlayerClassic(MPC)的一个分支。它提供了许多功能和改进,以增强用户体验和播放器的性能。以下是MediaPlayerClassic-BE的一些特点和功能:多种音视频格式支持:它支持许多常见的音频和......
  • System.Data.SqlClient.SqlException (0x80131904): Invalid object name 'Person'.
    @@abpMicrosoft.Data.SqlClient.SqlException(0x80131904):Invalidobjectname 请求接口报错:System.Data.SqlClient.SqlException(0x80131904):Invalidobjectname'Person'.无效的名称:Person数据库没有这个表,或者这个字段处理;检查数据库是否有改表或该字段......
  • Apache启动报错:Invalid command ‘ProxyPass‘, perhaps misspelled or defined by a
    配置文件httpd,问题出在ProxyPass这个环节:ProxyPass/vict_servicehttp://localhost:8080/vict_service也就是要为/vict_service这个请求路径匹配一个实际可用的路径,既然提示ProxyPass命令无效,那么肯定是某个地方的设置问题。解决的方法就在httpd这个配置文件里,找到以下两条......
  • 高效联调,可靠发布!华为云推出CodeArts Release发布管理服务
    在项目研发迭代的过程中,为了提升产品的竞争力,应用的部署上线尤为频繁。但如此高频的发布特性,不仅是对产品的质量考验,也对发布的颗粒度、范围等策略控制提出了更高要求。软件开发中的发布管理,是通过一定的计划和策略设置,将软件从开发环境转移到生产环境的过程,在发布过程中根据可视化......
  • VS Debug&Release
    你也可以像Debug一样调试你的Release版,只要加入调试符号。在Project/Settings...中,选中Settingsfor"Win32Release",选中C/C++标签,Category选General,DebugInfo选ProgramDatabase。再在Link标签Projectoptions最后加上"/OPT:REF"(引号不要输)。这样调试器就能使......
  • vue列表页返回数组错误Invalid prop: type check failed for prop "data". Expected A
    一个vue列表页接收后端数组时是这样写的:this.list=response.data返回如下错误:Invalidprop:typecheckfailedforprop"data".ExpectedArray,gotObject意思是希望返回一个数组但实际得到一个对象Object,网上大多是初始化userList=[]或userList=null解决的,但......
  • Eclipse3.6 + Tomcat7 + Jdk1.6配置
     Eclipse3.6+Tomcat7+Jdk1.6配置管理Eclipse上的tomcat的插件SysdeoEclipseTomcatLauncherpluginhttp://www.eclipsetotale.com/tomcatPlugin.html-----正文开始----一直以来都是很容易的将eclipse与tomcat结合使用,但是最近想试用tomcat7的时候,却突然发现eclipse将web服务......
  • Invalid character found in the request target [/api/hsFile/download?filePath=E:
    java.lang.IllegalArgumentException:Invalidcharacterfoundintherequesttarget[/api/hsFile/download?filePath=E:\\%E4%B8%B4%E6%97%B6%E6%96%87%E4%BB%B6&fileName=N230508A0002.xlsx].ThevalidcharactersaredefinedinRFC7230andRFC39861、原因:/a......
  • mysql - #1067 - Invalid default value
    mysql中无法设置默认值为函数或者表达式,如果你强制设置时,就会报错误:#1067-Invaliddefaultvalue。这不是mysql的bug,而是故意这么设计的。参看:http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html这里写道:"TheDEFAULTvalueclauseinadatatypespecification......