<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FDevelopment_Class%2FClass_Path</id>
		<title>Java/Development Class/Class Path - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.jexp.ru/index.php?action=history&amp;feed=atom&amp;title=Java%2FDevelopment_Class%2FClass_Path"/>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Development_Class/Class_Path&amp;action=history"/>
		<updated>2026-04-19T04:27:06Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/Development_Class/Class_Path&amp;diff=8333&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Development_Class/Class_Path&amp;diff=8333&amp;oldid=prev"/>
				<updated>2010-06-01T06:59:00Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 06:59, 1 июня 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	<entry>
		<id>http://www.jexp.ru/index.php?title=Java/Development_Class/Class_Path&amp;diff=8332&amp;oldid=prev</id>
		<title> в 18:01, 31 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.jexp.ru/index.php?title=Java/Development_Class/Class_Path&amp;diff=8332&amp;oldid=prev"/>
				<updated>2010-05-31T18:01:46Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== getClass().getResourceAsStream ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
 // This example is from the book _Java AWT Reference_ by John Zukowski.&lt;br /&gt;
// Written by John Zukowski.  Copyright (c) 1997 O&amp;quot;Reilly &amp;amp; Associates.&lt;br /&gt;
// You may study, use, modify, and distribute this example for any purpose.&lt;br /&gt;
// This example is provided WITHOUT WARRANTY either expressed or&lt;br /&gt;
import java.applet.Applet;&lt;br /&gt;
import java.awt.Font;&lt;br /&gt;
import java.awt.Graphics;&lt;br /&gt;
import java.awt.Image;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.io.InputStream;&lt;br /&gt;
import java.net.URL;&lt;br /&gt;
import java.util.Properties;&lt;br /&gt;
public class Prop11 extends Applet {&lt;br /&gt;
  Image im;&lt;br /&gt;
  Font f;&lt;br /&gt;
  String msg;&lt;br /&gt;
  public void paint(Graphics g) {&lt;br /&gt;
    g.setFont(f);&lt;br /&gt;
    if (im != null)&lt;br /&gt;
      g.drawImage(im, 50, 100, this);&lt;br /&gt;
    if (msg != null)&lt;br /&gt;
      g.drawString(msg, 50, 50);&lt;br /&gt;
  }&lt;br /&gt;
  public void init() {&lt;br /&gt;
    InputStream is = getClass().getResourceAsStream(&amp;quot;prop11.list&amp;quot;);&lt;br /&gt;
    Properties p = new Properties();&lt;br /&gt;
    try {&lt;br /&gt;
      p.load(is);&lt;br /&gt;
      f = Font.decode(p.getProperty(&amp;quot;MyProg.font&amp;quot;));&lt;br /&gt;
      msg = p.getProperty(&amp;quot;MyProg.message&amp;quot;);&lt;br /&gt;
      String name = p.getProperty(&amp;quot;MyProg.image&amp;quot;);&lt;br /&gt;
      URL url = getClass().getResource(name);&lt;br /&gt;
      im = getImage(url);&lt;br /&gt;
    } catch (IOException e) {&lt;br /&gt;
      System.out.println(&amp;quot;error loading props...&amp;quot;);&lt;br /&gt;
    }&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
File: prop11.list&lt;br /&gt;
MyProg.font.size=20&lt;br /&gt;
MyProg.font.type=italic-bold&lt;br /&gt;
MyProg.font.name=Helvetica&lt;br /&gt;
MyProg.message=Hello World&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Load resource file: absolute from the classpath ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.net.URL;&lt;br /&gt;
public class Main {&lt;br /&gt;
  public static void main(String[] args) throws IOException {&lt;br /&gt;
    // absolute from the classpath&lt;br /&gt;
    URL url = Main.class.getResource(&amp;quot;/mypackage/foo.txt&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Load resource file: relative to the class location ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.net.URL;&lt;br /&gt;
public class Main {&lt;br /&gt;
  public static void main(String[] args) throws IOException {&lt;br /&gt;
    // relative to the class location&lt;br /&gt;
    URL url = Main.class.getResource(&amp;quot;foo.txt&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== relative document loading in classpath ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
import java.io.IOException;&lt;br /&gt;
import java.net.URL;&lt;br /&gt;
public class Main {&lt;br /&gt;
  public static void main(String[] args) throws IOException {&lt;br /&gt;
    // relative document&lt;br /&gt;
    URL url = Main.class.getResource(&amp;quot;docs/bar.txt&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
 &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Try adding one or more item(s) to class path ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- start source code --&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
    &amp;lt;source lang=&amp;quot;java&amp;quot;&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * Copyright (c) Ian F. Darwin, http://www.darwinsys.ru/, 1996-2002.&lt;br /&gt;
 * All rights reserved. Software written by Ian F. Darwin and others.&lt;br /&gt;
 * $Id: LICENSE,v 1.8 2004/02/09 03:33:38 ian Exp $&lt;br /&gt;
 *&lt;br /&gt;
 * Redistribution and use in source and binary forms, with or without&lt;br /&gt;
 * modification, are permitted provided that the following conditions&lt;br /&gt;
 * are met:&lt;br /&gt;
 * 1. Redistributions of source code must retain the above copyright&lt;br /&gt;
 *    notice, this list of conditions and the following disclaimer.&lt;br /&gt;
 * 2. Redistributions in binary form must reproduce the above copyright&lt;br /&gt;
 *    notice, this list of conditions and the following disclaimer in the&lt;br /&gt;
 *    documentation and/or other materials provided with the distribution.&lt;br /&gt;
 *&lt;br /&gt;
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS&amp;quot;&amp;quot;&lt;br /&gt;
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED&lt;br /&gt;
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR&lt;br /&gt;
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS&lt;br /&gt;
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR&lt;br /&gt;
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF&lt;br /&gt;
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS&lt;br /&gt;
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN&lt;br /&gt;
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)&lt;br /&gt;
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE&lt;br /&gt;
 * POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt;
 * &lt;br /&gt;
 * Java, the Duke mascot, and all variants of Sun&amp;quot;s Java &amp;quot;steaming coffee&lt;br /&gt;
 * cup&amp;quot; logo are trademarks of Sun Microsystems. Sun&amp;quot;s, and James Gosling&amp;quot;s,&lt;br /&gt;
 * pioneering role in inventing and promulgating (and standardizing) the Java &lt;br /&gt;
 * language and environment is gratefully acknowledged.&lt;br /&gt;
 * &lt;br /&gt;
 * The pioneering role of Dennis Ritchie and Bjarne Stroustrup, of AT&amp;amp;T, for&lt;br /&gt;
 * inventing predecessor languages C and C++ is also gratefully acknowledged.&lt;br /&gt;
 */&lt;br /&gt;
import java.util.Properties;&lt;br /&gt;
/**&lt;br /&gt;
 * Try adding one or more item(s) to class path.&lt;br /&gt;
 */&lt;br /&gt;
public class SysPropSet {&lt;br /&gt;
  static Properties p = System.getProperties();&lt;br /&gt;
  public static void main(String[] argv) {&lt;br /&gt;
    System.out.println(&amp;quot;System Properties:&amp;quot;);&lt;br /&gt;
    System.out.println(&amp;quot;java.class.path now = &amp;quot; + getClassPath());&lt;br /&gt;
    p.setProperty(&amp;quot;java.class.path&amp;quot;, getClassPath() + &amp;quot;;&amp;quot;&lt;br /&gt;
        + &amp;quot;C:/jdk1.2/lib/tools.jar&amp;quot;);&lt;br /&gt;
    System.out.println(&amp;quot;java.class.path now = &amp;quot; + getClassPath());&lt;br /&gt;
    try {&lt;br /&gt;
      Class.forName(&amp;quot;sun.tools.javap.JavaP&amp;quot;);&lt;br /&gt;
    } catch (Exception e) {&lt;br /&gt;
      System.err.println(e);&lt;br /&gt;
      return;&lt;br /&gt;
    }&lt;br /&gt;
    System.out.println(&amp;quot;Got it!!&amp;quot;);&lt;br /&gt;
  }&lt;br /&gt;
  static String getClassPath() {&lt;br /&gt;
    return p.getProperty(&amp;quot;java.class.path&amp;quot;, null);&lt;br /&gt;
  }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
           &lt;br /&gt;
       &amp;lt;/source&amp;gt;&lt;br /&gt;
    &lt;br /&gt;
   &lt;br /&gt;
  &amp;lt;!-- end source code --&amp;gt;&lt;/div&gt;</summary>
			</entry>

	</feed>