2016-09-11 8 views
0

Javaクラス:Thread.exit()行:使用できません??ソースルックアップパスを編集しますか?

package com.org.spring; 
public class Restuarent { 

public void greatingMessage() { 
    System.out.println("Welcome.."); 
} 
} 
テスト春

Javaクラス:

public class TestSpringPro { 

@SuppressWarnings("resource") 
public static void main(String[] args) { 
    try { 
    ApplicationContext context = 
      new ClassPathXmlApplicationContext("springConfig.xml"); 
    Restuarent restObj = (Restuarent) context.getBean("restuarentBean"); 

    restObj.greatingMessage(); 
    } catch(Exception e) { 
     e.printStackTrace(); 
     e.getMessage(); 
    } 

    } 
} 

XML:Bean構成この単純な春のデバッグ中に、私は混乱してビットとして私は、Javaに新しいです

<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> 
    <bean id="restuarentBean" class="com.org.spring.Restuarent"> 
    </bean> 
    </beans> 

私は "Thread.exit()Line:not Available"に行きますが、単にエラーを出さずに私に知らせてください。私はこれがシンプルかもしれないが、事前に感謝を知っています

答えて

1

ウィンドウ - >環境設定、Java->インストールされたJREは、私のJREをクリックしてクリック 編集。ここでAdd External Jarをクリックし、Javaのパス "C:¥Program Files¥Java¥jdk1.8.0_60"に移動し、src.zipを見つけてこれを追加してください これを実行した後、正常に動作することを確認しました。

関連する問題