草庐IT

read_actions

全部标签

java - 为什么 Maven javadoc 失败并出现错误 "cannot read options"?

当我运行mvnjavadoc:javadoc时,出现以下错误:[ERROR]BUILDERROR[INFO]------------------------------------------------------------------------[INFO]AnerrorhasoccurredinJavaDocsreportgeneration:Exitcode:1-javadoc:error-cannotreadoptions(Thesystemcannotfindthefilespecified)Commandlinewas:"C:\ProgramFiles\Java\jdk

java - 自动更新 Action 的 isEnabled()

我已经编写了一个SwingGUI,其中包含多个与同一Action子类关联的控件。Action子类的实现遵循以下伪代码:publicclassMyGUI{Gizmogizmo_;//DefinedelsewherepublicclassAction_StartPlaybackextendsAbstractAction{/*ctor*/publicAction_StartPlayback(Stringtext,ImageIconicon,Stringdesc,Integermnem){super(text,icon);putValue(SHORT_DESCRIPTION,desc);put

java - 无法在 Eclipse : Parent of resource is marked 'read-only' 中构建 java 项目

我正在尝试在EclipseKepler中运行一个Java项目。该产品在另一台机器上运行良好,我使用gitclone和Import将项目加载到我当前的机器上。但是,在加载项目时,我收到错误:由于“资源的父级:/Users/adam/.../mockup/bin被标记为只读”,该项目未构建。修复问题,然后尝试刷新此项目并构建它,因为它可能与模型不一致未知的Java问题如何解决这个问题? 最佳答案 我遇到了同样的问题,并通过授予对我的工作区文件夹的写入权限解决了这个问题。关于如何在Linux中执行此操作的一些提示可以在以下位置找到:Cha

java - Action 命令和 Action 类?

向那里的Swing大师大声喊叫!!我从事Swing编程已经有好几年了,但一直不清楚这一点。如您所知,Swing/AWT为您提供了几种方法来在单击按钮时执行特定操作。我已经看到它在我处理过的应用程序中以几种不同的方式完成。我目前从事的项目倾向于遵循这种方法:someButton.setActionCommand("mycommand");someButton.addActionListener(listener);--截图--publicvoidactionPerformed(ActionEventevent){Stringcommand=event.getActionCommand()

java - 使用自定义字体 [java.io.IOException : Error reading font data.]

标题不允许我说问题,所以实际的错误信息是-java.io.IOException:Problemreadingfontdata.atjava.awt.Font.createFont(UnknownSource)atAddFont.createFont(AddFont.java:11)atMainFrame$1.run(MainFrame.java:105)atjava.awt.event.InvocationEvent.dispatch(UnknownSource)atjava.awt.EventQueue.dispatchEventImpl(UnknownSource)atjava.

java - readFully 未使用 Java Nashorn Javascript 引擎定义

我正在尝试使用新的Java8Nashornjavascript引擎运行javascript脚本,但它失败并出现以下错误::1ReferenceError:"readFully"isnotdefined脚本使用应该在全局范围内定义的readFully函数nashorn在启用脚本模式的情况下运行(这是通过ScriptEngine运行时的默认设置,如此处所示http://mail.openjdk.java.net/pipermail/nashorn-dev/2013-December/002562.html)。这是重现错误的示例:importjava.io.FileNotFoundExcep

java - 在 JSTL <fmt :formatDate> action 中使用 java.time.LocalDate

我还没弄清楚如何显示java.time.LocalDateJSP中的值。在我的JSP中,我有这个:std.datum类型为java.time.LocalDate.呈现JSP时出现此异常:javax.el.ELException:Cannotconvert2015-02-14oftypeclassjava.time.LocalDatetoclassjava.util.Date我假设这是转换?那么是否可以用格式化LocalDate类的实例?行动? 最佳答案 I'massumingit'stheconversion?是的,这是一个与转换相

java - 设置 WebLogic Server 11g (10.3.6) : Native Library to read the password securely from commandline is not found 时出错

我正在尝试在Windows中为开发人员10.3.6(11g)配置我的Weblogic服务器。从自述文件中,我在以下步骤中遇到错误:CreateanewWLSdomainandstartWLS.(ItisrecommendedthatyoucreatethedomainsoutsidetheMW_HOME)Windows$mkdirC:\home\myhome\mydomain$cdC:\home\myhome\mydomain$%JAVA_HOME%\bin\java.exe-Xmx1024m-XX:MaxPermSize=128mweblogic.Server我在(C:/WebLog

java - Apache POI : API to identify tables in the excel sheet and read them

是否有任何方法可以返回工作表中存在的表格列表?我的要求是从工作表上存在的多个表中获取数据。 最佳答案 假设您正在为.xlsxexcel文件使用XSSFAPI。如果表格是由Insert->Table创建的,那么您可以使用以下命令读取它们:XSSFWorkbookworkbook=newXSSFWorkbook(newFile("test.xlsx"));intnumberOfSheets=workbook.getNumberOfSheets();for(intsheetIdx=0;sheetIdxtables=sheet.getTab

java - 在 Spliterator .tryAdvance() 的实现中使 action .accept() 超过一个元素是否有任何危险?

Spliterator的javadoc提到:ASpliteratormaytraverseelementsindividually(tryAdvance())orsequentiallyinbulk(forEachRemaining()).然后我们转到javadocoftryAdvance()上面写着:Ifaremainingelementexists,performsthegivenactiononit,returningtrue;elsereturnsfalse.也许我在某处误读了,但对我来说似乎只要有一个元素,或更多,剩下的,作为参数的Consumer应该只有每个.accept(