package javax.ejb does not exist - open-source

I have opened a project in netbeans to view the project but there is a same error in most of the files. It says that "package javax.ejb does not exist". This is a working project and I am not sure what is wrong. Can anyone help me?

Try this first: http://forums.netbeans.org/topic44810.html
If that doesn't fix your problem, you can right click on your project and go to the properties section. Click on the Libraries section and select "Add Library". Then scroll down until you find the Libraries that start with "Java" (for example: Java EE 6 API Library). I add all of the Java libraries to my project to resolve this issue, however you might add them one at a time and see which one resolves it.

you just need to import Java EE Web 6 API Library to fix this issue, these libraries must be imported under the libraries folder:
right click Add library, click on import library, scroll down and look for Java EE Web 6 API Library, click on import library and finally click on add library.
That should fix any issues
In my case I was working with java with ant java web app, i was also using Java EE Version Java EE 6 web

I had the same problem when I tried to open a Java web service application and managed to resolve it after trying out a few things. For a Java web service application, there can be multiple causes to the problem. You may have "EJB and EAR" plugin already installed, however, Netbeans may not know the web server to use to run your application. It may have complained that "One or more projects do not have the target server set properly" when the project was opened. To resolve this problem, you have to assign a web server for the project. This is to be done not only for the main project, but also for the required projects that the main project may be dependent upon.
You first need to ensure that you have opened not just the main project, but also the required projects. To open the required projects, right-click on the main projects name in the main projects window and select Open Required Projects -> Open All Projects. After opening, the project names may be colored red in the project window to indicate problem.
In order to use a web server, you need to have one already installed. I chose Glassfish. Download and install Glassfish from https://glassfish.java.net/download.html, if you haven't done so. Also install the "Glassfish Server" plugin for Netbeans, if it's not already installed.
Now, in the Netbeans project window, right-click on the main project name and select "Resolve missing solver issue". If you see "Glassfish server" in the pop-up window that appears, select that one and click ok. If you don't see it, click "Add Server" then select "Glassfish Server", and setup the Glassfish server. Here you need to provide the installation directory of your Glassfish server, but I simply used the default values for the rest. Later I used username "admin" with blank password for running the project. Also perform the same steps to resolve the missing server for all of the required projects.

Related

Getting error while creating JavaFX11 application in Apache Netbeans 10

i am new to java fx and i have downloaded Apache Netbeans 9 which runs on java 11.
since java fx is shipped separately, i have downloaded openjfx-11.0.1_SDK and followed steps in this link https://openjfx.io/openjfx-docs/#install-javafx
when i try to create java fx application in apache netbeans , i am getting below error
Failed to automatically set-up a JavaFX Platform.
Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab,
enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime.
Note: JavaFX SDK can be downloaded from JavaFX website
attaching screen shot of netbeans 10.
This is for the future developers that will stumble on this problem. You can follow this video for Installing JavaFX13 and integrate it with Apache Netbeans 11.2. Try following the instructions here
There might be problems with CSS autocomplete but you can create a JavaFx project now.
Edited: As suggested from the other answer, you can download the JavaFX from the official page of JavaFX.
I had the same issue on Netbeans 11. I solved this issue by following below steps.
Download the javafx.zip file from the website and after downloading it put it on JDK folder.
First, click on Manage Platforms and then click on Add platform and after clicking on Add platform it will ask of the filename, so give the path till JDK folder.
After giving path click on next and it will ask for platform name and platform sources so in platform sources give the path till src.zip (jdk/lib/src.zip) and press finish button.
After finishing button, you will see the new platform is added with the same name you have given platform name then click on it and go-to sources and click on Add Jar/Folder button and give the path till javafx.zip file which is saved on JDK folder.
After giving path click on add Jar/folder and close it. After closing it click on JavaFX platform and in that you will see the platform name is there click on it and create the project.
The problem is fixing by jdk1.8. Download and install at the page - https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html for your platform. For me, it was "Linux x64 Compressed Archive"(https://download.oracle.com/otn/java/jdk/8u241-b07/1f5b5a70bf22433b84d0e960903adac8/jdk-8u241-linux-x64.tar.gz)
after that:
setting up 1
setting up 2
It may be too late, but I figured it out nonetheless. You, and all other people reading this while trying to figure out how to use JavaFX with any Apache Netbeans version should:
create a new Library, name it JavaFx and in it, put all the .jar files(not the src.zip file) inside the lib directory of the unzipped javafx installation.
create a new normal java project. Go to project properties, and to module path, add the library JavaFx.
create a new module-info.java file (netbeans automates it) in that project and in it, you should put a dependency to all of the JavaFx components, if netbeans didn't already do that (in my case, it did. I didn't even have to hand code a single dependency). And yes, declare the module as "open module".
In essence, I just told you to modularize your project

VS2013 and WPTooklit (version from AUG 2013)

