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 have a requirement where I have to send a file from a local system to unix box(present on client side) using java code.I have developed a code that is successfully sending the file from local system to client side unix box (I am connecting to client side unix box using VPN) provided I run the code in my eclipse IDE present in local system. But when I am running the same code in the unix box it is throwing null pointer exception.Might be the unix system is not recognising the local system. Please find the code.
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.
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 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 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
I got a requirement like to get Desktop Notifications using JEE ( In a web based application).For example, if someone logs into skype then it will show at the end (below part of the screen where system displays time)Is that possible to show popup on desktop through the webapplications? I'm using Tomcat (Web server ) for my web based applications.
I've researched for it and came to know about the JNLP (Java network layer protocal) file which is deployed into client system.JNLP is displaying a desktop notification but I'm not sure how far this can be useful.Is there any API to make it possible?
i have a program in UNIX directory /home/me/java/src
package bin; public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); } }
I have manage to compile it successfully(class file will be in bin directory) using command below: javac -d /home/t_bmf/java/bin HelloWorld.java
My problem now is how would I execute the class in bin directory in UNIX? I already tried different ways on how to execute it as suggested in my internet research The one I tried is this:
java $CLASSPATH:.:bin/HelloWorld but I got this error message: Exception in thread "main" java.lang.NoClassDefFoundError: :/:bin/HelloWorld Caused by: java.lang.ClassNotFoundException: :.:bin.HelloWorld
I have a project requirement, where I need a desktop java application to interact with web pages. I am currently working in java, so I decided to go with jsp and other java related web technologies. The project requirement is that, there is desktop java application and I need it to interact with web pages. I have zero idea about jsp, jsf etc. Is it possible to make my desktop app to interact with jsp or should I proceed with servlets. If I need to go with servlets, can the front end be designed as an attractive page?
I need to generate a file in Java with Unix TimeStamp. Want to generate an ordered list of Data entry objects for a defined period of time e.g., getData (long startTimeStamp, endTimeStamp, long resolution).
1) I would like to generate resolution with random numbers by using Random class.
2) How to take Start and end timestamps to generate a file (i.e., writing into a file).
I have a unix program that simulates an accident evolving as a function of time and produces two files. I will focus on the first file before getting to the second. This first file has five output variables/vectors (velocity vs time, pressure vs time, etc), which are selected as part of the simulation input. These are the variables I have to put into Excel if I want to view the transient graphically. Where it gets tedious is that, if I want to view a different set of five variables, I have to rerun, extract, put these in Excel to plot. There can be lots of variables needed to properly characterize the accident.
The second file produced is a really large binary file. This file contains all the information that I'd need, precluding the need to rerun to view a different set of output variables. This is the file that seems tailor-made for a Java or something to be able to extract the information. That is, it seems like Java could be used to do this work: extract variable information from the large binary file. Eventually, I would like to plot it too and I know I could use Java there.
I think my steps are:
1) understand the format of my binary file 2) reconfigure the binary file for use with java (is this demuxing?) 3) learn java programming for this application: extracting information to produce something like a .csv file with time on the leftmost column and variable information populating the rest of the columns.
import javax.swing.*; public class LoopFrame extends JFrame { public LoopFrame() { super("My loop Frames"); JDesktopPane desktop = new JDesktopPane(); //a specialized layered pane JInternalFrame innerframe = new JInternalFrame("My loop Windows");
[Code] .....
I want to add 5 internal frames to a desktop panel it compiles but i get this error
//***********************************************err or****************************** this shows in the cmd when i run the program
Exception in thread "main" java.lang.IllegalArgumentException: illegal component position at java.awt.Container.addImpl(Container.java:1093) at javax.swing.JLayeredPane.addImpl(JLayeredPane.java :230) at javax.swing.JDesktopPane.addImpl(JDesktopPane.java :483) at java.awt.Container.add(Container.java:410) at LoopFrame.<init>(LoopFrame.java:27) at LoopFrame.main(LoopFrame.java:44) Press any key to continue . . .
how do you get from launching some java code in eclipse to launching a java program from your desktop.Does one somehow wrap the code in C+ to make it a .exe? take for example Mine-Craft.Its build in Java however launches as a .exe.
for a project im doing i need to create a java app with an embedded database so that the datbase is part of the application instead of run on a server that the app talks to.
the problem im having is finding the documentation for this, ive found the following 2 tutorials that almost do what i need:
NetBeans Platform CRUD Application Tutorial Working with the Java DB (Derby) Database.
how i can accomplish embedding a database into a java app.
I have coded to create jPanel as image and save to desktop but the image is saved only in my src folder in My Documents. Here is my code-
public static BufferedImage getScreenShot(Component component){ BufferedImage image= new BufferedImage(component.getWidth(),component.getHeight(),BufferedImage.TYPE_INT_RGB); component.paint(image.getGraphics());
I want to develop a dynamic webpage (using JSP & tomcat hosted on windows server) which will connect to unix server and on button "Show Files" click on dynamic webpage it should display all the files present in the unix server.
The button click should display the files which i can see when i run "ls -ltr" in unix server home directory.