tokens
это массив указателей.
Различие между строками и указателями, если часто нечеткое. В некоторых ситуациях строки лучше продумывать как массивы, в других - как указатели.
В любом случае ... в вашем примере input
- это массив, а tokens
- это массив указателей на место в пределах input
.
Данные внутри input
меняются при каждом вызове на strtok()
Итак, шаг за шагом
// input[] = "foo bar baz";
tokens[0] = strtok(input, " ");
// input[] = "foo\0bar baz";
// ^-- tokens[0] points here
tokens[1] = strtok(NULL, " ");
// input[] = "foo\0bar\0baz";
// ^-- tokens[1] points here
tokens[2] = strtok(NULL, " ");
// input[] = "foo\0bar\0baz";
// ^-- tokens[2] points here
// next strtok returns NULL
Можете ли вы сгенерировать файл jar в обоих направлениях, извлечь их и сравнить их. Мне ужасно любопытно, изменился ли файл jar при добавлении записи. Некоторая информация о загрузке класса может дать некоторое представление. Спецификация для файлов jar на самом деле не предлагает никаких подсказок.
The difference is the order of their specification in the classloaders.
The bootstrap classpath is managed by the top-level classloader when starting the VM that will execute the app. (From a commandline this is speicfied using -Xbootclasspath)
The user classpath are entries that are managed by the application classloader.
Any entries in the bootstrap classpath take precedence over the user classpath.
These are initialized based on the project containing the application to launch, but you can modify them in the launcher configuration for the application you wnat to launch in eclipse.
As to why it didn't work: what were the jars? Were they things that needed to be loaded from the runtime classes (like xml parser replacement libs?)
See http://java.sun.com/j2se/1.4.2/docs/tooldocs/findingclasses.html for more details.
-- Scott
Один из них предназначен для проверки источников / путей к классам в редакторе, другой - для среды выполнения. [1268 Я думаю.
Какого черта, я все равно сегодня исчерпан.