JRE :: Deploying Working Ruleset For Use With Intranet Based Applications?
Mar 10, 2015
I question this as I have not yet succeeded in deploying a working ruleset for use with intranet based applications. I have verified the ruleset is working with external internet java apps so it is being deployed correctly just doesn't steer Intranet based apps to the correct version.
I have come across an issue with arraylists. I am writing a text based RPG game as something to start with ...
Initially I had a single zone which was all stored in an arraylist and everything was working in regards to the player moving around. The problem I now have is how to add further zones to my game. Ideally I would like an arraylist for each zone, and would use the below to create each arraylist
public static ArrayList<RoomsClass> castleMap = new ArrayList<>();
The problem I now have is how to handle the player moving, initially with a single zone/arraylist I could reference that arraylist directly
public void findRoomCoords(int ID) { for (int i = 0; i < castleMap.size(); i++) { if (castleMap.get(i).roomID.equals(ID)) { PLAYER.setCurrentRoomZone(castleMap.get(i).roomZone); PLAYER.setCurrentRoomX(castleMap.get(i).roomX); PLAYER.setCurrentRoomY(castleMap.get(i).roomY); PLAYER.setCurrentRoomZ(castleMap.get(i).roomZ); } } }
My initial thought was to use a getter/setter to remove the reference of castleMap from my movement code in order to access different arraylists, however this is where things have fallen over, I can't seem to work out how to get the arraylist name to change, depending on the outcome of the setZoneMap() method.
public void setZoneMap() { switch (PLAYER.getCurrentRoomZone()) { case 0: { zoneMap = Castle.castleMap; break;
I have created a database driven Java app that i would like to deploy to several PCs. The App uses JReports which only worked when i installed Javac on this laptop. It worked fine within Netbeans but after building it depended on the java compiler and only worked after setting up Path variable..
Will i need to setup the Javac on every machine or is there any way of deploying it easier?
I recently started working with Java 8. I have been doing Java development on and off since the early 1990's. Most recently I have been doing all my current work in Java 6. I decided to "take the plunge" and to start getting involved with Java 8. I have an imaging application for geologic research I started working on in Java 6 and Swing, and I am now continuing that development under Java 8. It was a pleasant surprise that to find that all of my code built without any changes (I'm using Eclipse Luna and just deleted the Java 6 runtime and added the Java 8 runtime after downloading it). The application launches fine from inside Eclipse.
However I ran into a problem when exporting the application from Eclipse to a runnable JAR file and then trying to launch it. After creating the runnable JAR I was not able to launch it by simply double clicking. A command line box would open for a second, then close and the application window would never open. To upgrade from Java 6 to Java 8 I only downloaded the Java 8 runtime environment, not the Java 8 JDK. I am working in Windows 7 and tried updating the JAR file associations and experimented with various path entries in my environment variables. No mater what I did I could not simply double click the runnable JAR to launch it.
Then I deleted all my Java downloads and started over. This time all I did was downloaded the Java 8 JDK and installed it. I then pointed Eclipse to the Java 8 runtime environment that was installed with the Java 8 JDK. My code built and executed perfectly in the Eclipse environment. Then I exported the the Eclipse project as a runnable JAR again and tried to launch it. This time it worked as expected. Double clicking the runnable JAR launched the application!
So my question is if I want to give this application to someone to run (i.e. deploy it) that is not a developer, do I have to have them install the Java 8 JDK? I assumed that all someone would need to run the application as a runnable JAR is the Java 8 runtime environment, not the JDK. However, when I had only the Java 8 runtime environment installed I could not launch the runnable JAR. With the Java 8 JDK I was able to run the runnable JAR as expected, with no problem.
So my class in project codes should have proper access to the other three folders(input,output,config). Then what can I do to feed the function a relative path?How would that looks like?
Question2:
Is that true, for windows and unix I have to write two versions of codes on system-dependant path?
I want to develop separate projects for web layer (.war) and for Business layer (.jar). I want to deploy these layers on different Glassfish servers.
Here is my Approach -
1. Create a separate module for remote interfaces (.jar), use @remote annotations 2. Create a Web module using JSP/Servlets (.war) and use this remote interface jar in it. 3. Create a EJB module (.jar) and implement these remote interface in it. 4. Use JNDI in Web layer to access the EJB methods.
I have an app that saves pdfs and images from a web page. The web sections send info to the server elements running in Java. I have hardcoded the path to where the images and pdfs need to be saved but on the server, these paths will be different. I'd prefer to just save them to something like:
whateverMyDeploymentDirectoryIs/files/pdfs
or something. How do I find out what my root directory is so that I can make the path relative instead of hard coded?
Trying to deploy the application with webService project fails with below error
weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015001]Unable to link class oracle.apps.scm.productCollaboration.common.businessClasses.businessClassesService.applicationModule. server.BusinessClassServiceImpl in Jar /scratch/software/mw_local/FMWTOOLS_11.1.1.7.0_GENERIC_121222.1001.2_PATCHES4FA_11.1.1.7.0_PLATFORMS/jcyril/mw_home_standalone/user_projects/domains/fusion_domain/servers/AdminServer/upload/ProductLifecycleManagementApp
We have this website that is run on two web applications. The first web application hosts the home page and clicking certain links in the home page would forward it to pages of the second web application where certain functionalities can be done. Now, there has been an initiative to redesign the site to have a login page and only logged in users could browse it. This would mean a login page being created in the first app, and when links to the second application are clicked, the pages are supposed to forward to it with the same session of the user that logged in.
We have already creating handling to pass the session from the first app to the second. Logging out from the first application would also invalidate the same user session in the second application. My questions is, is this a bad idea? would it be better to combine the two apps even if it would mean a huge impact?
or is there are better way to do this? like set it in web.xml. I have read that you cannot use two context for it.
I'm new to java and haven't develop any application before that... I need to develop an application through which i can send data from 1 computer to another computer. These communication in between the computers are those are under one router connection. Means they can connect even without internet access
Main concept is as follow
1. Java application on computer A [server side application] 2. Java application on Computer B [Client side application] 3. Java application on computer C [Client side application]
Now computer B and C communicate with computer A. but they don't know about presence of each other
I'm deployed application A and application B in TOMCAT server applications, the U1 user enters into the application A, he authenticates and generates a call to a page of the app B. As I was able to access the session of user U1 en A from B, it could have a single session.
I have an application written in Java on the Linux platform. My application will work the following way:
User A will open application. User B will open application.User A will need to send User B a message but without a socket connection.User B will need to send User A a message but without a socket connection.The user should be able to identify the messages sent to each other.If User A reads user B's message the message will no longer be available in the channel of communication.If one user exits their application their message should be removed.User C should not be able to read user A and user B message (This is only via the application design, no real security here).Applications should be able to work on different machines however they will utilize a shared network mount to access files modified by each other.
I do have to note that the messages being sent is rather small and only 1 message is sent from each user, so in that regard I did not want to setup a client/server model to do this using sockets.
Basically I am looking for a similar concept as a message queue but more relevant to my requirements done in Java. What are some good options to use that will address some of my requirements? I have not touched Java in a long time and only have used it for certain usage so I am trying to get an idea of which current technologies are best for what I need.
I would like users in an application to be able to access and edit their user profiles (Application A). The problem is that the user objects (entities, dao, beans) are handled in a separate application (Application B) which is specifically for managing user accounts. Importing the java sources for App B into App A could be messy and might need configuration of the persistence unit and connection. I'm thinking it would be better to inject an EJB from App B to App A to query the user DB and return the results so a user profile form is rendered in App A.
I know how to inject EJBs within the same application, but I'm not so sure about how it's done across different applications or even if that's the most advisable way to achieve what I want. it's better practice to inject an external EJB into App A or simply import the classes from App B and use those.
@Stateless public class UsersDaoImpl implements UsersDAO { @PersistenceContext private EntityManager em;
I just installed java on my computer because i was getting messages that it was no longer there. And I figured out how to solve my problems on my browsers. but i don't see how to enable java in my applications on the hard drive. in particular, i want to use the database in open office but don't see how to enable it.
Generally sessions in web applications expire after a stipulated max inactive interval. To my knowledge primarily the reason is if the session objects are not invalidated they keep exhausting the memory. So my question is
A. Is there any other reason other why web applications timeout the user session after an inactive interval?
B. Social sites never timeout the user session even if you just leave them for the entire day. How do they manage sessions? Don't the active sessions exhaust memory on their servers or JVM to be specific?
I am maintaining an existing Java product (which has a HUGE code-base). I discovered that it is setting (and getting) two of its internal passwords as Java system properties, at no less than 4-5 different places (methods). Now, the problem is, the passwords are being stored as plain text in the Java system properties, and so, the same is visible to external entities, as the application is not using any Java Security Manager. For example, if the application (process) is running on port number 1234, we can run the Java command:
jinfo -sysprops 1234
to view both the passwords as values of the corresponding Java system properties. I wish to ask if there is any remedy to this without changing the existing code-base too much? The desired effect would be to "hide" the two Java system properties (denoting the two passwords) from all external entities.
It may be noted that introducing a Java Security Manager into the application may not be a solution, as if we revoke read permissions from the said two Java system properties using the Java Security Manager, the application codes which read those properties would crash. Same is applicable for storing the passwords in encrypted form, as that would crash all codes within the application which are expecting to read the passwords in clear text form.
To give a bit more context, the said two passwords we are storing as Java system properties are actually passwords to access two key-stores, and Tomcat requires that we store the said two passwords in plain-text format. Any workarounds, such that only Tomcat will be able to see the two passwords as-is, while they will be invisible to all other external entities?
Or, is there any way to place the said passwords in other in-memory locations (like static variables) which only Tomcat can (be made to) read instead of placing them as system properties which is exposed to anyone?
I have a problem with several java applications. When I start them Java wants to connect to the certificate authority, to check if the certificate is still valid and not on a blacklist.
The problem is: my whole internet is behind a password protected proxy. If I open my browser i get a windows with username and password. I enter it and internet in the browser works. But for Java it isn't working, because I see no point, where I can enter the password and username for the proxy. I can enter the proxy ip and port in the java settings, but not the password and username. So I get a error screen from java, telling me, that java could not connect. I can disable the check in the java settings, but I don't wont that.
Is there a way to tell java, that java uses my proxy with my password and username? I already googled this problem and found nothing except tutorials for connecting with proxy in the java code. But these applications are not from me, I can't change the code ...
I am new to work on JNLP program. I have created a SWING program, JNLP file when i deploy the ear file i am getting 404 error. Please find the steps in details.
1.Created a dynamic web project JWStartProject in eclipse
2.Create a HelloWorld.java class under default package.
import javax.swing.*; public class HelloWorld extends JFrame { private static final long serialVersionUID = 4968624166243565348L; private JLabel label = new JLabel("Hello Java Web START!"); public HelloWorld() { super("Jave Web Start Example"); this.setSize(350, 200); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE ); this.setLayout(null);
[Code] ....
Now I exported this project as JWStartProject.war contains following code.
Created Server in Websphere Admin console
Deployed this war file under the server and started.
I have added MIME types also.
I am unable to launch the application. I am getting 404 errors. May I know where I went wrong?
I am developing an application to share my client screen with server, it is working well on swing. But i want to develop as web application, i am trying to using applet. But i am facing the fallowing problem..,
1) The Applet screen also open and project also running well on server mechine. But unable to see the client screen on the server.
2) The problem may be to display the JDesktopPane or JInternalFrame.
My working Server Code extends withe JFrame..Java Code:
OK very similar to switches & cases & ifs, but I'm wondering if I can do something like that:
public Method[] method; method[0] = walk(); method[1] = run(); method[2] = stop(); for (int i = 0; i < x; i++){ if (i == myNumber) { run m[i]; return; } }
I am implementing a console based interface for an assigment. I've got a DAO interaces and implementations ready and I am stuck on a loop that checks whether to display logged in menu or logged out menu.
public static void main(String[] args) throws SQLException { Main consoleInterface = new Main(); boolean runningLoop = consoleInterface.isRunning(); boolean loggedOutLoop, loggedInLoop; while(runningLoop) {
[Code] ....
So when this runs it should show loggedIn() method only and only if the condition is not met. At the start when program runs I set loggedOutLoop = true and loggedInLoop = false. When I handle login I set loggedOut = false and loggedIn = true
What seems to happen is that the else statement doesnt work and the output I've got is only loggedOut() method displayed where I only want loggedIn() to be displayed without loggedOut().
I'm trying to create a tile based map JPanel but all I get is a white screen. I'm fairly new to the Java Swing and AWT package so I've been watching tutorials on YouTube so learn as much as I can.
I've got three classes: Window.java which includes the Main method, Panel.java which is the JPanel and Tile.java to draw all the images into an array.
Window.java:
import javax.swing.JFrame; public class Window extends JFrame { public Window() { setTitle("Project"); setSize(500, 400);
[Code] .....
I've checked through everything and still cannot find what I'm doing wrong. I did try different codes but I just got errors instead.