Java net urisyntaxexception illegal character in opaque part at index

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.net.URISyntaxException: Illegal character error when invoking #4

java.net.URISyntaxException: Illegal character error when invoking #4

Comments

I get an error:
[jsdoc] java.lang.RuntimeException: java.net.URISyntaxException: Illegal cha
racter in opaque part at index 2: C:\Users\m\3\external_repo\jsdoc/node_modules

when trying to invoke the task.
(obviously: Windows (7) machine, java.version : 1.6.0_37)

I tried many versions of jar-locations and jsdoc.home property
Would be greatful for any hints, what could be the problem.

The text was updated successfully, but these errors were encountered:

actually, my experience is, that ant handles the paths quite robustly.
But even if I provide relative, forward-slash paths, the error stays the same!

and even this (with build.xml placed directly inside the jsdoc folder):
» dir=»$»/>

returned the error:
[jsdoc] java.lang.RuntimeException: java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\m\3\external_repo\jsdoc./node_modules

It looks to me, as if the jsdochome-parameter is being resolved ant-style (i.e. os-native),
but the application using it as prefix gets confused by the different slashes.
Could that be?

Anybody with positive experiences on Windows-machines?

I rebuild the project with this JsDoc3.java file (I replaced literal jsDocHome with jsDocHomeFile):

 classname="net.jannon.ant.tasks.JsDoc3" 
 classpath="/path/to/jsdoc3-ant-task.jar;/path/to/js.jar"/> 

import java.util.;
import java.io.
;

import org.apache.tools.ant.*;
import org.apache.tools.ant.types.FileSet;
import org.apache.tools.ant.types.FileList;
import org.apache.tools.ant.types.Commandline.Argument;
import org.apache.tools.ant.DirectoryScanner;

public class JsDoc3 extends Task

private File jsDocHomeFile; private String template; private Vector args = new Vector(); private Vector fileSets = new Vector(); private Vector fileLists = new Vector(); private String encoding = null, config = null, inputDir = null, inputFile = null, toDir = null, tutorials = null; private boolean isIncludingPrivate = false, isRecursive = false; /** * Method invoked by Ant to actually run the task */ public void execute() throws BuildException < // create the list of arguments for the rhino shell String[] arguments = createArguments(); try < Main.main(arguments); >catch (Exception e) < e.printStackTrace(); >> /** * Receive a nested argument * * @param arg An argument to pass to JSDoc3. This can be used pass arguments * not exposed directly by the ant task (e.g --test, --explain, etc.) */ public void addArg(Argument arg) < if (!args.contains(arg)) < args.add(arg); >> /** * Receive a nested fileset * * @param fileSet a fileset of source files */ public void addFileSet(FileSet fileSet) < if (!fileSets.contains(fileSet)) < fileSets.add(fileSet); >> /** * Receive a nested FileList * * @param fileList a list of sources */ public void addFileList(FileList fileList) < if (!fileLists.contains(fileList)) < fileLists.add(fileList); >> /** * Sets the jsdochome attribute, the home directory of JSDoc3. * * @param jsDocHome a string representing the the home directory of JSDoc3 */ public void setJsdochome(String jsDocHome) < this.jsDocHomeFile = new File(jsDocHome); >/** * Sets the input source directory. One of the following must be specified: * 'dir', 'file', or nested filesets * * @param dir a string representing the path to the source file directory. */ public void setDir(String dir) < this.inputDir = dir; >/** * Sets the input source file. One of the following must be specified: * 'dir', 'file', or nested filesets * * @param file a string representing the path to the source file */ public void setFile(String file) < this.inputFile = file; >/** * Sets the optional template attribute, which is the name of the template * used to generate the documentation * * @param template the name of the template to use (default: "default") */ public void setTemplate(String template) < this.template = "templates/" + template; >/** * Sets the optional to attribute which determines where the generated * documentation is placed. * * @param toDir a string representing the path to the directory in which to * place the generated documentation */ public void setTo(String toDir) < this.toDir = toDir; >/** * Sets the optional encoding attribute which sets the encoding of the input and output * files. * * @param encoding the encoding to use (default: "utf-8") */ public void setEncoding(String encoding) < this.encoding = encoding; >/** * Sets the optional private attribute which determines whether or not JSDoc3 * should generate documentation for private members/methods * * @param isPrivate whether or not to show private members/methods (default: false) */ public void setPrivate(Boolean isPrivate) < this.isIncludingPrivate = isPrivate; >/** * Sets the optional recurse attribute which determines whether or not JSDoc3 * should recurse into source directories. * * @param recurse whether or not to recurse into source subdirectories (default: false) */ public void setRecurse(Boolean recurse) < this.isRecursive = recurse; >/** * Sets the optional tutorials attribute. The tutorials attribute points * to where JSDoc3 should look for tutorials * * @param tutorials a string representing the path to the tutorials directory */ public void setTutorials(String tutorials) < this.tutorials = tutorials; >/** * Create the array of arguments to pass to rhino engine. It looks something * like this: * -modules /node_modules -modules /rhino_modules \ * -modules /jsdoc.js --dirname= \ *  * * @return a string[] of commands to pass to the rhino engine */ private String[] createArguments() throws BuildException < Vectorarguments = new Vector(); // return if certain attributes are not present if ((jsDocHomeFile == null)) < throw new BuildException("jsdochome must be specified"); >// add the modules folders arguments.add("-modules"); arguments.add(new File(jsDocHomeFile, "node_modules").toURI().toString()); arguments.add("-modules"); arguments.add(new File(jsDocHomeFile, "rhino").toURI().toString()); arguments.add("-modules"); arguments.add(new File(jsDocHomeFile, "lib").toURI().toString()); arguments.add("-modules"); arguments.add(jsDocHomeFile.toURI().toString()); // add the main jsodc js arguments.add(new File(jsDocHomeFile, "jsdoc.js").toURI().toString()); // add the dirname arguments.add("--dirname=" + jsDocHomeFile.toURI().toString()); addOptionalArgument(arguments, template, "-t"); // add the template addOptionalArgument(arguments, toDir, "-d"); // add the output dir addOptionalArgument(arguments, encoding, "-e"); // the encoding to use addOptionalArgument(arguments, config, "-c"); // the config file to use addOptionalArgument(arguments, tutorials, "-u"); // the tutorials dir addOptionalBooleanArgument(arguments, isIncludingPrivate, "-p"); addOptionalBooleanArgument(arguments, isRecursive, "-r"); if (inputFile != null) < arguments.add(inputFile); >else if (inputDir != null) < arguments.add(inputDir); >else if (fileSets.size() != 0 || fileLists.size() != 0) < // Loop through fileSets for (int i = 0, l = fileSets.size(); i < l; i++) < FileSet fs = fileSets.elementAt(i); // Ummm. DirectoryScanner ds = fs.getDirectoryScanner(getProject()); // Get base directory from fileset File dir = ds.getBasedir(); // Get included files from fileset String[] srcs = ds.getIncludedFiles(); // Loop through files for (int j = 0; j < srcs.length; j++) < // Make file object from base directory and filename File temp = new File(dir, srcs[j]); // Call the JSMin class with this file arguments.add(temp.getAbsolutePath()); >> // Loop through fileLists for (int i = 0; i < fileLists.size(); i++) < FileList fs = fileLists.elementAt(i); // Get included files from filelist String[] srcs = fs.getFiles(getProject()); // Get base directory from filelist File dir = fs.getDir(getProject()); // Loop through files for (int j = 0; j < srcs.length; j++) < // Make file object from base directory and filename File temp = new File(dir, srcs[j]); // Call the JSMin class with this file arguments.add(temp.getAbsolutePath()); >> > else < throw new BuildException("No inputs specified. Task requires 'file' attribute OR 'dir' attribute OR nested filesets"); >if (args.size() != 0) < for (int i = 0, l = args.size(); i < l; i++) < arguments.addAll(Arrays.asList(args.elementAt(i).getParts())); >> return arguments.toArray(new String[0]); > /** * Sets the optional config attribute. The config attribute points to the * JSON config file used by JSDoc3 * * @param config a string representing the path to the config file (default: "$/conf.json") */ public void setConfig(String config) < this.config = config; >/** * Helper method to add optional arguments. Checks for null first, then adds */ private void addOptionalArgument(Vector arguments, String value, String option) < if (value != null) < arguments.add(option); arguments.add(value); >> /** * Helper method to add optional boolean arguments. Checks for null first, then adds */ private void addOptionalBooleanArgument(Vector arguments, Boolean value, String option) < if (value) < arguments.add(option); >> 

