g****o 发帖数: 1284 | 1 Thinking in Java的第5章讲了如何创建自己的package,里面提到了一个CLASSPATH环境
变量。书里给了一个例子:
//:List.java
// Creating a package
package com.bruceekel.util;
public class List {
public List() {
System.out.println("com.bruceeckel.util.List");
}
}
然后作者说把生成的类文件放在他自己系统的一个子目录下:
C:\DOC\JavaT\com\bruceeckel\util
在他的机器上,CLASSPATH = .; D:\JAVA\LIB; C:\DOC\JavaT
请问在UNIX下有什么命令可以查看并修改这个路径? |
|
q***o 发帖数: 484 | 2 There is a sample given in BruceEckel's book - thinking in Java
It says:
Some programming environments will flash programs up on the screen and close
them before your've had a chance to see the results. u can put in the
following cod eat the end of main() to pause the output:
try{
Thread.currentThread().sleep(5*1000);
}
catch(InterruptedException e){}
} |
|
|
|
c***d 发帖数: 996 | 5 ☆─────────────────────────────────────☆
kingsyl (好久没有下棋了。。.) 于 (Fri Feb 16 15:16:41 2007) 提到:
下面的例子实现了用户定义的比较函数创建了一个优先队列.
如果对已经 sort好的这个优先队列按照 另外一个用户定义的比较函数进行排序,该
如何
实现?
就是想实现 另一优先队列, 使用另外一个比较函数.
//: C07:PriorityQueue3.cpp
// From "Thinking in C++, 2nd Edition, Volume 2"
// by Bruce Eckel & Chuck Allison, (c) 2001 MindView, Inc.
// Available at www.BruceEckel.com.
// A more complex use of priority_queue
//{L} ../TestSuite/Test
#include
#include
#include
using |
|