2017-05-12 13 views
0

Java Web Start를 통해 응용 프로그램을 열려고 할 때 문제가 있습니다. XML 파일의 구문 분석에 문제가있는 것 같습니다. 하지만 jnlp 파일에서 발생한다고 생각하지 않습니다. 실제로 파싱 된 파일을 이해할 수 없습니다. 그물을 약간 둘러 보았는데 유사한 문제가 많았지 만 해결 방법은 일반적으로 파싱 된 XML 파일을 수정하는 것이 었습니다.Java Web Start - XML ​​구문 분석 문제

내 Test.jnlp 파일을 내 서버의 'htdocs'폴더에 두었습니다 (index.html이 이미있는 위치). 그런 다음 pingisranking.byethost12.com/Test.jnlp를 내 웹에 붙여 넣어 액세스하려고합니다. 브라우저

어떤 제안

NLParseException[ Could not parse launch file. Error at line 1.] 
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source) 
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source) 
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source) 
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source) 
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source) 
at com.sun.javaws.Launcher.updateFinalLaunchDesc(Unknown Source) 
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) 
at com.sun.javaws.Launcher.prepareToLaunch(Unknown Source) 
at com.sun.javaws.Launcher.launch(Unknown Source) 
at com.sun.javaws.Main.launchApp(Unknown Source) 
at com.sun.javaws.Main.continueInSecureThread(Unknown Source) 
at com.sun.javaws.Main.access$000(Unknown Source) 
at com.sun.javaws.Main$1.run(Unknown Source) 
at java.lang.Thread.run(Unknown Source) 
    aused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 223; The entity name must immediately follow the '&' in the entity reference. 
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) 
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEntityReference(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) 
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) 
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) 
at com.sun.deploy.xml.XMLParser.parse(Unknown Source) 
at com.sun.deploy.xml.XMLParser.parse(Unknown Source) 
... 14 more 

내 jnlp 파일 :.?

그것은 메리 오류가있을 수 있습니다 그래서
<?xml version="1.0" encoding="utf-8"?> 
<jnlp spec="1.0+" codebase="http://pingisranking.byethost12.com/" href="htdocs/Test.jnlp"> 
<information> 
    <title>Jnlp Testing</title> 
    <vendor>BW</vendor> 
    <homepage href="http://pingisranking.byethost12.com/" /> 
    <description>Testing Testing</description> 
</information> 
<security> 
<all-permissions/> 
</security> 
<resources> 
<j2se version="1.7+" /> 
<jar href="TestJnlp.jar" /> 
</resources> 
<application-desc main-class="src.CreateGui" /> 
</jnlp> 
+1

나는 그것이 매우 표준 문서로 보여줍니다 FF를 사용하여 JNLP를 다운로드,하지만 시도 할 때 구문 분석 (및 확인) 할 때, 이상한 그것을 사용 [JaNeLA ] (https://drive.google.com/drive/#folders/0B5B9wDXIGw9lUnJaUjA2cmlVRE0) 서버가 HTML과 JS의 혼합을 반환하고 오류가 발생합니다 * "엔티티 이름은 엔티티 참조에서 '&'다음에 와야합니다."* (아마도 HTML/JS의 혼합으로 인해). BTW * "pingisranking.byethost12.com/Test.jnlp"을 붙여서 액세스하려고합니다. 실제로 JNLP 파일에 정의 된 경로가 아닙니다. "http://pingisranking.byethost12.com/htdocs/Test .jnlp "* ('htdocs'를 추가하십시오). –

답변

0

, TT는 반드시 파일과 관련이없는 것, 그들 중 일부는 우리가 사이에서 찾을 수 있습니다 예를 들어 다른 자원 : JNLParseException [ Could not parse launch file. Error at line 56.]Jnlp Could not parse launch file. Error at line 0https://community.oracle.com/thread/1306639

+0

고마워, 나는 그들을 점검했지만 내 문제와 정말로 일치하는 것을 찾을 수 없었다. 그들이 ....하지만 ... :)하지 말라는 사실은 jnlp가 런처에 의해 발견되었다고 확신하지 못합니다. 그러나 예외 정보는 그것이 실제로 수행함을 나타냅니다. – BjornW

+0

jnlp 파일을 가리키는 href를 제거한 후 구문 분석 문제가 사라졌습니다. 대신 내 주요 클래스를 찾을 수 없습니다. src.CreateGui라는 이름이고 Test.jar 파일의 main 클래스는 MANIFEST.MD의 src.CreateGui입니다. – BjornW