I have a flex project in which I need to as3xls library (.swc file) in my project. Now I have downloaded that swc file and included it in flex-sdk\frameworks\libs and I am able to use the .as files of that swc file.
Now If I have tried to put the swc file in my local project, for e.g. in one of my package of components and added it to the class path (using eclipse project properties -> flex build path) and tried to use it from that location but I am unable to compile the project as its not able to import the .as files.
Can anybody suggest the location where I should add the .swc file and use it in my project ?
If you're using Flash Builder, I generally create a libs folder under the project:
Then, reference the SWC by selecting the project Properties, ActionScript Build Path where you can either add an individual SWC or SWC Folder:
Check out my blog post on How to use a SWC.
Here is the important points:
There are three different ways that you can use the classes that
reside in a SWC file:
* Library Path in Project Properties: This is how
I use SWCs most commonly.
* Libs folder: The libs folder was introduced
in Flex Builder 3. If you put a SWC into a libs folder it is
automatically added to your library path, and all the classes in the
SWC are available from your project
* Library Path command line
argument: You can use the library path argument to the mxmlc command
line compiler.
Related
I currently switched to eclipse and trying to migrate my projects. I created a java-workspace and used 'File->Open Projects from File System'.
The project with all the folders is added, not only the 'src' but everything I put into it (datasheets, documentation,...). Also the libraries are added two times. One time in the folder and what seems like a link to the compiled library.
folder structure
In netbeans I just added the desired library to the /libs folder and linked it to the project.
Can I manually add folders and/ or libraries to existing projects? Why are there two instances of the libraries?
By using Open Projects from File System, folders containing .java files has been configured as source folders (source code intended to be compiled). This can be undone via right-click Build Path > Remove from Build Path (the reverse function is Build Path > Use as Source Folder).
In the Package Explorer, source folders are shown as virtual folders. If the source folder is not a subfolder of the project, it is displayed as virtual folder in addition to the project subfolder to be able to navigate to that non-source project subfolder (in your case you have a single src source folder and in addition to the non-source folder lib you have multiple virtual lib/... source folders).
The node Referenced Libraries lists all JARs and class folders on the Java Build Path (classpath/modulepath). To remove something from the Build Path, right-click it and choose Build Path > Remove from Build Path. JARs can be added to the Build Path by right-clicking the JAR and choosing Build Path > Add to Build Path. Class folders can be added only via Project > Properties: Java Build Path in the tab Libraries with the button Add Class Folder....
I dont know if this is a workaround or good practice for migration:
Create a new Java-Project in Eclipse
add desired Folder structure (including /libs)
In 'Project->Properties -- Libraries' add libraries manually
Clean and Build Project
I have to test functionality and stability but it seems ok.
I downloaded twitter4j-core-3.0.3-sources.jar and put under my project's lib folder.I did this step : project->Build Path-> ConfigureBuildPath->Add jar ... But now my project cannot find twitter class, I cannot import twitter.Status . I can import twitter.*;
You downloaded the sources file, which is full of .java files that Eclipse will use when you want to see the library's classes' source code.
In order for Eclipse to use the classes, you'll have to add the binary .jar to your build path (and remove the *-source.jar one). You can then link the binary .jar to the -source.jar to be able to navigate to the library classes' definitions.
I created an Eclipse project and I need to use the Super CSV library with Dozer. I downloaded the Super CSV and created a new folder "super-csv" in /usr/lib.
Now I have: /usr/lib/super-csv/super-csv that contains the super csv jar (+ javadoc and source),
/usr/lib/super-csv/super-csv-dozer that contains the super csv dozer jar, javadoc and source plus a "lib" folder.
Inside /usr/lib/super-csv/super-csv-dozer/lib there are many .jar files that are needed for super-csv-dozer to work, so I added it as native library for super-csv-dozer entry in library tab of java build path in Eclipse.
When I try to compile the project, I receive a java.lang.ClassNotFoundException pointing a class that is contained in one of the jar files in the lib folder.
Everything works only if I manually add every jar in lib folder as an external jar.
Can someone explain me where I am doing wrong?
I'd recommend using Maven - it's a widely used tool for Java builds. To start using Super CSV, it would be as simple as adding the 2 dependencies (listed on the Super CSV website), and your Eclipse project would be ready to go.
There's a bit of a learning curve though, so if you want to just add the jars to Eclipse's build path manually, I'd recommend creating a lib directory at the root of your project and putting all of the jars there.
my-project
|-src
| |- (your source in here)
|
|-lib
|-commons-beanutils-1.8.3.jar
|-commons-lang-2.5.jar
|-commons-logging-1.1.1.jar
|-dozer-5.3.2.jar
|-slf4j-api-1.7.1.jar
|-super-csv-2.0.1.jar
|-super-csv-dozer-2.0.1.jar
You can then add them to the build path (here's a good guide).
Just a note: if you're not using the Dozer extension, then you'll only need super-csv-2.0.1.jar on the build path.
I am new to CMake and I am trying Integrate CMake with Eclipse.
Below is the example of the file structure that I have.
PROJECT
build/linux
build/linux/Release (Should contain the release libraries and files)
build/linux/Debug (Should contain the debug version of the files)
SRC
subProject_1
.cpp (all source files) and CMakeLists.txt 1 for this folder (creating a static library)
subproject_2
.cpp (all source files) and CMakeLists.txt 2 for this folder (creating a static library)
subproject_3
.cpp (all source files) and CMakeLists.txt 3 for this folder (creating the executable)
Include
subProject_1
.h (all the header files)
subProject_2
.h (all the header files)
subProject_3
.h (all the header files)
Can you please let me know how would I be able to integrate CMake to Eclipse. I would like to do a in Source build so that I can sub version my code.
I have tried different options of placing the main CMakelist in project folder, project/build/linux folder and so on. I can get the project working but I dont get to see the source folder as well as the include folder on eclipse.
I have tried both 1st and 2nd option specified in http://www.vtk.org/Wiki/CMake:Eclipse_UNIX_Tutorial#CMake_with_Eclipse
It's usually very simple: from a clean build directory, you configure cmake using Eclipse as generator (it's easier if you use cmake-gui), and then you import the build directory into Eclipse (File, Import, General, Existing Projects into Workspace).
I want to accelerate the compilation of a large Flash IDE project by pre-compiling some packages or parts of packages into a SWC file, which I will include in the "Source Path" section of the Advanced AS3 Settings under Flash Publish Settings.
The problem is that I don't know where the compiler will look first for a class definition, given that it should (in theory) be able to find a class definition in both the SWC and the source path, since the source of the SWC is in the source path (i.e. the main FLA and the linked SWC share the same source path or root directory).
While you can arrange the order for source paths (paths including AS files), and you can arrange the order of library paths (paths to SWC files or folders containing SWC files), you cannot specify whether source paths or library paths are searched for definitions first.
Will the class definition in the library path (AS file) or the source path (SWC file) be used? Even though they may represent the same class definition, I will not see my compilation times decrease unless it uses the SWC file.
Edit:
The only documentation I've found says "If you use the Library path, be sure none of the compiled code in the SWC files is duplicated in uncompiled AS files in the Source path. The redundant code will slow down compilation of your SWF file." I love how it mentions the performance hit without mentioning which definition will actually be used :P
The AS file is the last part the complier look for. So AS file will override the class in swc library.