Jcat
          寵辱不驚,閑看庭前花開花落~~
          posts - 173,comments - 67,trackbacks - 0

          1. workdir=learnJar

          目錄結構
          + learnJar
          ?| mf.mf
          ?|+ test
          ???| Test.java
          ?
          2. workdir>javac test\Test.java

          + learnJar
          ?| mf.mf?
          ?|+ test
          ?? | Test.java
          ?? | Test.class

          3. workdir>jar cvfm a.jar mf.mf test\Test.class

          + learnJar
          ?| mf.mf
          ?|+ test
          ?? | Test.java
          ?? | Test.class
          ?|+ a.jar
          ?? |+ META-INF
          ???? | MANIFEST.MF
          ?? |+ test
          ???? | Test.class

          ?4. workdir>java -jar a.jar
          hello world


          NOTE
          1. manifest.mf可以放在任何位置,也可以是其它的文件名(反正最后jar中的文件名會被自動變為MANIFEST.MF)
          2. "Manifest-Version: 1.0"--該行(以及其它行)冒號后面必須是個空格,否則jar時出錯"invalid header field"
          3. "Main-Class: test.Test<回車>"--該行必須以一個回車符結束,否則無效。
          4. 如果是有UI的程序,雙擊jar文件即可運行。(如果安裝了winrar等壓縮軟件,jar文件會被關聯,因此,雙擊時并不會執行jar程序,而是調用壓縮軟件來打開jar文件,這時,將jar的關聯去掉即可)

          Appendix
          Test.java

          package ?test;

          import ?javax.swing. * ;

          public ? class ?Test? extends ?JFrame {
          ????
          public ? static ? void ?main(String[]?args) {
          ????????Test?impl
          = new ?Test();
          ????????JLabel?label?
          = ? new ?JLabel( " hello?world " );
          ????????impl.add(label);
          ????????????impl.pack();
          ????????impl.setVisible(
          true );
          ????}

          }

          mf.mf
          Manifest-Version:?1.0
          Main
          -Class:?test.Test
          <回車>
          posted @ 2006-06-19 22:45 Jcat 閱讀(1559) | 評論 (2)編輯 收藏

          1. 先從網上下載jdk(jdk-1_5_0_02-linux-i586-rpm.bin) ,推薦SUN的官方網站www.sun.com,下載后放在/home目錄中,當然其它地方也行。

          2.1 進入安裝目錄
          #cd /home
          #cp jdk-1_5_0_02-linux-i586-rpm.bin /usr/local
          #cd /usr/local

          2.2 給所有用戶添加可執行的權限
          #chmod +x jdk-1_5_0_02-linux-i586-rpm.bin
          解壓縮之
          #./jdk-1_5_0_02-linux-i586.rpm.bin

          2.3 此時會生成文件jdk-1_5_0_02-linux-i586.rpm,同樣給所有用戶添加可執行的權限
          #chmod +x jdk-1_5_0_02-linux-i586.rpm
          安裝程序
          #rpm -ivh jdk-1_5_0_02-linux-i586.rpm
          過程出現安裝協議等,按接受即可。

          3. 設置環境變量。
          #vi /etc/profile
          在最后面加入
          #set java environment
          JAVA_HOME=/usr/java/jdk-1_5_0_02
          CLASSPATH=.:
          JAVA_HOME/lib/tools.jar
          PATH=
          JAVA_HOME/bin:PATH
          export JAVA_HOME CLASSPATH PATH

          保存退出。

          要使JDK在所有的用戶中使用,可以這樣:
          vi /etc/profile.d/java.sh
          在新的java.sh中輸入以上相同的內容.
          保存退出,然后給java.sh分配權限:chmod 755 /etc/profile.d/java.sh

          4. 在終端使用echo命令檢查環境變量設置情況。
          #echo
          JAVA_HOME
          #echo
          CLASSPATH
          #echo
          PATH

          5. 檢查JDK是否安裝成功。
          #java -version
          如果看到JVM版本及相關信息,即安裝成功!

          以上摘自輕風清竹!

          posted @ 2006-06-14 21:54 Jcat 閱讀(2346) | 評論 (1)編輯 收藏
          有個別不是縮略詞,但語源很有趣,涉及基本命令,目錄,文件,變量等。

          /bin = BINaries
          /dev = DEVices
          /etc = ETCetera
          /lib = LIBrary
          /proc = PROCesses
          /sbin = Superuser BINaries
          /tmp = TeMPorary
          /usr = Unix Shared Resources
          /var = VARiable ?
          FIFO = First In, First Out
          GRUB = GRand Unified Bootloader
          IFS = Internal Field Seperators
          LILO = LInux LOader
          MySQL = My是最初作者女兒的名字,SQL = Structured Query Language
          PHP = Personal Home Page Tools = PHP Hypertext Preprocessor
          PS = Prompt String
          Perl = "Pratical Extraction and Report Language" = "Pathologically Eclectic Rubbish Lister"
          Python 得名于電視劇Monty Python's Flying Circus
          Tcl = Tool Command Language
          Tk = ToolKit
          VT = Video Terminal
          YaST = Yet Another Setup Tool
          apache = "a patchy" server
          apt = Advanced Packaging Tool
          ar = archiver
          as = assembler
          awk = "Aho Weiberger and Kernighan" 三個作者的姓的第一個字母
          bash = Bourne Again SHell
          bc = Basic (Better) Calculator
          bg = BackGround
          biff = 作者Heidi Stettner在U.C.Berkely養的一條狗,喜歡對郵遞員汪汪叫。
          cal = CALendar
          cat = CATenate
          cd = Change Directory
          chgrp = CHange GRouP
          chmod = CHange MODe
          chown = CHange OWNer
          chsh = CHange SHell
          cmp = compare
          cobra = Common Object Request Broker Architecture
          comm = common
          cp = CoPy
          cpio = CoPy In and Out
          cpp = C Pre Processor
          cron = Chronos 希臘文時間
          cups = Common Unix Printing System
          cvs = Current Version System
          daemon = Disk And Execution MONitor
          dc = Desk Calculator
          dd = Disk Dump
          df = Disk Free
          diff = DIFFerence
          dmesg = diagnostic message
          du = Disk Usage
          ed = editor
          egrep = Extended GREP
          elf = Extensible Linking Format
          elm = ELectronic Mail
          emacs = Editor MACroS
          eval = EVALuate
          ex = EXtended
          exec = EXECute
          fd = file descriptors
          fg = ForeGround
          fgrep = Fixed GREP
          fmt = format
          fsck = File System ChecK
          fstab = FileSystem TABle
          fvwm = F*** Virtual Window Manager
          gawk = GNU AWK
          gpg = GNU Privacy Guard
          groff = GNU troff
          hal = Hardware Abstraction Layer
          joe = Joe's Own Editor
          ksh = Korn SHell
          lame = Lame Ain't an MP3 Encoder
          lex = LEXical analyser
          lisp = LISt Processing = Lots of Irritating Superfluous Parentheses
          ln = LiNk
          lpr = Line PRint
          ls = list
          lsof = LiSt Open Files
          m4 = Macro processor Version 4
          man = MANual pages
          mawk = Mike Brennan's AWK
          mc = Midnight Commander
          mkfs = MaKe FileSystem
          mknod = MaKe NODe
          motd = Message of The Day
          mozilla = MOsaic GodZILLa
          mtab = Mount TABle
          mv = MoVe
          nano = Nano's ANOther editor
          nawk = New AWK
          nl = Number of Lines
          nm = names
          nohup = No HangUP
          nroff = New ROFF
          od = Octal Dump
          passwd = PASSWorD
          pg = pager
          pico = PIne's message COmposition editor
          pine = "Program for Internet News & Email" = "Pine is not Elm"
          ping = 擬聲 又 = Packet InterNet Grouper
          pirntcap = PRINTer CAPability
          popd = POP Directory
          pr = pre
          printf = PRINT Formatted
          ps = Processes Status
          pty = pseudo tty
          pushd = PUSH Directory
          pwd = Print Working Directory
          rc = runcom = run command, rc還是plan9的shell
          rev = REVerse
          rm = ReMove
          rn = Read News
          roff = RunOFF
          rpm = RPM Package Manager = RedHat Package Manager
          rsh, rlogin, rvim中的r = Remote
          rxvt = ouR XVT
          seamoneky = 我
          sed = Stream EDitor
          seq = SEQuence
          shar = SHell ARchive
          slrn = S-Lang rn
          ssh = Secure SHell
          ssl = Secure Sockets Layer
          stty = Set TTY
          su = Substitute User
          svn = SubVersioN
          tar = Tape ARchive
          tcsh = TENEX C shell
          tee = T (T形水管接口)
          telnet = TEminaL over Network
          termcap = terminal capability
          terminfo = terminal information
          tex = τ?χνη的縮寫,希臘文art
          tr = traslate
          troff = Typesetter new ROFF
          tsort = Topological SORT
          tty = TeleTypewriter
          twm = Tom's Window Manager
          tz = TimeZone
          udev = Userspace DEV
          ulimit = User's LIMIT
          umask = User's MASK
          uniq = UNIQue
          vi = VIsual = Very Inconvenient
          vim = Vi IMproved
          wall = write all
          wc = Word Count
          wine = WINE Is Not an Emulator
          xargs = eXtended ARGuments
          xdm = X Display Manager
          xlfd = X Logical Font Description
          xmms = X Multimedia System
          xrdb = X Resources DataBase
          xwd = X Window Dump
          yacc = yet another compiler compiler


          http://www.gnu.org/fun/jokes/gnuemacs.acro.exp.htm
          emacs: Escape Meta Alt Ctrl Shift
          emacs: EMACS Makes A Computer Slow


          The novice Unix user is always surprised by Unix’s choice of command
          names. No amount of training on DOS or the Mac prepares one for the
          majestic beauty of cryptic two-letter command names such as cp, rm, and
          ls.
          Those of us who used early 70s I/O devices suspect the degeneracy stems
          from the speed, reliability, and, most importantly, the keyboard of the
          ASR-33 Teletype, the common input/output device in those days. Unlike
          today’s keyboards, where the distance keys travel is based on feedback
          principles, and the only force necessary is that needed to close a
          microswitch, keys on the Teletype (at least in memory) needed to travel
          over half an inch, and take the force necessary to run a small electric generator
          such as those found on bicycles. You could break your knuckles touch
          typing on those beasts
          If Dennis and Ken had a Selectric instead of a Teletype, we’d probably be
          typing “copy” and “remove” instead of “cp” and “rm.”1 Proof again that
          technology limits our choices as often as it expands them.
          After more than two decades, what is the excuse for continuing this tradition?
          The implacable force of history, AKA existing code and books. If a
          vendor replaced rm by, say, remove, then every book describing Unix
          would no longer apply to its system, and every shell script that calls rm
          would also no longer apply. Such a vendor might as well stop implementing
          the POSIX standard while it was at it.
          A century ago, fast typists were jamming their keyboards, so engineers
          designed the QWERTY keyboard to slow them down. Computer keyboards
          don’t jam, but we’re still living with QWERTY today. A century
          from now, the world will still be living with rm.

          以上摘自 http://www.linuxsir.org/bbs/showthread.php?t=260278
          posted @ 2006-06-14 20:48 Jcat 閱讀(1174) | 評論 (0)編輯 收藏

          1. Liunx能識別Fat32

          2.在/mnt文件夾下,建立個文件夾名字usb
          3.用命令 $mount /dev/sda1 /mnt/usb(中間有個空格噢)
          4.內容就在usb文件夾里!

          似乎FC3直接就支持U,所以當插入U盤時,情形就跟Windows下一樣,你只用點擊出現的圖標即可.


          附錄:

          Q: 點擊圖標,結果就卡在那里了.
          ? 猜測原因:
          ??? 1.
          可能是因為我的那些MP3的中文名子(Linux無法識別Windows下的寫的中文)
          ??? 2.
          也可能是因為我MP3里的病毒(病毒本身對Linux并無作用,.exe文件讓Linux無法識別)
          A:
          U盤格式化(Fat32)了一下,就好了.

          posted @ 2006-06-06 21:49 Jcat 閱讀(628) | 評論 (0)編輯 收藏

          1. 運行:
          #gtf 1280 800 60

          得到一個modeline,如:
          # 1280x800 @ 60.00 Hz (GTF) hsync: 49.68 kHz; pclk: 83.46 MHz
          Modeline "1280x800_60.00" 83.46 1280 1344 1480 1680 800 801 804 828 -HSync +Vsync
            
          把這個modeline拷貝到/etc/X11/xorg.conf中的Monitor段中。

          基礎知識: gtf = generalized timing formula, 定義了產生畫面所需要的時間。gtf 計算出顯示器屏幕尺寸、分辨率,然后我們把計算出來的值插入到xorg.conf配置文件中,就能達到自動調節屏幕的顯示尺寸、位置及分辨率?! ?/font>


          2. 在Screen段,把Modes一行,修改成Modes “1280x800”
          ? (沒有就添加)

          Section "Screen"
          ??????? Identifier "Screen0"
          ??????? Device???? "Videocard0"
          ??????? Monitor??? "Monitor0"
          ??????? DefaultDepth???? 24
          ??????? SubSection "Display"
          ??????????????? Viewport?? 0 0
          ??????????????? Depth???? 24
          ??????????????? Modes??? "1280x800"
          ??????? EndSubSection
          EndSection



          3. 安裝855Resolution.
            
          http://perso.wanadoo.fr/apoirier/

          解開源碼之后先 #make
          然后用root權限 #make install即可。
          cp 855resolution /usr/sbin?? (其實就是拷了一個可執行文件到sbin里)  

          ( 注意, 安裝FC3 , 如果選擇桌面版, 將不會安裝gcc, 可這里要用到, 所以找到FC 的安 裝盤, 補充安裝一下gcc 就可以了)


          4. 運行:
            #./855resolution -l
            
            得到輸出:
             855resolution version 0.4, by Alain Poirier  
             Chipset: 855GM (id=0x35808086)
             VBIOS type: 2
             VBIOS Version: 3104  
             Mode 30 : 640x480, 8 bits/pixel
             Mode 32 : 800x600, 8 bits/pixel
             ....
             Mode 5c : 1920x1440, 32 bits/pixel
             Mode 7c : 1280x800, 8 bits/pixel
            Mode 7d : 1280x800, 16 bits/pixel
             Mode 7e : 1280x800, 32 bits/pixel
            
            其中:Mode 7d一行,是我們想要的。
            
          5.
          運行:
            #./855resolution 7d 1280 800
            
          6.startx(
          注消,再登錄回來),這時候就應該OK了。
            
          7.
          為了以后每次重新啟動系統都能自動生效:
          ??? 把855resolution 7d 1280 800(注意還要加入路徑名)添加到
          ??? /etc/rc.d/rc.local 腳本中。這樣每次啟動都會自動配置好寬屏了。


          附錄1: vi的使用
          i
          編輯
          : 進入控制欄
          :w 寫入退出
          :qa! 不寫入退出

          附錄2:? 配置"主菜單-->系統設置-->顯示"? (目前還不知道這步操作的具體作用,以及對前面操作的影響)

          設置-->分辨率=640x480
          設置-->色彩深度=上百萬顏色
          硬件-->顯示器類型=LCD Panel 1280x800
          硬件-->視頻卡類型=Intel 855

          posted @ 2006-06-06 20:53 Jcat 閱讀(820) | 評論 (1)編輯 收藏

          1.? Install
          $su (
          登錄root)
          #cd /home (
          home目錄下)
          #chmod +x bitnet (
          加可執行權限)
          #./bitnet (
          執行)

          2. 以下為執行后填入的參數
          id : liran
          pwd: ******
          model[1]
          回車即可

          3. Usage of bitnet
          bitnet[-skqn]
          Start or stop agent for BIT Campus Network.
          Options:
          -h Show this information.
          -s Setup configuration.
          -k Kill the agent.
          -q Query how much money remained.

          說明: 第一次使用的時候會要求輸入用戶名和密碼,并詢問是否保存該信息,如果是,將會保存帳號信息到 $HOME/.bitnet,此后只需要直接運行 bitnet 便可自動登錄。如果需要使用新的帳號信息,只需要加 -s 參數重新進行設定即可。

          〔附錄〕
          Q:在宿舍還好好的,把本本帶到教室后就進不了FC3了。 卡在“enabling swap space [ok]”后面半天不動,然后我按Ctrl+Alt+Delete,出現“unloading kernel card services”
          我猜想是不是網絡改變的問題?因為我們學校上網都是用“IP自動獲取”的。我還發現,如果不插網線,它也會卡在一個地方不動,一插上就過去了。

          A:進來了,原因總結如下:
          1. 在學校上網需要啟動一個上網助理
          2. 我將啟動這個助理的命令加到 rc.local 中了,以便每次開機時都自動啟動.
          3. 可能因為換了個地方,它在啟動界面讓我輸入id/pwd,如果過幾秒不輸(因為我一開始沒注意),這個輸入界面就沒了,然后卡在那里.
          4. 在啟動界面輸一下id/pwd就好了

          posted @ 2006-06-06 20:34 Jcat 閱讀(279) | 評論 (0)編輯 收藏
          2006-5-23, 下午Dell來公司給我修小七,換了個主板,爽!晚上決定裝Linux,把F盤的東西分別移到了E盤和移動硬盤上,決定裝ubuntu,從ftp上 down了一個,刻盤順利,結果竟然讀不出來,暈到了。只好用《寶典》配的DVD,裝Fedora3,還算順利。可是弄了半天不會上網,今天先到這。

          2006-5-24, 晚上搞定了幾件事:可以上網了(其實就是用自動獲取IP就好了),學會使用:FireFox,中文輸入法,openoffice,kprint,gfpt。不過還是不能上外網(不會裝北理客戶端),真可憐。

          2006-5-25, 搞定上外網問題(安裝bitnet)

          2006-5-31, 一個幸運的日子(碰巧也是我妹妹的生日), 我終于解決了Linux下的寬屏問題,雖然是誤打誤撞,不過還是很高興,畢竟這是我解決的第一個問題. 向著Linux前進、前進、前前進~~

          2006-6-3, 搞定U盤問題.

          posted @ 2006-06-06 20:16 Jcat 閱讀(256) | 評論 (0)編輯 收藏
          僅列出標題
          共17頁: First 上一頁 9 10 11 12 13 14 15 16 17 
          主站蜘蛛池模板: 绥化市| 民勤县| 十堰市| 大化| 博罗县| 灯塔市| 都安| 安平县| 临清市| 恩平市| 葵青区| 徐水县| 舟山市| 湘乡市| 旺苍县| 乐昌市| 宣威市| 甘孜县| 华蓥市| 荥阳市| 鄂托克前旗| 公安县| 枞阳县| 深水埗区| 蛟河市| 康定县| 绥芬河市| 鹤庆县| 砀山县| 措勤县| 蒙山县| 宽甸| 光泽县| 曲沃县| 临邑县| 宣威市| 太白县| 房产| 隆林| 凤台县| 抚松县|