NetBeans的不再生成code JAR文件,它用于 [英] NetBeans is no longer generating a JAR file for code that it used to

查看:207
本文介绍了NetBeans的不再生成code JAR文件,它用于的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两年前,我用Java写了一个简单的小程序的上传,使用NetBeans开发。当我第一次打清理并生成那时候,以及以后的一段时间,它的工作完美。这将通过构建流程运行并产生一个JAR文件,我可以再上传到我的Web服务器,以及小程序伟大的工作。

现在,因为我要回去,使一些轻微的修改,该applet,它不再生成JAR文件时,我打干净,放大器;建设。我做了实际的code变化是如此分钟,我可以保证,他们将对此没有轴承(字面意思只是改变了一些字符串的内容)。我知道,因为当时我最初建该applet我的NetBeans已经升级了自己几次(现在我在6.9.1版本),所以我不知道,如果新版本,现在不知何故车。

不知道这会有所帮助,但这个类是自签(在项目属性的网络启动选项卡),低于我已经包含了干净,罐子窗格的输出NetBeans上的底部。我注意到,它说 JAR ,然后不说别的但跳过权 BUILD SUCCESSFUL 。我假设的东西应该有之间发生?

 初始化:
DEPS清洁:
更新属性文件:C:\\的NetBeansProjects \\ MyApplet \\建立\\ built-clean.properties
删除目录c:\\的NetBeansProjects \\ MyApplet \\构建
清洁:
在里面:
DEPS-JAR:
创建目录:C:\\的NetBeansProjects \\ MyApplet \\构建
更新属性文件:C:\\的NetBeansProjects \\ MyApplet \\建立\\ built-jar.properties
创建目录:C:\\的NetBeansProjects \\ MyApplet \\建立\\班
创建目录:C:\\的NetBeansProjects \\ MyApplet \\建立\\空
将源文件编译为C:\\的NetBeansProjects \\ MyApplet \\建立\\班
C:\\的NetBeansProjects \\ MyApplet的\\ src \\ MyApplet.java:189:警告:[选中]选中的转换
发现:或其可匿名java.security.PrivilegedAction>
要求:java.security.PrivilegedAction< T>
        对象doPrivileged的=在AccessController.doPrivileged(新的PrivilegedAction(){
C:\\的NetBeansProjects \\ MyApplet的\\ src \\ MyApplet.java:189:警告:[选中]选中的方法调用:其中,T> doPrivileged的(java.security.PrivilegedAction< T>)的java.security.AccessController应用(≤ ;匿名java.security.PrivilegedAction>)
        对象doPrivileged的=在AccessController.doPrivileged(新的PrivilegedAction(){
2警告
编译:
创建目录:C:\\的NetBeansProjects \\ MyApplet \\ DIST
JNLP:
删除C:\\的NetBeansProjects \\ MyApplet \\ helper.txt
要在C创建默认密钥库:\\的NetBeansProjects \\ MyApplet /建设/ NB-jws.ks
为NB-JWS发电关键
登录罐:
生成-JNLP:
复制1个文件到C:\\的NetBeansProjects \\ MyApplet \\ DIST
删除C:\\的NetBeansProjects \\ MyApplet \\ DIST \\ launch.jnlp_
生成-HTML的preVIEW:
复制1个文件到C:\\的NetBeansProjects \\ MyApplet \\ DIST
罐:
BUILD SUCCESSFUL(总时间:1秒)


解决方案

好吧,我不知道为什么有人给我麻烦,但我找到了解决办法。解决的办法是直接删除,然后重新从头开始创建整个项目,然后再次尝试编译。我猜的NetBeans已经更新了他们做的清单文件或类似的东西在不同版本的方式,它被窒息的旧版本。

Two years ago I wrote a simple upload applet using Java, developed using NetBeans. When I first hit "Clean and Build" back then, and for some time afterwards, it worked perfectly. It would run through the build process and produce a JAR file that I could then upload to my web server, and the applet worked great.

Now, as I'm going back in and making some slight modifications to this applet, it no longer produces the JAR file when I hit "Clean & Build." The actual code changes I made are so minute that I can guarantee they would have no bearing on this (literally just changing the contents of a few strings). I know that since the time I originally built this applet my NetBeans has upgraded itself a couple of times (right now I'm on version 6.9.1), so I wonder if the newer versions are now somehow buggy.

Don't know if this helps, but this class is "self-signed" (in the "Web Start" tab of the Project Properties), and below I've included the output of the "clean,jar" pane on the bottom of NetBeans. I noticed that it says jar: and then doesn't say anything else but skips right to BUILD SUCCESSFUL. I'm assuming that something should happen in between there?

init:
deps-clean:
Updating property file: C:\NetBeansProjects\MyApplet\build\built-clean.properties
Deleting directory C:\NetBeansProjects\MyApplet\build
clean:
init:
deps-jar:
Created dir: C:\NetBeansProjects\MyApplet\build
Updating property file: C:\NetBeansProjects\MyApplet\build\built-jar.properties
Created dir: C:\NetBeansProjects\MyApplet\build\classes
Created dir: C:\NetBeansProjects\MyApplet\build\empty
Compiling 1 source file to C:\NetBeansProjects\MyApplet\build\classes
C:\NetBeansProjects\MyApplet\src\MyApplet.java:189: warning: [unchecked] unchecked conversion
found   : <anonymous java.security.PrivilegedAction>
required: java.security.PrivilegedAction<T>
        Object doPrivileged = AccessController.doPrivileged(new PrivilegedAction() {
C:\NetBeansProjects\MyApplet\src\MyApplet.java:189: warning: [unchecked] unchecked method invocation: <T>doPrivileged(java.security.PrivilegedAction<T>) in java.security.AccessController is applied to (<anonymous java.security.PrivilegedAction>)
        Object doPrivileged = AccessController.doPrivileged(new PrivilegedAction() {
2 warnings
compile:
Created dir: C:\NetBeansProjects\MyApplet\dist
jnlp:
Deleting: C:\NetBeansProjects\MyApplet\helper.txt
Going to create default keystore in C:\NetBeansProjects\MyApplet/build/nb-jws.ks
Generating Key for nb-jws
sign-jars:
generate-jnlp:
Copying 1 file to C:\NetBeansProjects\MyApplet\dist
Deleting: C:\NetBeansProjects\MyApplet\dist\launch.jnlp_
generate-html-preview:
Copying 1 file to C:\NetBeansProjects\MyApplet\dist
jar:
BUILD SUCCESSFUL (total time: 1 second)

解决方案

Well, I'm not sure why it was giving me that trouble, but I found a solution. The solution was to simply delete and then re-create the entire project from scratch, and then try compiling again. I'm guessing that NetBeans has updated the way they do manifest files or something like that with the different versions, and it was choking on the older version.

这篇关于NetBeans的不再生成code JAR文件,它用于的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