congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
ClassPathException
Code IndexAdd Tabnine to your IDE (free)

How to use
ClassPathException
in
bsh

Best Java code snippets using bsh.ClassPathException (Showing top 10 results out of 315)

origin: beanshell/beanshell

public static URL [] getUserClassPathComponents()
  throws ClassPathException
{
  if ( userClassPathComp != null )
    return userClassPathComp;
  String cp=System.getProperty("java.class.path");
  String [] paths = cp.split(File.pathSeparator);
  URL [] urls = new URL[ paths.length ];
  try {
    for ( int i=0; i<paths.length; i++)
      // We take care to get the canonical path first.
      // Java deals with relative paths for it's bootstrap loader
      // but JARClassLoader doesn't.
      urls[i] = new File(
        new File(paths[i]).getCanonicalPath() ).toURI().toURL();
  } catch ( IOException e ) {
    throw new ClassPathException("can't parse class path: "+e, e);
  }
  userClassPathComp = urls;
  return urls;
}
origin: jitlogic/zorka

public static URL [] getUserClassPathComponents() 
  throws ClassPathException
{
  if ( userClassPathComp != null )
    return userClassPathComp;
  String cp=System.getProperty("java.class.path");
  String [] paths=StringUtil.split(cp, File.pathSeparator);
  URL [] urls = new URL[ paths.length ];
  try {
    for ( int i=0; i<paths.length; i++)
      // We take care to get the canonical path first.
      // Java deals with relative paths for it's bootstrap loader
      // but JARClassLoader doesn't.
      urls[i] = new File( 
        new File(paths[i]).getCanonicalPath() ).toURL();
  } catch ( IOException e ) {
    throw new ClassPathException("can't parse class path: "+e);
  }
  userClassPathComp = urls;
  return urls;
}
origin: jitlogic/zorka

/**
  Get the boot path including the lib/rt.jar if possible.
*/
public static BshClassPath getBootClassPath() 
  throws ClassPathException
{
  if ( bootClassPath == null )
  {
    try 
    {
      //String rtjar = System.getProperty("java.home")+"/lib/rt.jar";
      String rtjar = getRTJarPath();
      URL url = new File( rtjar ).toURL();
      bootClassPath = new BshClassPath( 
        "Boot Class Path", new URL[] { url } );
    } catch ( MalformedURLException e ) {
      throw new ClassPathException(" can't find boot jar: "+e);
    }
  }
  return bootClassPath;
}
origin: beanshell/beanshell

/**
  Get the boot path including the lib/rt.jar if possible.
*/
public static BshClassPath getBootClassPath()
  throws ClassPathException
{
  if ( bootClassPath == null )
  {
    try
    {
      bootClassPath = new BshClassPath(
          "Boot Class Path", new URL[] { getRTJarPath() } );
    } catch ( MalformedURLException e ) {
      throw new ClassPathException(" can't find boot jar: "+e, e);
    }
  }
  return bootClassPath;
}
origin: beanshell/beanshell

/**
  Reload all classes in the specified package: e.g. "com.sun.tools"
  The special package name "<unpackaged>" can be used to refer
  to unpackaged classes.
*/
@Override
public void reloadPackage( String pack )
  throws ClassPathException
{
  Collection classes =
    baseClassPath.getClassesForPackage( pack );
  if ( classes == null )
    classes =
      BshClassPath.getUserClassPath().getClassesForPackage( pack );
  // no point in checking boot class path, can't reload those
  if ( classes == null )
    throw new ClassPathException("No classes found for package: "+pack);
  reloadClasses( (String[])classes.toArray( new String[0] ) );
}
origin: jitlogic/zorka

/**
  Reload all classes in the specified package: e.g. "com.sun.tools"
  The special package name "<unpackaged>" can be used to refer 
  to unpackaged classes.
*/
@Override
public void reloadPackage( String pack )
  throws ClassPathException 
{
  Collection classes = 
    baseClassPath.getClassesForPackage( pack );
  if ( classes == null )
    classes = 
      BshClassPath.getUserClassPath().getClassesForPackage( pack );
  // no point in checking boot class path, can't reload those
  if ( classes == null )
    throw new ClassPathException("No classes found for package: "+pack);
  reloadClasses( (String[])classes.toArray( new String[0] ) );
}
origin: beanshell/beanshell

/**
  Support for super import "*";
  Get the full name associated with the unqualified name in this
  classpath.  Returns either the String name or an AmbiguousName object
  encapsulating the various names.
*/
public String getClassNameByUnqName( String name )
  throws ClassPathException
{
  insureInitialized();
  UnqualifiedNameTable unqNameTable = getUnqualifiedNameTable();
  Object obj = unqNameTable.get( name );
  if ( obj instanceof AmbiguousName )
    throw new ClassPathException("Ambigous class names: "+
      ((AmbiguousName)obj).get() );
  return (String)obj;
}
origin: jitlogic/zorka

/**
  Support for super import "*";
  Get the full name associated with the unqualified name in this 
  classpath.  Returns either the String name or an AmbiguousName object
  encapsulating the various names.
*/
public String getClassNameByUnqName( String name ) 
  throws ClassPathException
{
  insureInitialized();
  UnqualifiedNameTable unqNameTable = getUnqualifiedNameTable();
  Object obj = unqNameTable.get( name );
  if ( obj instanceof AmbiguousName )
    throw new ClassPathException("Ambigous class names: "+
      ((AmbiguousName)obj).get() );
  return (String)obj;
}
origin: jitlogic/zorka

throw new ClassPathException("Nothing known about class: "
  +name );
throw new ClassPathException("Cannot reload class: "+name+
  " from source: "+ classSource );
origin: beanshell/beanshell

throw new ClassPathException("Nothing known about class: "
  +name );
throw new ClassPathException("Cannot reload class: "+name+
  " from source: "+ classSource );
bshClassPathException

Most used methods

  • <init>

Popular in Java

  • Making http requests using okhttp
  • runOnUiThread (Activity)
  • onCreateOptionsMenu (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JList (javax.swing)
  • JOptionPane (javax.swing)
  • JPanel (javax.swing)
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now