Quick question for anyone out there. I'm trying to install the August edition of the NuGet package of the wptoolkit. Unfortunately, I can't get it to show up under VS2013 Pro. Has anyone been able to get this to work?
You would have to browse to the dll which contains the controls to add them to the toolbox. In my project browse to the Packages folder of that project and then go to WPtoolkit.4.2013.08.16\lib\sl4-windowsphone71\Microsoft.Phone.Controls.Toolkit.dll
Even though it is a WP8 project, it only seems to work if you put in the 7.1 dll in the toolbox, otherwise if does not load. The only controls that don't work are LongListSelector and MultiSelect as they are now part of the base WP8 framework controls. Even though they are in the toolbox, when you try to drop them on your page you will get an error. All other controls seem to work just fine.
It should show up once you obtained it from NuGet.
Open Package Manager
Type in Install-Package WPtoolkit and press enter
Then, it'll be downloaded and imported into your project, so it should show up in the References folder.

Junit Test Case Builder (JUB) plug-in in Eclipse for Junit testcases automation

I am using JUB (JUnit TestCase Builder) plugin in Eclipse. I have downloaded JUB plugin and installed according to the instructions given in the following website,
http://jub.sourceforge.net/
While selecting the option "Build Junit Test Case", am getting information like "The chosen operation is not currently available".
Anyone facing the same problem? Kindly reply.
If there is anyother plugin for Junit Test cases Automation will also be useful.
I am not sure about JUB plugin for eclipse, but I would suggest you codePRO analytix for Eclipse for automating test cases since it is easy to install and use.
You can find the details of codePRO analytix here
CodePRO Analytix as a direct plugin is available in Eclipse Market place only for Eclipse versions 3.6 or below. However it can be installed and used with Eclipse versions 3.7 or more by following the below steps. But be aware of the problems which may occur due to version conflicts.
Installing CodePRO in Eclipse:
Download CodePRO v7.1.0 from here
In Eclipse choose Help --> Install New Software...
In the Install window which appears click on the Add button. In Add Repository dialog box which appears, click Archive... button. Locate the downloaded zip file and click Open. The details of the plugin installed will be displayed below. Click select All and Click on the Next button. Accept the terms and conditions and proceed with the installation.
Once installation is complete restart eclipse for the changes to affect.
Once installation is completed you can generate JUnit test cases by
Right click the required file
choose codePRO Tools -> Generate test cases.
Your test cases will be generated as a separated project.

libgdx HTML5 deployment

I've been working with libgdx for 2 days, and I'm starting to get the hang of it.
I'm comfortable with deployment on Android and desktop, but I've got no clue about how to run/debug or deploy the HTML5 version.
When I run as web application, the link gives me an http error 404.
I did what they say on the libgdx wiki, but that ain't working, so, help would be welcome.
BTW, the app's working fine on Android and desktop.
This worked for me:
In Eclipse -- right click on the *-html project. Select "Google" -> "GWT Compile". This will perform a GWT compile on the project, it can take a while so be patient. Once this is completed, I was able to copy the expanded war directory into my tomcat webapps directory. Tomcat was already running, it picked up the change and deployed the game, I was able to load it via localhost:8080/war/ I later renamed the directory (the one in the webapps folder) to something more appropriate for my project.
Good luck.
I ran into this problem for over an hour before realizing that when I selected "run as web application" and eclipse asked me to point to the war directory, I was silly enough to have been selecting the root directory of the project.
Once I went back and pointed to the actual war folder, it ran without issue. Silly I know, but might not be a bad idea to check, esp if anyone is setting this up at 1 am like I am lol.
According to the current date (December 2014), Libgdx now uses gradle and deploying using the mikeys's answer might not work for you. Follow the following guide for the best solution for this problem:
https://github.com/libgdx/libgdx/wiki/Gradle-on-the-Commandline
It's a bit difficult to deploy the app correctly. In the wiki of Libgdx (in google code) you can find in one of the first entries how to deploy and debug the app. The easiest way is to install and configure a Tomcat server, do the steps of the wiki and that's all. If you don't want deploy the app, only test it, you can do it directly from eclipse with the embedded server jetty included on the GWT Sdk. Hope this helps you.

JavaFx 2 applicaton does not run when i run it through HTML page

I have downloaded the javafx 2 samples and want to run in from its HMTL. For example there is one javafx application called BrickBreaker. For the specific sample the following files exist : BrickBreaker.jar, BrickBreaker.jnlp and BrickBreaker.html
When double clicking on jar or jnlp the application runs as expected but when i click on the html the application does not run. Instead i get the message "View the conectes of the page. Please install javaFX"
Why is that happening ? ( i have the javafx installed as the application runs when choosing the jar and jnlp files). My guess is that the html should be called from within the context of a webserver meaning that i should deploy my application first to a server and call the url from my explorer. For example if using glassfish i should call the url http://localhost:8080/Brickbraker
The problem is that i don't know how to deploy the javafx application in the server.
i tried to copy paste all the above three files in the autodeploy folder but it didnt worked...
Could you please help me?
Thanks in advance
EDIT: some more info - I have installed JDK 7 and JavaFX SDK 2.0.2
No, JavaFX is client technology, you don't need Glassfish to run it. JavaFX should run in browser the same way as Java plugins do.
If you can't run an application directly from html file it means your browser doesn't recognize you have runtime installed.
There can be next reasons for that:
JavaFX runtime is actually not installed (check in Windows Control Panel)
pure java plugin is not installed (you can check on java.com)
javafx runtime is 32bit and you are using 64bit browser (or vice versa)
you are using not supported browser (e.g. Safari)
you are using not supported system (at this moment, January 2012, only Windows supports runtime)