billy1380 / compilation-toolbox Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/compilation-toolbox
License: Apache License 2.0
Automatically exported from code.google.com/p/compilation-toolbox
License: Apache License 2.0
What steps will reproduce the problem?
1. Load external dependency
2. Compile code
What is the expected output? What do you see instead?
Expected output is a completed compile, instead I'm getting package does not
exist.
See: https://dl.dropbox.com/u/44002922/Capture1.PNG
What version of the product are you using? On what operating system?
Windows 7, compilation-toolbox 0.3.1, Java 6
Please provide any additional information below.
Here is my code, any help would be appreciated.
http://pastie.org/5407048
I suspect this is an error on my end, but for the life of me cannot figure out
the problem. Thank you in advance.
Original issue reported on code.google.com by [email protected]
on 20 Nov 2012 at 5:21
I compile a Java file but where is mi class File. I need the file .class
Original issue reported on code.google.com by [email protected]
on 29 Jan 2014 at 8:13
What steps will reproduce the problem?
Adding multiple classpath entries using addClassPathEntry on Windows does not
work because the entries are connected by colon ":". On Windows, however, it
should be connected by semicolon ";" as the colon is already used in the path
(e.g. "c:\Project\...")
What version of the product are you using? On what operating system?
Win7 x64
The problem is located in JavaSourceCompilerImpl.addClassPath
Original issue reported on code.google.com by [email protected]
on 20 Nov 2012 at 5:33
i need the bytecode of my class that compiled by this compiler
plz plz plz help
if god knows programming...
Original issue reported on code.google.com by [email protected]
on 19 Aug 2013 at 10:09
What steps will reproduce the problem?
1. Compile a class without exceptions
2. Use that same compiler to persist your compilation unit to disk
3. Trace through the logic for the temporary files, etc
4. From terminal window, notice that directory and file aren't there
5. From within java code, the .exists() method returns false
Approximate code:
String src = ...;
String target = "pkg.MyClass";
JavaSourceCompiler javaSourceCompiler = new JavaSourceCompilerImpl();
JavaSourceCompiler.CompilationUnit compilationUnit = javaSourceCompiler.createCompilationUnit();
// Setup class path
Collection<String> paths = getActiveClassPathEntries( optContextClass );
compilationUnit.addClassPathEntries( paths );
// Compile, no more exceptions
compilationUnit.addJavaSource( target, src );
ClassLoader classLoader = javaSourceCompiler.compile(compilationUnit);
Class myClass = classLoader.loadClass( target );
// Persist!?
javaSourceCompiler.persistCompiledClasses( compilationUnit );
// Debug code inspired by JavaSourceCompilerImpl
JavaFileObjectRegistry registry = compilationUnit.getRegistry();
log.info( "Registry: \"" + registry + "\"" );
File classOutputDirectory = compilationUnit.getOutputClassDirectory();
log.info( "Class file should be under: \"" + classOutputDirectory + "\"" );
Collection<JavaFileObject> classFiles = registry.get(JavaFileObject.Kind.CLASS);
// Finds 1 class
log.info( "Found " + classFiles.size() + " class file(s)" );
int i = 0;
for (JavaFileObject javaFileObject : classFiles ) {
log.info( "\t#" + i + " javaFileObject = \"" + javaFileObject + "\"" );
URI url = javaFileObject.toUri();
log.info( "\t#" + i + " jfo URI = \"" + url + "\"" );
String internalName = javaFileObject.getName().substring(1);
log.info( "\t#" + i + " internal name = \"" + internalName + "\"" );
File compiledClassFile = new File(classOutputDirectory, internalName);
// This path doesn't exist
log.info( "\t#" + i + " compiledClassFile = \"" + compiledClassFile + "\"" );
// Exists returns FALSE
log.info( "\t#" + i + " exists = " + compiledClassFile.exists() );
log.info( "\t#" + i + " absolute = " + compiledClassFile.getAbsolutePath() );
log.info( "\t#" + i + " canonical = " + compiledClassFile.getCanonicalPath() );
log.info( "\t#" + i + " parent = \"" + compiledClassFile.getParentFile() + "\"" );
i++;
}
What is the expected output? What do you see instead?
File
What version of the product are you using? On what operating system?
0.3.1
Please provide any additional information below.
It's odd.
I don't see errors, but no file nor directory either.
Original issue reported on code.google.com by [email protected]
on 8 Aug 2013 at 6:55
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.