2016-04-09 28 views
7

मैं IntelliJ IDEA 15.0.4 में एक जीडब्ल्यूटी परियोजना पर काम कर रहा हूं। यह परियोजना संकलित और चलाती है। लेकिन इंटेलिजे मुझे बता रहा है कि जावा क्लास फाइलें जेआरई इम्यूलेशन लाइब्रेरी में मौजूद नहीं हैं।कक्षा 'java.io.' जेआरई इम्यूलेशन लाइब्रेरी में मौजूद नहीं है INTELLIJ IDEA

कृपया मेरी मदद करें! क्या मेरे मैवेन pom.xml में कुछ याद आ रही है?

यहाँ त्रुटि संदेश हैं: enter image description here

enter image description here

मेरे pom.xml: enter image description here

enter image description here

:

<properties> 
    <maven.compiler.target>1.8</maven.compiler.target> 
    <maven.compiler.source>1.8</maven.compiler.source> 
</properties> 

<plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-compiler-plugin</artifactId> 
    <configuration> 
     <source>1.8</source> 
     <target>1.8</target> 
    </configuration> 
</plugin> 

<plugin> 
    <groupId>org.apache.maven.plugins</groupId> 
    <artifactId>maven-compiler-plugin</artifactId> 
    <version>3.5.1</version> 
    <configuration> 
    <verbose>true</verbose> 
    <fork>true</fork> 
         <executable>/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/javac</executable> 
    <compilerVersion>1.8</compilerVersion> 
    </configuration> 
</plugin> 

यहाँ मेरी इंटेलीजे परियोजना config हैं

Timesheet.gwt.xml

<?xml version="1.0" encoding="UTF-8"?> 

<module rename-to='Timesheet'> 
<!-- Inherit the core Web Toolkit stuff.      --> 
<inherits name='com.google.gwt.user.User' /> 
<inherits name="com.vaadin.polymer.Elements"/> 

<!-- Inherit the default GWT style sheet. You can change  --> 
<!-- the theme of your GWT application by uncommenting   --> 
<!-- any one of the following lines.       --> 
<inherits name='com.google.gwt.user.theme.standard.Standard' /> 
<!-- <inherits name='com.google.gwt.user.theme.chrome.Chrome'/> --> 
<!-- <inherits name='com.google.gwt.user.theme.dark.Dark'/>  --> 

<!-- Other module inherits          --> 

<!-- Specify the app entry point class.       --> 
<entry-point class='com.campus.client.Timesheet' /> 

<!-- Specify the paths for translatable code     --> 
<source path='client' /> 
<source path='shared' /> 

<!-- <inherits name="com.google.gwt.user.theme.standard.Standard"/> --> 
<inherits name="com.google.gwt.user.theme.clean.Clean"/> 

<!-- For production, most teams prefer to set the default log level to `OFF` --> 
<inherits name="com.allen_sauer.gwt.log.gwt-log-OFF" /> 

<!-- For development, a default of `DEBUG` is recommended --> 
<!-- <inherits name="com.allen_sauer.gwt.log.gwt-log-DEBUG" /> --> 


</module> 
+0

क्या आप Timesheet.gwt.xml भी साझा कर सकते हैं? –

+0

मैंने Timesheet.gwt.xml जोड़ा है। –

+0

आप जीडब्ल्यूटी का कौन सा संस्करण चल रहे हैं? –

उत्तर

0

मैं तुम्हें GWT विकास के लिए ग्रहण + GWT प्लगइन का उपयोग करने के दृढ़ता से सुझाव है कि जब तक आप इंटेलीजे के पूर्ण संस्करण है।

यह GWT JRE के लिए संदर्भ वर्ग नकल करते है, सब यहाँ में है कि ग्राहक के पक्ष पर काम करेंगे: अपने विशेष मामले में http://www.gwtproject.org/doc/latest/RefJreEmulation.html#Package_java_io

इंटेलीजे की तरह लगता है या तो स्ट्रिंग वर्ग नहीं मिल सकता है, कि करने के लिए बताते हैं एक जीडब्ल्यूटी संबंधित से एक गहन विन्यास मुद्दा।

0

मुझे यह समस्या तब लगती थी जब मैंने आर्क लिनक्स में ओरेकल जेडीके 9 स्थापित किया और प्रोजेक्ट एसडीके के रूप में उपयोग किया। ओरेकल जेडीके 9 को अनइंस्टॉल करने के बाद और ओपनजेडीके 8 स्थापित किया, और इसे एसडीके प्रोजेक्ट के रूप में सेट किया, अब कोई त्रुटि नहीं हुई। मुझे आश्चर्य है कि जावा 9 या ओरेकल जेडीके को जीडब्ल्यूटी द्वारा बहुत अच्छी तरह से समर्थित नहीं है।

त्रुटि का एक और संभावित कारण यह है कि शायद मैंने एसडीके को गलत तरीके से स्थापित किया है। सबसे पहले मैंने एसडीके पथ को /usr/lib/jvm/default-runtime पर इंगित किया, लेकिन बाद में मैंने इसे वास्तविक पथ (/usr/lib/jvm/java-8-openjdk) में बदल दिया।