Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I am unsure about the following information from this link that details the Android Build Process.
I am basically wondering why the resource files need to be cnverted to Java source files (first step), then also packaged up to a .ap_ file?
What is the difference between the two steps?
why the resource files need to be cnverted to Java source files
They are not being "cnverted to Java source files". A Java source file -- R.java -- is built using the data from the resources, and that file represents a listing of all of the available resources. This file provides constants for Android app developers to use to refer to these resources from the rest of their Java code.
To draw an analogy, the Web is not "cnverted" to Google's search engine; Google's search engine represents an index of the Web. Similarly, resources are not "cnverted to Java source files" like R.java; R.java represents an index of the resources.
Related
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
In summary I have a java program that writes a file and I would like to now take that file and upload it to my Squarespace website. From here I am trying to figure out what my next steps are.
Unfortunately, Squarespace currently only offers APIs related to commerce (inventory, orders, products, transactions) and forms. There is no file storage-related API.
The only ways to upload files are via the WYSIWYG editor (via the add-link button), via the CSS Editor (for image assets) and via developer mode.
Squarespace 7.0 sites (current sites are 7.1 by default) that have Developer Mode enabled do support Git and SFTP. Theoretically, one could develop a system that utilized one of those methods in order to add files to the site (which would then be accessible via /assets), but that is only theoretical and far from ideal.
I'm afraid there isn't a good method for automatically uploading files to a Squarespace site.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
This occurs with many applications, for example Microsoft Word. If I click on a word file (.doc). Microsoft Word will start or communicate with an already running process.
How do I implement this with Java? Of course with my own file extension.
A file with the custom extension would just be a json/xml text document. But obviously the custom extension part is needed so windows knows what to open it with.
Eventually it would open a new screen/page in an javaFX application.
I am not sure what to call this, and I am having trouble finding examples because of that.
This involves setting file associations in the OS your java application is running in.
Oracle provides a tutorial (pretty old at this point, it mentions it was written for 8) which is about creating self-contained application packages which bundle the code and runtime together. This has a section on Using File Associations.
When creating your bundle, you can set file associations which the installer will setup in the OS.
<fx:info title="File Association Demo"
vendor="MySamples"
description="A Demo of File Associations for Java Packager"
category="Demos"
license="3 Clause BSD">
<fx:association extension="js" mimetype="text/javascript" description="JavaScript Source"/>
<fx:association extension="groovy" mimetype="text/x-groovy" description="Groovy Source"/>
</fx:info>
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have recently developed a school management system in java netbeans using derby(java built in database).Now i want to make a jar file and proivide it to my client .So can this jar run on client pc without netbeans or java installed? and what about database?
You can create a jar of your source code using netbeans using How to create a Jar file in Netbeans
You cannot package the derby or what ever database into a jar. Instead you can have script to start the db.
Java must be installed with at least the version of java you used. Embedded databases need no extra installation other than in your code.
Starting from a jar is a bit different than in the IDE from a class path. A jar contains only read-only resources, and the file names in the jar (zip archive) are case-sensitive.
It could be that the software first has to use a resource file as initial template to be copied to the file system. Like a prefilled database to be written to.
Java 9 can use jlink to create your own smaller JRE, java run time. (I do not think you are using java 9 though.)
Java 8 has a javapackager.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I'm not sure where is the best is to place my Grunt file in my spring web application. Should it be placed at the root of the web application like so:
my-app/gruntfile.js
Or should I place it at the root of resource directory like so:
my-app/src/main/webapp/static
Both will work. Just wondering what's the best practice here. Thanks!
I think a good project structure for spring and a client side library like AngularJS is:
my-app/src/
* main
* client: gruntfile.js, bower.json, js and html files
* java: spring java code
* resources: application.properties, static folder (for compiled client)
I would also take a look at some generators such as
http://yeoman.io/ or http://jhipster.github.io/
which create new projects with best practices and tools.
The grunt file is usually not part of the deployable. So it should not be src/main/webapp folder.I usually place my gulp file (pretty mutch the same thing) in the project root folder.
If you plan do minify or compile with grunt. You usually need a folder for the original files and one for the compiled files. My experience is that it is a bad idea to compile the files directly into the src/main/webapp folder since IDE's track them and reindex them every time. So I integrated gulp into the gradle lifecycle and copy all files into the webapp folder when I create the deployable.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm creating a specialized IDE in Java and I need to store and use resources associated with the current project being worked on. Should I store my whole project as one file (an archive), or as a system of files? I would prefer to use an archive (duh, one file.), but I'm unfamiliar with the APIs, and I'm not sure how slow that might be. Would it be terribly slower to read images and various other resources from an archive rather that the raw file system?
For example:
User clicks on an image in a jtree
Image is loaded from the file system to an editor
vs
...
Image is loaded from a jar to an editor
If the user is likely to be saving their individual project files, then using a filesystem rather than an archive will be a lot faster since the whole archive doesn't need to be written, only the changed files.
If possible you should only read the files once at the time the project is loaded into the editor, and after that have it all in memory. This is a lot faster than reading from the filesystem all the time.
So in summary, it's not the reading but the writing that would be the bottleneck with an archive.
On the other hand it also depends on how much data we are talking about.