JConsole이 나와서 가끔 유용하게 써먹을 경우가 있었다. 일단은 무료로 제공되는 툴이라서 좋고 JDK가 깔려있다면 어디서나 쓸 수 있으니 좋았다.
그러나 불편한 점도 많았었는데 최근 공개된 Java VisualVM은 많은 부분에서 향상된 모습을 보여주고 있다. 아직 꼼꼼히 살펴보지는 못 했지만 대충 둘러보고 느낀 점이 몇가지 있다. 우선 JConsole에서는 실행중인 Java Application을 리스트에서 골라 연결하여 접속할 수 있긴 했지만 해당 프로그램이 종료되면 다시 동일한 Java Application을 실행해도 자동으로 연결해 주지는 못 했다. 그래서 프로그램이 종료되면 JConsole에서 다시한번 실행중인 프로그램을 검색하도록 수동으로 조작을 해주어야 했다.
그런데 Java VisualVM에서는 동일한 Java Application이 실행되면 자동으로 감지하여 연결시켜주어 한결 편의성이 높아졌다. 또한 그래프도 2D API를 써서 훨씬 보기좋게 바뀌어 JConsole에 비하면 많이 예뻐(?)졌다.
새로운 이름으로 출시된 만큼 다양한 기능을 지원할 것 같은데 시간이 되는대로 꼼꼼히 점검해서 유용하게 활용해 줘야겠다.
첨부한 동영상은 Java VisaulVM의 사용법을 간단해 소개하는 동영상이다.
기존에 가상화 솔루션으로 유명한 VMware의 평가판을 사용해서 다양한 환경에서의 개발 프로그램 테스트가 필요한 경우에 요긴하게 진행 했었는데 평가판의 제약 때문에 불편함이 많았었다. 그런데 썬에서 무료로 VirtualBox라는 가상화 솔루션을 제공하니 어찌 아니 쓸 수 있겠는가?
설치해서 얼마간 사용해본 소감은 대체로 만족 스럽다. 그런데 썬의 VirtualBox에서는 화면 해상도를 800x600, 1024x768, 1152x864, 1280x1024, 1600x1200 등의 약 4:3 비율의 해상도만 기본 지원하고 있다.
내 노트북의 경우 1280x768의 해상도를 가지는 Wide LCD라서 1024x768 해상도로 세팅하면 Full Screen 모드로 설정해도 좌우에 검은색의 여백이 표시되고 화면 영역이 작아지는 탓에 작업도 불편해진다. 이와 같이 1280x768, 1280x800, 1400x1050 등의 4:3의 화면비율이 아닌 Wide LCD를 사용하는 경우를 위해 VirtualBox에서는 Custom VESA Resolution 이라는 기능을 통해 사용자가 직접 원하는 해상도를 추가할 수 있도록 지원하고 있다.
Custom VESA Resolution을 지정하는 방법은 다음과 같다. 커맨드라인 명령을 입력해야 하므로 우선 터미널 창을 하나 열고 다음과 같은 명령을 입력한다.
명령을 딱 보면 알겠지만 마지막 인자는 화면 해상도 및 색상수에 대한 정보이다. 나머지도 대충 유추가 가능하지만 정확한 사용법을 위해 각각의 인자에 대해 설명하자면 다음과 같다.
첫번째 인자는 가상머신에 추가적인 데이터를 설정하기 위한 옵션이다. 지금의 경우 사용자 지정 해상도 추가가 목적이므로 이 옵션이 바뀔 일은 없을 것이다.
두번째 인자는 VirtualBox에 등록된 가상머신의 이름이다. VirtualBox는 가상머신 별로 환경설정을 지정하므로 추가적인 데이터 설정을 위해서 설정을 적용할 가상머신의 이름을 지정하는 것이다.
나의 경우 Ubuntu Linux에 VirtualBox를 설치하고 온라인뱅킹 등의 AtiveX 없이는 안 돌아가는 사이트의 이용을 위해 Windows XP를 Guest OS로 설치하였는데 이때 지정한 Guest OS용 가상머신의 이름이 "Windows XP" 이다.
세번째 인자는 가상머신에 지정할 변수인데 사용자 지정 화면해상도 용으로 예약된 변수명이 CustomVideoModeN 이다. 여기서 N에는 1 ~ 16까지의 숫자를 지정 가능하다. 더 다양한 해상도를 동시에 지정 할 수 있으면 좋겠지만 꼭 필요한 것만 추가하는 개념이니 크게 아쉽지는 않은 숫자이다.
네번째 인자는 앞서 얘기 했듯이 화면 해상도와 색상수를 지정하는 인자이다. 2^n의 형식으로 색상 수를 지정한다는 것 쯤은 말 안해도 다들 아는 상식이라 믿는다.
어제까지만 해도 Beta2 버전이었는데 Release Candidate 1 버전이 공개되었다.
통상 RC2까지 거쳐서 정식 배포판이 릴리즈 되기에 정식 버전이 배포되기까지는 아직 기다려야 하지만 Sun Tech Days 2008에서 들은 얘기로는 곧 6.5 정식버전이 릴리즈 될 것 같다.
아무튼 오늘은 RC1 버전이 릴리즈 되었으니 아직 Bata2를 사용하고 계신 분들은 어서 어서 업그레이드 해보자.
Together 2007 SP1이 나온 것을 알게되어 장시간에 걸쳐 평가판을 다운로드한 후 설치를 마쳤다.
기대감을 가지고 실행을 하였으나 웬걸..! 아래와 같은 오류창만 뜨고 Together는 실행되지 않았다.
이전에 비슷한 경험이 있어 (JBuilder 2005 이상의 제품이 로고화면만 표시되고 죽는 문제 참고) 환경설정 파일로 보이는 파일들을 찾아보았다. 몇 몇 디렉토리를 뒤져본 결과 어렵지 않게 Together의 시작 옵션을 설정하는 파일을 찾을 수 있었다.
나의 경우 기본 디렉토리인 C:\Borland\Together에 Togehter를 설치했는데 이와 같은 경우환경파일은 C:\Borland\Together\eclipse 디렉토리에서 Together.ini을 찾아 열어보면 된다.
Together.ini 파일의 기본 설정은 다음과 같다.
-vmargs
-Xms128m
-Xmx1024m
-XX:MaxPermSize=128m
아무래도 메모리 최대값이 문제가 되는 것 같아 아래와 같이 설정을 고친 후 실행해 보았다.
-vmargs
-Xms128m
-Xmx640m
-XX:MaxPermSize=128m
결과는 대성공! 아무런 문제 없이 Together가 실행되었다.
혹시라도 같은 문제를 겪고 있다면 Together.ini의 값을 고쳐보자.
참고로 Together 2007 SP1 평가판은 http://www.codegear.com 에서 다운로드 가능하다. 15일 평가가 가능한 라이센스 키는 다운로드시 등록한 이메일로 발송된다.
NetBeans를 사용하던 중에 사용하는 JDK의 버전을 바꾼일이 있었다.
JDK 5.0을 사용하다가 JDK 6.0을 설치하고 기존의 JDK 5.0은 삭제를 해 버렸는데 그 후로 NetBeans를 실행하면 예전에 설치당시에 지정했던 경로에서 JDK를 찾으면서 오류 메시지를 표시하고는 실행이 중단되어 버렸다.
리눅스나 유닉스의 경우라면 JDK 디렉토리를 심볼릭 링크로 구성하여 버전이 바뀌더라도 NetBeans가 참조하는 디렉토리는 항상 유효하도록 설치를 하지만, 윈도우즈의 경우에는 그럴 수가 없는 것이 문제다.
C:\Program Files\netbeans-5.5\etc\netbeans.conf 파일을 열어보면
# default location of J2SE JDK, can be overridden by using --jdkhome <dir> switch
netbeans_jdkhome="C:\Java\jdk1.6.0"
와 같은 부분을 찾을 수 있다. 이 부분의 JDK 경로를 수정하면 새로 설치된 JDK로 정상적으로 실행된다.
메인 메모리가 1G 이상인 PC의 경우 발생하는 문제라고 한다.
다음은 볼랜드포럼에 올라온 글이다.
입력내용 : JBuilder2005 기동이 기동되다가 죽는 경우 발생 원인: pc의 메모리가 1GB 이상일 경우 발생 해결방법: JBuilder2005 설치 디렉토리 Borland|JBuilder2005|bin에서 jbuilder.config 파일을 열어서 아래와 같이 수정 후 기동
23 라인 정도
# Tune this VM to provide enough headroom to work on large # applications vmmemmin 32m vmmemmax 75% ===> vmmemmax 512m으로 수정
인터넷 서핑 중에 Borland JBuilder 2006의 Service Pack이 벌써 3번째 나왔다는 것을 오늘 알았다. 나중에 찾기 힘들 것 같아 여기에도 올려 둔다.
다음은 jb2006_readme_SP3.html 의 내용이다.
JBuilder 2006 Service Pack 3
Release Notes
This software service pack is being provided to licensed users of Borland JBuilder 2006 Enterprise. Installation and use is governed by the license statement for Borland JBuilder 2006 Enterprise. This update is intended for all JBuilder 2006 platforms.
JBuilder 2006 Service Pack 3 provides CaliberRM 2005 support for JBuilder 2006 Enterprise Edition, an ORACLE plug-in, and the fixes discussed in the 'Resolved Defects' section of this document.
This service pack is intended for all of the English versions of JBuilder 2006, but it is expected to function on non-English versions as well. However, you may see some strings in English if you apply this service pack to a non-English version of JBuilder 2006.
For more information about JBuilder, including FAQs and workarounds, please visit the JBuilder Developer Support web site. If you have a problem, please report it by using the Bug Submission Form. Please be sure to include the steps and the source code to help reproduce the problem, and the exact text of any error messages encountered.
Installation Instructions
The following description assumes that JBuilder 2006 has been installed in the Borland/JBuilder2006 directory. If you have installed JBuilder in a different directory, substitute the one that you used.
To install the JBuilder 2006 Service Pack 3,
EXIT JBuilder.
Make a backup copy of the files in your lib directory, and save them to a different directory that is not in your CLASSPATH. Some of the files in this directory will be over-written by the update.
Remove any JBuilder updates from the Borland/JBuilder2006/patch/ directory.
Extract the file jb2006_servicePack_03.zip into your JBuilder 2006 home directory. You will be asked if you want to overwrite existing files.
Note: If your operating system does not have a utility for unarchiving ZIP files, you can use the JAR utility in the JDK to unarchive ZIP files. Copy jb2006_servicePack_03.zip to where you installed JBuilder 2006. At the command line, change to the directory where you installed JBuilder 2006 and enter the following command (where <jdk> is the directory in which the JRE or SDK is installed) for your platform to extract the files.
The files for this update are now successfully installed and you can run JBuilder.
After you have installed this update, the documentation for the ORACLE plug-in will be located in the following directory:
/lib/servers/oc4j904jbx.htm
Resolved Defects
This update resolves the following defects:
[230475] Can't connect to Caliber from JBuilder. JBuilder hangs if the port number is 200000 or 200001. The was caused by problems with backward compatiblity for Caliber 2005. Now it is possible to connect to CaliberRM 2005, Release 2 (#8.0.344), CaliberRM 7.0, Service Pack 2, and Caliber 7.1.
[230947] The History viewer does not use UTF-8 encoding when displaying a chat log.
[231822] Web Services Explorer was not able to list available web services at the WSDL Server.
[231962] Debugger did not stop at breakpoints and threw an exception when JBuilder was launched with a JBuilder 2006 Enterprise and peer-to-peer connectivity was disabled.
[236405] Pulling the latest project after synchronizing sometimes caused the following exception, "Project .jpx cannot be read: java.io.IOException: Document root element is missing".
[237512] JBuilder users were not able to send a file to any user running Eclipse, or receive a file from any user running Eclipse.
[238947] If you invoked the expand template keystroke after entering a partial Code Template name with multiple matches, JBuilder 2006 incorrectly expanded the first match instead of providing a chooser pop-up.
[239258] The automatic primary key generation feature for Weblogic 9.0 was unusable in JBuilder 2006. This was due to a the fact that the values listed for the generator (NamedSequenceTable, ORACLE, SQLServer, SQLServer2000) were no longer valid for Weblogic 9.0, and the new values were not specified in their documentation.
[239548] Added support to read class files targeted for JDK 6.
[239549] Made necessary changes for "date time" issue with JVM. Now JBuilder is compliant with a change in the U.S. law for Daylight Savings Time that takes effect in 2007.
[239563] Web module build times sometimes exceeded those of JBuilder 2005 when very large numbers of JSP files are present.
[239586] Adding an external jar file to a J2EE 1.4 EAR file threw a Null Pointer Exception because J2EE 1.4 doesn't have a doctype for the EAR file, since it is schema-based.
[240025] Updated libraries for the latest open source projects that support the Peer-to-Peer feature.
[240040] The ORACLE plug-in from JBuilderX was not compatible with JBuilder 2006.
[240481] Attempting to place a JBuilder project under StarTeam source code control fails when traditional Chinese characters are used in the folder name.
Known Issues
The following is a known issue:
[238078] With JBuilder 2005 and 2006, there are performance issues when trying to edit large XML files.
Workaround: Turning off the Tag Inspector increases the performance.
Third-Party Issues
The following issue may affect JBuilder JPDA users:
A change to the Linux kernel in 2.6.15 has drastically slowed down the socket transport used by JPDA on Linux.
Note that this only affects JPDA on a Linux distribution that uses kernel 2.6.15 or newer. Solaris, Windows, and Linux 2.6.14 and older are not affected.
기존에 JBuilder 2006을 가지고 있는 경우에만 사용 가능하니 크게 문제될 것이 없을 거라는 생각이지만 그래도 혹시 저작권 관련하여 문제가 되면 삭제하겠습니다. 볼랜드 사이트가 등록된 사용자를 제외하고는 받을 수 없도록 바뀌었기에 저작권과 관련하여 다운로드 링크를 제거하였다.