본문 바로가기

전체 글

(330)
배포한 javafx프로젝트 실행 해당 파일 존재하는 주소에서 cmd 실행 & javafx sdk폴더복사 java --module-path "java_fx\lib" --add-modules=javafx.controls,javafx.fxml -jar chat_server.jar exe파일 만들기 Launch4j 다운로드 Launch4j Executable Wrapper Download Launch4j Executable Wrapper for free. Cross-platform Java executable wrapper for creating lightweight Windows native EXEs. Provides advanced JRE search, application startup configuration and better use..
javafx 설정
0526실습
05.24 FXML 요소 정보를 필드 에 초기화 후 init()호출됨. bundle : 다국어 지원에 쓰임
0523. 스레드풀을 이용한 서버프로그램 / JavaFx 설치 Hashtable 특징 키 객체 만드는 법은 HashMap과 동일 Hashtable은 스레드 동기화(synchronization)가 된 상태 복수의 스레드가 동시에 Hashtable에 접근해서 객체를 추가, 삭제하더라도 스레드에 안전(thread safe) powerShell에서 jar 파일 실행 시 'java -jar 파일이름.jar' 입력
05.22 스레드 풀,inet_address , tcp/ip이용한 서버 프로그램생성 package t09_thread_pool; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; public class ExecutorsExample { public static void main(String[] args) { // 스레드 풀 기능을 정의 해놓은 interface final ExecutorSe..
05.19 스레드,네트워크 동기화 메소드 및 동기화 블록 – synchronized 단 하나의 스레드만 실행할 수 있는 메소드 또는 블록 다른 스레드는 메소드나 블록이 실행이 끝날 때까지 대기해야 package t04_sync; public class ThreadSyncEX { public static void main(String[] args) { Runnable work = new WithDrawThread(); Thread thread1 = new Thread(work); Thread thread2 = new Thread(work); thread1.setName("스레드 1"); thread2.setName("스레드 2"); thread1.start(); thread2.start(); } } class Account{ // ..
05.18 람다표현식, 스레드 package l1_example; public class MessageButton { private String title; public MessageButton(String title) { this.title = title; } public void onTouch() { System.out.println("메세지를 전달합니다."); } @Override public String toString() { return "MessageButton [title=" + title + "]"; } } package l1_example; public class MessageListener implements OnClickListener { @Override public void onClick() { System.o..