Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/323.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在java web start中找不到类_Java_Jar_Java Web Start - Fatal编程技术网

在java web start中找不到类

在java web start中找不到类,java,jar,java-web-start,Java,Jar,Java Web Start,我正在使用JavaWebStart启动jar文件 我遵循了以下教程 我从EclipseIDE创建了java项目 我的EclipseIDE和文件夹中的结构如下所示 D:\tomcat7\webapps\ROOT>dir Volume in drive D is RECOVERY Volume Serial Number is DC2F-E701 Directory of D:\tomcat7\webapps\ROOT 18-11-2015

我正在使用JavaWebStart启动jar文件

我遵循了以下教程

我从EclipseIDE创建了java项目

我的EclipseIDE和文件夹中的结构如下所示

    D:\tomcat7\webapps\ROOT>dir
     Volume in drive D is RECOVERY
     Volume Serial Number is DC2F-E701

     Directory of D:\tomcat7\webapps\ROOT

    18-11-2015  19:23    <DIR>          .
    18-11-2015  19:23    <DIR>          ..
    17-11-2015  16:17               301 .classpath
    17-11-2015  16:17               387 .project
    17-11-2015  16:17    <DIR>          .settings
    23-09-2015  15:19             5,866 asf-logo-wide.gif
    23-09-2015  15:19            17,811 asf-logo.png
    23-09-2015  15:19               713 bg-button.png
    23-09-2015  15:19             1,918 bg-middle.png
    23-09-2015  15:19             1,392 bg-nav-item.png
    23-09-2015  15:19             1,401 bg-nav.png
    23-09-2015  15:19             3,103 bg-upper.png
    23-09-2015  15:19             3,469 build.xml
    17-11-2015  16:48    <DIR>          com
    23-09-2015  15:19            21,630 favicon.ico
    23-09-2015  15:19            12,408 index.jsp
    17-11-2015  16:21             2,957 JNLPExample.jar
    17-11-2015  16:22               612 JNLPExample.jnlp
    17-11-2015  16:20    <DIR>          META-INF
    23-09-2015  15:19             9,195 RELEASE-NOTES.txt
    23-09-2015  15:19             2,376 tomcat-power.gif
    23-09-2015  15:19             5,926 tomcat.css
    23-09-2015  15:19             2,066 tomcat.gif
    23-09-2015  15:19             5,103 tomcat.png
    23-09-2015  15:19            67,787 tomcat.svg
    23-09-2015  15:20    <DIR>          WEB-INF
                  20 File(s)        166,421 bytes
                   6 Dir(s)   2,712,481,792 bytes free

    D:\tomcat7\webapps\ROOT>

我将jar和jnlp文件粘贴到tomcat/webapps/ROOT文件夹中,根文件夹的内容如下:

    D:\tomcat7\webapps\ROOT>dir
     Volume in drive D is RECOVERY
     Volume Serial Number is DC2F-E701

     Directory of D:\tomcat7\webapps\ROOT

    18-11-2015  19:23    <DIR>          .
    18-11-2015  19:23    <DIR>          ..
    17-11-2015  16:17               301 .classpath
    17-11-2015  16:17               387 .project
    17-11-2015  16:17    <DIR>          .settings
    23-09-2015  15:19             5,866 asf-logo-wide.gif
    23-09-2015  15:19            17,811 asf-logo.png
    23-09-2015  15:19               713 bg-button.png
    23-09-2015  15:19             1,918 bg-middle.png
    23-09-2015  15:19             1,392 bg-nav-item.png
    23-09-2015  15:19             1,401 bg-nav.png
    23-09-2015  15:19             3,103 bg-upper.png
    23-09-2015  15:19             3,469 build.xml
    17-11-2015  16:48    <DIR>          com
    23-09-2015  15:19            21,630 favicon.ico
    23-09-2015  15:19            12,408 index.jsp
    17-11-2015  16:21             2,957 JNLPExample.jar
    17-11-2015  16:22               612 JNLPExample.jnlp
    17-11-2015  16:20    <DIR>          META-INF
    23-09-2015  15:19             9,195 RELEASE-NOTES.txt
    23-09-2015  15:19             2,376 tomcat-power.gif
    23-09-2015  15:19             5,926 tomcat.css
    23-09-2015  15:19             2,066 tomcat.gif
    23-09-2015  15:19             5,103 tomcat.png
    23-09-2015  15:19            67,787 tomcat.svg
    23-09-2015  15:20    <DIR>          WEB-INF
                  20 File(s)        166,421 bytes
                   6 Dir(s)   2,712,481,792 bytes free

    D:\tomcat7\webapps\ROOT>
