달력

42024  이전 다음

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30

배경을 바꾼 것은 해당 workspace에서만 설정은 바꾼 것이다.


따라서 해당 workspace에서 설정을 바꿔주면 되는데


eclipse market place에서 color theme를 설치해서 default로 바꿔줄 수 있고


market place를 설치할 상황이 안 된다면


workspace 안에 .metadata 폴더 안에


.plugins 폴더 안에 org.eclipse.core.runtime 에 보면 .settings 라는 폴더가 있을 것이다.


여기에는 각 프로젝트의 setting 값과 기타 eclipse setting 값이 있는데


여기서 정확히 어떤 파일인지는 모르나 .settings 폴더 전체를 날려주면


배경색이 복구될 것이다.


허나 다른 setting 값들도 사라지기 때문에 backup을 하고 삭제하기를 바란다.


아니면 새로운 workspace를 만들어보고 폴더를 비교하면서 어떤 폴더가 배경 색을 설정하는지 알아본 후 삭제하는 것도 추천한다.


저는 시간이 없어서.... 걍 날려버림



'자바' 카테고리의 다른 글

Gson 받기 사용 방법 두 가지  (0) 2013.06.05
gwt may need recompiled  (0) 2013.02.13
자바 url 파일 받기  (0) 2012.08.22
Posted by dewlit
|

1. List로 받을 경우

ArrayList<Lecture> lectureList = new ArrayList<Lecture>();

Lecture tmpLecture;

Gson gson = new Gson();

Type type = new TypeToken<ArrayLecture>() {

}.getType();

ArrayLecture jonResultlecturelist = (ArrayLecture) gson

.fromJson(sHtml, type);

lectureList = jonResultlecturelist.getLectures();


2. 한 객체로 받을 경우

 2.1

Lecture tmpLecture;

FreemindGson myGson = new FreemindGson();

tmpLecture = (Lecture) myGson.fromJson(sHtml, "Lecture");

2.2

 위 List로 받을 경우에서 type를 한 객체로 하면 됨

'자바' 카테고리의 다른 글

Eclipse 배경색 background 복구 색 변경 default  (0) 2014.05.02
gwt may need recompiled  (0) 2013.02.13
자바 url 파일 받기  (0) 2012.08.22
Posted by dewlit
|

gwt may need recompiled

자바 2013. 2. 13. 16:31

구글 웹 툴킷이 설치되어 있지 않아서 발생하는 것이고, plugin 설치 후

프로젝트 우클릭 Google -> GWT Compile 하면 실행 될것이다.



'자바' 카테고리의 다른 글

Eclipse 배경색 background 복구 색 변경 default  (0) 2014.05.02
Gson 받기 사용 방법 두 가지  (0) 2013.06.05
자바 url 파일 받기  (0) 2012.08.22
Posted by dewlit
|

자바 url 파일 받기

자바 2012. 8. 22. 15:14

import java.io.BufferedOutputStream;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.InputStream;

import java.io.OutputStream;

import java.net.URL;

import java.net.URLConnection;


public class test {

/**

* 버퍼 사이즈

*/

final static int size = 1024;


/**

* fileAddress에서 파일을 읽어, 다운로드 디렉토리에 다운로드

* @param fileAddress

* @param localFileName

* @param downloadDir

*/

public static void fileUrlReadAndDownload(String fileAddress,

String localFileName, String downloadDir) {

OutputStream outStream = null;

URLConnection uCon = null;

InputStream is = null;

try {

System.out.println("-------Download Start------");

URL Url;

byte[] buf;

int byteRead;

int byteWritten = 0;

Url = new URL(fileAddress);

outStream = new BufferedOutputStream(new FileOutputStream(

downloadDir + "\\" + localFileName));

uCon = Url.openConnection();

is = uCon.getInputStream();

buf = new byte[size];

while ((byteRead = is.read(buf)) != -1) {

outStream.write(buf, 0, byteRead);

byteWritten += byteRead;

}

System.out.println("Download Successfully.");

System.out.println("File name : " + localFileName);

System.out.println("of bytes  : " + byteWritten);

System.out.println("-------Download End--------");

} catch (Exception e) {

e.printStackTrace();

} finally {

try {

is.close();

outStream.close();

} catch (IOException e) {

e.printStackTrace();

}

}

}


/**

* @param fileAddress

* @param downloadDir

*/

public static void fileUrlDownload(String fileAddress, String downloadDir) {

int slashIndex = fileAddress.lastIndexOf('/');

int periodIndex = fileAddress.lastIndexOf('.');

// 파일 어드레스에서 마지막에 있는 파일이름을 취득

String fileName = fileAddress.substring(slashIndex + 1);

if (periodIndex >= 1 && slashIndex >= 0

&& slashIndex < fileAddress.length() - 1) {

fileUrlReadAndDownload(fileAddress, fileName, downloadDir);

} else {

System.err.println("path or file name NG.");

}

}


/**

* main

* @param args

*/

public static void main(String[] args) {

// 파일 어드레스

String url = "http://localhost/download/index.php";

// 다운로드 디렉토리

String downDir = "C:/Temp";

// 다운로드 호출

fileUrlDownload(url, downDir);

}

}


출처 : http://forum.falinux.com/zbxe/?document_srl=565194


'자바' 카테고리의 다른 글

Eclipse 배경색 background 복구 색 변경 default  (0) 2014.05.02
Gson 받기 사용 방법 두 가지  (0) 2013.06.05
gwt may need recompiled  (0) 2013.02.13
Posted by dewlit
|