I am currently working with GAE and was trying to figure out if there was some way that I can run php on GAE. Fortunately, I came across Quercus and was very happy to find that it had all that i needed.
But the problem now is that once I include the resin.jar to the WEB-INF/lib folder and try to update app using the google plugin in eclipse, it gives me an error saying that the size of the jar file is big and recommends me adding --enable_jar_splitting flag.
Now I have gone through a lot of sites where people have had similar problems. So what do I do to overcome this?
So here's what I am looking for in short:
1. Either a way to include this flag in the eclipse plugin
2. Finding out a way to split the jar file.
SOLUTION:
The only way that the above is currently possible is by using the command line utility present in the sdk/bin folder called - appcfg.sh
appcfg.sh --enable_jar_splitting -e user#domain.com update /path/to/war/file
PS: It is assumed that you have added the path to the bin folder as a environmental variable.
Related
I have the Problem that i want to add OR-Tools into my project via eclipse IDE. I want to use the Linear Solver. I added the two jars form the downloaded Zip file. Now i want to run the SimpleLpExample from the OR-Tools site. I've got the Error that no jniortools in java.library.path. I see that at other posts they say you have to run make third_party and make java, but i don't know where i have to run these commands.
When somebody added it successfully into an IDE it would be glade when this person can explain how he does it. Thanks for help.
No. You need to add the path to the jniortools shared library I'm eclipse.
All dynamic libraries are located in the lib/ directory of the extracted archive.
To add the correct path, please follow these instructions:
I am writing down an example of what I was trying to do.
But this is just one example, I am sure there would be many. So I want a generalised answer for this.
I was trying to make a java desktop application which reads the word documents. I realized I need some Apache libraries/APIs that would help me do it.
So I downloaded the library.
But now I need to set the classpath of the files from the library.
I am a developer and I can do it, but imagine giving such instructions of setting a classpath to a complete non-developer user.
I was wondering if when I am over with the making of this java application, I would make it executable (exe) application and when someone installs it, the classpaths are set automatically during the installation and the apache library files are automatically extracted.
How can I do it? Can someone explain me in detail - step-by-step?
Please consider using some development IDE, like (free) eclipse for instance.
Then crate new folder (clled lib for example) in your project, copy the library into it,
then click on your library by the right button and select "add to build path"
As already mentioned - best way to do it is to use Manifest file in your jar. Official documentation: https://docs.oracle.com/javase/tutorial/deployment/jar/downman.html
The current Jsoup release 1.7.3 has a known issue that it is using String.isEmpty() which is not supported by Android API Level 8.
I can see crash report of my app so I tried to fix this by change the source code of Jsoup and build my own jsoup.fix.jar. I test this jar with JAVA application and it worked fine on my PC.
I noticed that when I remove the original jsoup-1.7.3.jar from my project, there is errors complaining cannot find jsoup stuff, and the those errors are gone after I add the jsoup.fix.jar which seems to be good. I also check the JAVA build path and the exporting configurations, jsoup.fix.jar are all set as it should.
However, when I tried to run the APP on my Android devices, the APP crashed and saying it cannot find org.jsoup.Jsoup.
I checked the jsoup.fix.jar, opened it with JD-GUI and find the classes are all there, but I used my dex2jar to convert the classes.dex in my /bin directory, I cannot see nay org.jsoup stuff.
Just replace my jar file with the original jar will not have the same issue reproduced.
I also noticed that in my jar, the MANIFEST.MF file only have one line of content, but in the released jsoup-1.7.3.jar, the MANIFEST.MF contains a lot of content.
I am confused now, questions:
Am I doing wrong when build my own jar?
Why the APK still cannot include the jsoup pacakage even I configured it to do so?
Finally I found the reason might be the jar is exported from a JAVA project.
I have tried to create an Android project and copy the source files into it and then export another jar file, and it works!
Could anybody explain why?
this might be a tall order or it might be ridiculously simple. I wanted to run this game on my website: https://github.com/ajanata/PretendYoureXyzzy
Unfortunately I have no clue how to make something like this work. There didn't seem to be an installation file, so I can only imagine it's painfully obvious to anyone familiar with this sort of thing. I recently ordered a trial of a shared Tomcat server, since I'm assuming that's needed to run all the Java goodies.
If there are any simple instructions I should follow to install this, it would be much appreciated if you could share them!
You need to download the source from the Github link you provided and then download Eclipse - Java EE. You then open Eclipse and choose File->Import->General->Existing Projects Into Workspace and choose the folder you just downloaded. You can then choose Export->Web->WAR file and export the WAR file.
You then download and setup Tomcat as described here (ignore the parts after Tomcat is running and you can access it at http://localhost:8080) and install the WAR as described here.
If you are feeling exceptionally lazy I have built the war here. You just need to drop it into the webapps folder in your Tomcat installation and then restart your server. You can then access it at:
http://localhost:8080/cah.
Hard to say without looking deeper into the project, if they create a .war file somehow, just copy the .war file into [tomcat home]/webapps directory and your application will be deployed. You can then acces it at yourmachine:8080/warname
where warname == the name of the war file without the .war extension.
There appears to be a SQL script with the project as well, not sure if there is some database you might need to setup which could get tricky.
I have a problem trying to deploy my project:
«Found a jar file too large to upload». The problem occurs when the script tries to upload
appengine-api-1.0-sdk-1.5.3.jar (15.8 MB although only 10MB files are allowed).
The problem is well-known since 2009. There are a lot of tickets in google issue tracker and here as well. There are a lot of messages of this kind all over the web. But all of them are referring to the two solutions:
1) Using the --enable_jar_splitting. Surely I've tried to use it. No success:
# appengine-java-sdk-1.5.3/bin/appcfg.sh -e some_mail#gmail.com --enable_jar_splitting update project/war
Reading application configuration data...
......
java.lang.IllegalStateException: Found a jar file too large to upload: "/tmp/appcfg4869648953084473935.tmp/WEB-INF/classes/war/WEB-INF/lib/appengine-api-1.0-sdk- 1.5.3.jar". Consider using --enable_jar_splitting.
Unable to update app: Found a jar file too large to upload: "/tmp/appcfg4869648953084473935.tmp/WEB-INF/classes/war/WEB-INF/lib/appengine-api-1.0-sdk- 1.5.3.jar". Consider using --enable_jar_splitting.
Please see the logs [/tmp/appcfg5857347513630341491.log] for further information.
I tried to use different versions of SDK (1.4.3, 1.5.2 and the latest 1.5.3). But the script ignores the --enable_jar_splitting option.
2) Unpack appengine-api-1.0-sdk-1.5.3.jar to WEB-INF/lib. Another error arises in this case. Projects are limited by 3000 files. There are 3500 files approx. in appengine-api-1.0-sdk-1.5.3.jar archive and 100 files in my project. So, this solution does not work as well.
3) I have found the 3d solution myself. You can delete the appengine-api-1.0-sdk-1.5.3.jar from WEB-INF/lib directory. It works but only in cases you're having simple projects. But it does not work in case of projects using all the power of google appengine. I need to use datastore and some other functions. Without the appengine-api-1.0-sdk-1.5.3.jar the project could be deployed, but it does not work and produces errors in google error console (classes are missing).
I have sent a message to google. They're keeping silence, unfortunately.
Please help me, you clever guys. I will be awfully grateful. Hope, there is a little trick to get it work.
You don't need to upload the API jar - it's part of the App Engine platform. Whatever configuration you've changed that is causing the SDK to try and upload it, you should change back.
You can try to split appengine-api-1.0-sdk-1.5.3.jar manually.
Unzip the jar file.
Zip half the files to one jar file
Zip the other half to one jar file.
Update your class path and build tools.