Manually add the LWUIT plugin to netbeans - java

I have tried going to the plugin download center and I refreshed over 50 times over the course of a week and still i cannot see the LWUIT plugin for Java ME.
Is there a way for me to manually install this plugin without using the plugin download center?

I found out how to do it after a few hours...
go to this link http://www.java2s.com/Code/JarDownload/LWUIT/LWUIT_old.jar.zip , then open the NetBeans IDE and create a new MIDlet project. In the project side bar, go to resources and right-click. On the menu that shows up, click add library. Click edit. Click on add JAR/folder and point to where you extracted the jar file.

Related

Unable to add 'json-simple' library in netbeans

I am doing java project in netbeans, i don't know what settings i just changed, now i can't add external library to my project.
The option to add library is not visible as i saw in many YouTube videos. How should I add 'json-simple.jar' in my project?
In some videos by right click on java dependencies->add library option, we can add external libraries. But in my case i case even, right clicking does nothing.
enter image description here

Run a Maven Project using IntelliJ IDEA

I'm new to IntelliJ IDEA and I would like to run a simple Maven Quickstart project using it.
I followed all the instructions, the project was sucessfully built. But when I try to compile and run it , the Run button is not activated.
It looks like IntelliJ IDEA couldn't figure out where the main class is.
This is a picture of the project's hierarchy.
What is the problem ? And how can I fix it ?
Thanks !
Refresh the Maven project in the Maven Projects tool window (Reimport All Maven Projects), if it doesn't help, refer to this answer for diagnostics.
The issue is that your source roots were not configured correctly from the Maven model for some reason and the .java file appears in a plain directory instead of the Source root.
You can tell that by the color of the folders and by the icon of the file.
You need to create a Java Project.
File->New->Project->Java->Next->Next->Finish
Then go to the top and do:
Right click parent folder of project->Add Framework Support->Click Maven->Ok
Now Maven should be added to your project and also you should be able to run it
If this doesn't allow you to run the project, click the little drop down box to the left of the grayed out run button and click Edit Configurations.
Then click the + and click Application and set your Main class to the class that has the main method in it, and then it should allow you to run the application.
Hope that helps!
Seems like your java directory is not marked as Source root. Right click on it and click Mark directory as -> Source root
Have you imported the project as a maven projet ?
If yes, click on the body of your fonction and then do CTRL+MAJ+F10 or MAJ+F10
My issue was that I was looking for the equivalent of calling "mvnw" from the console/terminal.
.mnvw (linux) OR mvnw (windows)
I didn't know where this was in IntelliJ. That's how I interpret part of the question that was asked.
The solution wasn't obvious to me so I wanted to share it.
Conceptually, you want to run the default maven configuration (not a specific lifecycle stage). Therefore you need to select the root entry in the Maven panel:
Then you can play the green play button on the panel:
Alternatively, you can right click and run the maven build from the context menu.
If maven not visible top-right side then maven plugins not avaiable in your intellij IDE.
Follow below steps:
click settings icon(top-right side)->select plugin->click on checkbox at maven option->click apply button then ok button.
After few minutes maven able to see in you IDE.
You need to add to project e.g. Jetty or Tomcat (compile to WAR & run Tomcat server with this war).
If you will have Jetty maven plugin you will be able to run app via mvn jetty:run (Add this to Maven run configuration)

How to install a Plug-in project to my Eclipse? (Version: Luna Service Release 2 (4.4.2))

I have generated a demo popup menu plugin project automatically by Eclipse. Here is the project structure,
I have set a objectContribution to the point org.eclipse.ui.popupMenus,
When I right click the project and choose Run as -> Eclipse Application, another Eclipse process run and I can see the configured menu works well,
How can I install this plugin for my original Eclipse process?
What I have tried
I did some research and tried to Export -> Deployable plug-ins and fragments, then put it into the %EclipseFolder%/plugins, but it didn't work. I also have tried to Export -> Deployable features and installed it by Help->Install New Software, also failed to see the menu when right click the project.
Will you please help? BTW, I would like to know how to contribute a menu which will display when I right click on a package in a project? Thanks so much.
Use the Deployable plug-ins and fragments wizard and select Intall into Host on the Destination page.
This will create a p2 repository at the denoted location and install the selected plug-ins from there into the host instance, i.e. the Eclipse IDE that you are currently working with. I think a restart may be required.