Источник

Illegal character in opaque part at index 2 flutter

Illegal character in opaque part at index 2 flutter

I make a flutter project on windows using android studio, it work properly but now i used MAC OS and when i coppied my code on MAC it run on simulator perfectly but it gives error when i run it on android emulator. I am new for MAC OS and no idea about this error. I user android studio for coding.

Error log Could not determine the dependencies of task ':app:flutterBuildDebug'. > java.net.URISyntaxException: Illegal character in opaque part at index 2: C:\Users\Boffin BUILD FAILED in 1s Finished with error: Gradle task assembleDebug failed with exit code 1 

Solution – 1

Please try running flutter create in the same folder as your project in order to re-create all the IDE files & path configurations to the SDK.

This is sometimes necessary after platform upgrades or when moving code from one developer PC to the other.

Solution – 2

I met the same issue, flutter clean saved me.

Solution – 3

Flutter clean is a good idea, but please ensure you’re also deploying to an iOS device and have not accidentedly connected and android device.

Solution – 4

Build cleanup

This error happened to me after copying the entire project that was on the windows operating system and pasted on a MAC OS operating system.

I solved the problem by typing the command in the terminal directly in Android Studio

Solution – 5

Delete file flutter_build.d in /android/app/build/intermediates/flutter/debug/
and rebuild

Solution – 6

Depending on what your issue is you can try the following, Generally:

However, if you just moved an android folder which has a key, you’ll have to:

  1. Update the storeFile path in the key.properties file in Android to be the location of your new folders key.

Solution – 7

For me, I have deleted build folder inside android/app and now my issue has been solved

Solution – 8

Looks like your error came while you build app for android . Usually, this happens when there is a folder created inside the android/app directory called build . You can delete the entire build directory. Else you can also delete the whole android directory and create again with
flutter create . command.

Solution – 9

yeah, flutter clean, flutter pub get work for me, but I think upload project to github is best option rather then shifting project from one laptop to other.

Источник

Читайте также:  Html contact page template
Оцените статью