Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

Java file creation problem on Linux

 
Ranch Hand
Posts: 52
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
It is actually a very simple problem but i can't seem to solve it.

I am trying to create a simple txt or html file in my java program. It works fine but on my local windows machine (file gets created), but the file does not get created when i compile an drun it on linux machine. I have given all the project folders full rights 777, but still no file creation.



javac FileTest.java and java FileTest both work fine and i don't get any exception.
There is no console message and also there are no Test_1.html and /Test.txt files created.

Any idea?

Thanks.
 
Bartender
Posts: 3323
86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does the folder structure "/opt/FileTest/bin" exist?
I'm not that hot on linux but I believe a leading forward slash means from the root of the file system which isn't necessarily the root of the drive as it is on Windows systems.
 
Bartender
Posts: 5167
11
Netbeans IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Norman, please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/new-java/63247-java-file-creation-linux.html
https://forums.oracle.com/forums/thread.jspa?messageID=10594444
 
My name is Inigo Montoya, you killed my father, prepare to read a tiny ad:
Garden Master Course kickstarter
https://coderanch.com/t/754577/Garden-Master-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic