Run .jar file, but stop in first form - java

I Using:
NetBeans: IDE 7.4
Java : jdk1.7.0_51
javax.swing and RXTXcomm for my RFID
When i try to run .jar file, the program can running,
First form is login form, after i input username and password then click Login,
after that remain in the login form, which should be changed to the form menu.
Can anyone help me?

Related

How to set starting page in Netbeans Java Web project template?

When I run a java web project it always opens in my browser the "index.html" page, so I want to choose another page when the project starts.
How can I do it?
Thanks in advance.
Configure the URL to be used when you run your project as follows:
Select your project in the Projects panel, right click and select Properties... from the context menu.
Select Run from the list of categories.
You should see that Context Path already is set to something. It is set to /WebApplication1 in the sample screen shot below. Leave that field alone.
Specify the Relative URL you want to be used when NetBeans runs your application. By default it will be empty. The value you provide will be appended to the context path to construct the URL. In the screen shot below the relative URL is set to /Servlet1, so this will be be appended to the context path of /WebApplication1 to build the URL http://localhost:8080/WebApplication1/Servlet1 to be used when the application is run.
When your web application is run, the URL to be used is logged to the run window. Note the text Browsing: http://localhost:8080/WebApplication1/Servlet1 near the bottom of the screen shot.

How to run jar file on button click in my html page?

 I have created testing automated script for a webpage of my desktop application. so it runs fine manually from eclipse. I am using selenium web driver and java.
Now I want to create GUI/Easy interface where I can get input from user And RUN my file on button click,so when tester gives input and tap on button ,we see out put fro my script on the samepage
I have exported all functions as Runnable JAR , So now I need to know how can I call and run these runnable jar from html page?on click. Is there any easy way for this?
Please help me

Java executable jar, Window program file folder and administrator privilages

This is for Window 7 and Window 10
We have requirement to generate jar inside c:program file only. Installer can easily install our jar into c:\\ProgramFile\\testapp. After that we have the requirement to download the zip file from third party server inside c:\\ProgramFile\\testappp and here we are getting the access denied.
After lot of research, we come to know, we can run our jar under administrator privileges using super-user-application-0.0.5.jar.
Now the problem is We are getting the "User account control popup" with message "Do you want to allow the following program to make changes to this computer"
We don't want this popup so anyone know how to bypass this popup?
The important code from super-user-application-0.0.5.jar is
Shell32X.SHELLEXECUTEINFO execInfo = new Shell32X.SHELLEXECUTEINFO()
execInfo.lpParameters = args
execInfo.lpDirectory = lpDirectory
execInfo.fMask = Shell32X.SEE_MASK_NOCLOSEPROCESS
execInfo.lpVerb = "runas"
boolean result = Shell32X.INSTANCE.ShellExecuteEx(execInfo)
execInfo.lpVerb = "runas" is actually opening the popup. Is there any way, just bypass the popup and further processing should be similar to the saying OK to the popup.
Any chance to java programatically provide admin rights to the testapp folder created inside c:\ProgramFile\testapp

transformation from Java application to Java app (NetBeans)

I have finished a java application in NetBeans (made of single jFrame form), but was at the very end instructed, to transform it an app. I did so by adding a new jApplet form to the same project and copied all of the contents from jFrame form, onto a new jApplet form, and it runs perfectly from Netbeans. However, when i try to run the app.class from the HTML document in the browser, it doesn't run and displays the following error:
HTML file (positioned in the same folder as NewJApplet.class(..Gume\build\classes\demo)) contains:
<applet code="NewJApplet.class" height=800 width=600></applet>
Project structure:
I tried running the automatically generated html file, but it displays just a gray area.
Please help me solve the problem, i'm really short on time. Thank you.

Add tomcat server in netbeans

I am using netbeans and when I create a new web application project I click the "Add" to add a server cause in a tutorial they are using tomcat and not glassfish.
I then choose Tomcat 6.0 from the list and the next page is displayed where I have to input
Server Location
Username
Password
I don't get this part.
What location do they mean? And what username and password?
With Server Location they probably mean the root directory of the Tomcat installation, sometimes also known as CATALINA_HOME.
There's a file in Tomcat's conf directory called tomcat-users.xml. The Tomcat documentation tells you to add a user ID and password to this file so you can administer Tomcat. So those would need to be entered in NetBeans then.
Carl's answer is right, but there is a wiki page with instruction on how to register an existing Tomcat installation with NetBeans that is a bit more complete.
Also, the IDE will add the values of user name and password to the tomcat-users.xml for you if the checkbox with the label 'Create user if it does not exist' is selected (and you have write access to the tomcat-users.xml file).

Categories