my.classpath文件(提取的JNLPExmaple.jar)

但它是在该软件包中提供的

在我使用的jnlp文件之后

    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/" href="JNLPExample.jnlp">
         <information>
              <title>JNLP Example</title>
              <vendor>Java Code Geeks</vendor>
              <homepage href="http://localhost:8080/" />
              <description>JNLP Testing</description>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <j2se version="1.6+" />
              <jar href="JNLPExample.jar" />
         </resources>
         <application-desc main-class="main.javacodegeeks.JNLPExample" />
    </jnlp>

JNLP示例
Java代码极客
JNLP测试

在您的jar文件中没有作为main/javacodegeeks的包。该文件夹中应该有一个类文件。您可以添加它们并再次压缩jar,然后重试,也可以将其公开为exe jar,以便按原样压缩


希望有帮助。

在您的jar文件中没有main/javacodegeeks包。该文件夹中应该有一个类文件。您可以添加它们并再次压缩jar,然后再试一次,也可以将其公开为exe jar,以便按原样压缩


希望有帮助。

这里有人可以帮忙吗?1)请务必使用JaNeLA检查JNLP,可从我的网站获得。2) 对于CNFE,需要知道类路径(在JNLP的内容中显示)以及包含这些文件的文件系统(在服务器上)的结构(显示包含这些文件的列表)。所以也将这些细节添加为一个@AndrewThompson,我在这里用我的jnlp文件更新了这个问题。请指导我该怎么做。服务器上文件位置的数据在哪里?从JNLP来看,
JNLPExample.jar
需要与启动文件位于同一目录中。注意,还需要调用is
JNLPExample.jar
,而不是
JNLPExample.jar
JNLPExample.jar
(大写/小写)。在讨论类路径时,请提供该Jar结构的列表。请注意,我现在没有时间玩“20个问题”,所以当我询问信息时,请确保您提供所有信息。(这是我第二次需要向您询问服务器上的目录结构。)您是否考虑过以下问题?真的没有必要依赖任意的网络垃圾。这里有人可以帮忙吗?1)一定要使用JaNeLA检查JNLP,可以在我的网站上找到。2) 对于CNFE,需要知道类路径(在JNLP的内容中显示)以及包含这些文件的文件系统(在服务器上)的结构(显示包含这些文件的列表)。所以也将这些细节添加为一个@AndrewThompson,我在这里用我的jnlp文件更新了这个问题。请指导我该怎么做。服务器上文件位置的数据在哪里?从JNLP来看,
JNLPExample.jar
需要与启动文件位于同一目录中。注意,还需要调用is
JNLPExample.jar
,而不是
JNLPExample.jar
JNLPExample.jar
(大写/小写)。在讨论类路径时,请提供该Jar结构的列表。请注意,我现在没有时间玩“20个问题”,所以当我询问信息时,请确保您提供所有信息。(这是我第二次需要向您询问服务器上的目录结构。)您是否考虑过以下问题?真的没有必要依赖任意的网络垃圾。
    <?xml version="1.0" encoding="UTF-8"?>
    <projectDescription>
        <name>JNLPExample</name>
        <comment></comment>
        <projects>
        </projects>
        <buildSpec>
            <buildCommand>
                <name>org.eclipse.jdt.core.javabuilder</name>
                <arguments>
                </arguments>
            </buildCommand>
        </buildSpec>
        <natures>
            <nature>org.eclipse.jdt.core.javanature</nature>
        </natures>
    </projectDescription>
"java.lang.ClassNotFoundException: main.javacodegeeks.JNLPExample" 
    <?xml version="1.0" encoding="utf-8"?>
    <jnlp spec="1.0+" codebase="http://localhost:8080/" href="JNLPExample.jnlp">
         <information>
              <title>JNLP Example</title>
              <vendor>Java Code Geeks</vendor>
              <homepage href="http://localhost:8080/" />
              <description>JNLP Testing</description>
         </information>
         <security>
              <all-permissions/>
         </security>
         <resources>
              <j2se version="1.6+" />
              <jar href="JNLPExample.jar" />
         </resources>
         <application-desc main-class="main.javacodegeeks.JNLPExample" />
    </jnlp>