How to organize jar files in a libraries folder in Eclipse?

I have a Java Project in Eclipse, and a Java Dynamic Web Project in Eclipse. In the former, all the jar files are shown individually under the top-level project folder. In the latter, the jar files are under a Libraries folder and the navigation is more convenient.
Is it possible to organize them in the same way in the Java Project also? If so, how?
Update: It is the Project Explorer View. For the Java Project, I see: "my_project_name" with the arrow expanded to point downwards, then I see: "package_icon src/main/java" and below that "package_icon src/main/resources" and then 20 jar files one below the other: "jar_icon activation-1.1.jar", ...
For the Java Dynamic Web Project I see: "my_project_name" as above, then I see: "JAX-WS Web Services" (unexpanded), then "Deployment Descriptor" (unexpanded), then "Java Resources" which I have expandeded, so I see the components of it below, of which the first is: "package_icon src/main/java", then below it, "package_icon src/main/resources", then below it "libraries_icon Libraries" instead of 20 jars! I have the option of expanding Libraries if I really need to see the 20 jars.
The only option I found to make things prettier in Eclipse Kepler is to:
In the Project Explorer window there is a down arrow in the upper right corner. Select that and then Customize View.
Select 'Libraries from external' and then OK.
Kind of cheesy...
EDIT: Of course I had to go and do some more digging...and it looks like I'll have to try this and see how it works.
Similar to M Miller's answer (but for Juno), click Show 'Referenced Libraries' Node in the dropdown of the Package Explorer window:
I'm using:
Eclipse IDE for Java Developers
Version: Juno Release
Build id: 20120614-1722
I noticed this "feature" on Eclipse Juno (latest version), when you have a jar file added to the build path it is not shown as a single file on the project.
Try removing one of the jars from the build path to see if it shows up again.
I couldn't find how to turn it off though.
BTW... the project layout for your "Java Project" is more akin to a "Maven Project", which is a bit more powerful.
You should change into the Package Explorer by Window > show View. It will display all the referenced libraries in a Referenced Libraries folder.

How to create a Hello World SWT application in eclipse?

I am trying to follow instructions in Eclipse to create my first Hello World SWT application. I have problems on the first step. In the instructions the following is written:
Open your Web browser to
http://eclipse.org/downloads/,
navigate to the Eclipse Platform
project section, select the latest
release build, and find the SWT Binary
and Source download.
Well I am smart enough to "open my Web browser to http://eclipse.org/downloads/". This I can do. But I am not smart enough to "navigate to the Eclipse Platform project section, select the latest release build, and find the SWT Binary and Source download".
Can anybody help me to find this "Eclipse Platform project section"? Should I click on "Projects"? If it is the case, what should I click next?
Thank you in advance.
Go here, http://archive.eclipse.org/eclipse/downloads/drops/R-2.1-200303272130/index.php and scroll all the way to the bottom to see SWT Binary and Source
Which may be a bit outdated, so go to http://www.eclipse.org/swt/ and under Development section, select your operating system.
From http://help.eclipse.org/help32/index.jsp?topic=/org.eclipse.platform.doc.isv/samples/org.eclipse.swt.examples/doc-html/swt_manual_setup.html :
Adding SWT to your workspace
Download SWT for standalone applications. A standalone version of SWT is available on the same download page as the Eclipse SDK. Look for the section titled SWT Binary and Source. Do not extract the archive file, just save it to disk.
Select Import... from the File menu.
Select Existing Projects into Workspace and click on the Next button.
Select Select archive file: and use the Browse button to locate the SWT standalone archive you have previously downloaded.
Click on the Finish button.
This worked for me under Ubuntu on my netbook; I've been fighting for a few days to configure Eclipse and I'm getting closer to done.

Categories

Resources